【问题标题】:Generate m3u8 playlist from *.ts files从 *.ts 文件生成 m3u8 播放列表
【发布时间】:2021-01-19 17:30:27
【问题描述】:

我使用 FFmpeg 生成了 hls 视频。但我忘了输入-hls_list_size 0。现在它只包含最后 4 个文件。有没有办法使用文件夹内的所有 *.ts 文件只生成 .m3u8 播放列表文件?

【问题讨论】:

    标签: ffmpeg http-live-streaming m3u8


    【解决方案1】:

    假设您没有源或不想重新构建整个播放列表,请编写一个 bash 脚本以使用命令选择每个片段的持续时间

    ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 ts_files/sample_000.ts
    

    一旦你有了段长度,恕我直言,它应该很简单。

    当然,您希望 bash 以排序顺序(按名称/创建时间)遍历 *.ts 文件。

    虽然上述方法可以完成这项工作,但请通过 thisthis 一次。

    【讨论】:

      猜你喜欢
      • 2016-05-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-22
      • 2014-04-20
      • 1970-01-01
      • 2019-02-02
      • 1970-01-01
      • 2014-12-18
      相关资源
      最近更新 更多