【问题标题】:How to continue saving to an existing m3u8 playlist using ffmpeg如何使用 ffmpeg 继续保存到现有的 m3u8 播放列表
【发布时间】:2021-10-05 19:02:56
【问题描述】:

我正在使用 nginx rtmp 模块来运行实时流媒体服务器,该服务器将 rtmp 流编码为 hls 播放列表。有没有办法在我启动 ffmpeg 时继续使用现有的 m3u8 文件而不是创建新的播放列表?流有时会断开连接,我想在用户恢复流时保留一个播放列表。

这是我正在运行的 ffmpeg 命令: ffmpeg -i rtmp://localhost/live/$name -c:v libx264 -x264opts keyint=60:no-scenecut -s 720x1280 -r 30 -b:v 2000k -profile:v high -preset veryfast -c:a libfdk_aac -sws_flags bilinear -hls_list_size 0 /tmp/hls/$name_720p_.m3u8

【问题讨论】:

    标签: ffmpeg http-live-streaming rtmp


    【解决方案1】:

    使用hls_cleanup off 指令,在这种情况下它不会删除旧的 hls 片段和文件,但您必须使用 nginx rtmp hls 而不是使用 ffmpeg 创建它。

    【讨论】:

      猜你喜欢
      • 2016-01-14
      • 2017-11-07
      • 2016-03-29
      • 2014-12-18
      • 1970-01-01
      • 2010-12-12
      • 2018-11-18
      • 1970-01-01
      • 2013-09-09
      相关资源
      最近更新 更多