添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
大力的饺子  ·  Top 10 Examples of ...·  6 天前    · 
温柔的保温杯  ·  hls-server - npm·  6 天前    · 
乐观的毛衣  ·  How to use FFmpeg in ...·  6 天前    · 
爱喝酒的楼房  ·  使用 Fluent-FFmpeg ...·  6 天前    · 
严肃的面包  ·  Speed Up Your ...·  6 天前    · 
酒量大的爆米花  ·  node_modules/@types/ba ...·  2 年前    · 

ffmpeg 多路推流 切换

FFmpeg 是一个强大的音视频处理工具,支持多种操作,包括多路推流。

如果想在多路推流中切换,可以使用下面的命令:

ffmpeg -i <input_file> -map 0:<stream_index> -c:<stream_type> -f <output_format> <output_url>
  • input_file 是输入文件路径。
  • stream_index 是输入文件中要切换的视频流或音频流的索引号。
  • stream_type 是要推流的流的类型,如 videoaudio
  • output_format 是输出的格式,如 rtmpudp 等。
  • output_url 是输出地址,如 rtmp://your-server-url/live/stream_name
  • 例如,以下命令将输入文件中的第一路视频流推送到 RTMP 服务器:

    ffmpeg -i input.mp4 -map 0:0 -c:v libx264 -f flv rtmp://your-server-url/live/stream_name
    

    这样,您就可以实现 FFmpeg 的多路推流切换了。

  •