FFMPEG流rtmp muliple流

发布于 2025-01-29 08:49:56 字数 495 浏览 7 评论 0原文

我有一个带有两个视频流的MPEG文件 #0:0 [0x27] YUV420P 352x288#0:1 [0x29] YUV420P 640x480

我正在尝试读取文件并将其发送出RTMP

ffmpeg -Stream_loop -1 -I myVideofile.mpg.mpg -f mpeg -f mpegtp mpegts udp:// localhost:// localhost:// localhost:// localhost:// localhost:// localhost:// localhost:// localhost:// 123456

要验证流正在流的流程,我使用ffplay

ffplay udp:// localhost:123456

我获得了视频,但这只是我期望的两个流之一。 640x480

我需要做一些事情来使两个流得到发送?

I have a mpeg file with two video streams stream
#0:0[0x27] yuv420p 352X288
and
#0:1[0x29] yuv420p 640X480

I am trying to read the file and send it out rtmp

ffmpeg -stream_loop -1 -i myvideofile.mpg -f mpegts udp://localhost:123456

To verify the stream is streaming I use ffplay

ffplay udp://localhost:123456

I get the video, but it is only one of the two streams I am expecting. the 640x480

Is there something that I need to do to make both streams get sent?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冷︶言冷语的世界 2025-02-05 08:49:56

要重新映射所有流,您必须通过-MAP0。

ffmpeg -Stream_loop -1 -i myVideofile.mpg -mpg -map 0 -f mpegts udp:// localhost:123456

To remap all streams you have to pass -map 0.

ffmpeg -stream_loop -1 -i myvideofile.mpg -map 0 -f mpegts udp://localhost:123456

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文