FFMpeg RTP流错误 [英] FFMpeg RTP streaming error

查看:436
本文介绍了FFMpeg RTP流错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想通过FFMpeg广播视频文件,但是我收到错误:


I want to broadcast a video file via FFMpeg , but I get error:


RTP muxer中只支持一个流

Only one stream supported in the RTP muxer

当我写这个错误时,我收到这个错误:

I get that error when i write this:


ffmpeg.exe -i SomeVideo.mp4 -f rtp rtp://127.0.0.1:11111

ffmpeg.exe -i SomeVideo.mp4 -f rtp rtp://127.0.0.1:11111

我不知道怎么了。

请帮助。

I don't know what's wrong.
Please, help.

推荐答案

您的ffmpeg命令创建两个流,一个用于视频,一个用于音频。
这样做:

Your ffmpeg command creates two streams, one for video, one for audio. Do this instead:

ffmpeg -re -i SomeVideo.mp4 -vcodec copy -an -f rtp rtp://127.0 .0.1:11111 -vn -acodec copy -f rtp rtp://127.0.0.1:11112

端口 11111 然后有没有音频的视频( -an )。

Port 11111 then has video without audio (-an).

端口 11112 然后没有视频的音频( -vn )。

Port 11112 then has audio without video (-vn).

每个流,例如 ffplay rtp://127.0.0.1:11112

(其中一部分来自来自 http://lucabe72.blogspot.com/2010/的建议04 / rtp-streaming-with-ffmpeg.html 。)

(Part of this comes from advice at http://lucabe72.blogspot.com/2010/04/rtp-streaming-with-ffmpeg.html .)

这篇关于FFMpeg RTP流错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆