【问题标题】:Command to stream MPEG-1 video流式传输 MPEG-1 视频的命令
【发布时间】:2023-03-18 05:55:01
【问题描述】:

我正在尝试通过 FFMPEG 流式传输 MPEG-1 视频

ffmpeg -i "out.ts" -f flv -listen 1 -i rtmp://localhost:8889/live/app -c copy -f flv -listen 1 rtmp://localhost:1935/live/app

out.ts 文件是使用

编码的 MPEG-1 视频
ffmpeg -i out.avi -f mpegts -codec:v mpeg1video -b:v 1500k -r 30 -bf 0 -codec:a mp2 -b 0 -q 5 -t 1 out.ts

当我尝试使用VLC 打开流时:rtmp://localhost:1935/live/app 媒体未播放。通过 FFMPEG 流式传输 MPEG-1 视频的命令是什么?

【问题讨论】:

  • 为什么选择 MPEG-1 视频?这么老了。

标签: ffmpeg video-streaming streaming


【解决方案1】:

RTMP 不支持 mpeg1 视频或 mpeg2 音频。如果支持代码,您可以在 VIDEODATA 标头下的 fly 规范中查看完整列表。

https://www.adobe.com/content/dam/acom/en/devnet/flv/video_file_format_spec_v10.pdf

【讨论】:

  • 我可以使用什么协议来使用可以在 VLC 中播放的 FFMPEG 流式传输 MPEG-1 视频?
  • TS over UDP,RTP,也许是 SRT。
【解决方案2】:

使用 ffmpeg 流式传输 MPEG-1 视频:

ffmpeg -re -y -i out.ts -an -f rtp_mpegts rtp://127.0.0.1:1234

归功于:https://ffmpeg.org/pipermail/ffmpeg-user/2015-October/028879.html

(虽然源视频是 720p,但 VLC 中的流看起来像 360p 并且没有音频流,任何想法将不胜感激)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-04-16
    • 1970-01-01
    • 2016-07-29
    • 1970-01-01
    • 2016-06-13
    • 2018-06-29
    • 2017-11-07
    • 2020-02-19
    相关资源
    最近更新 更多