FFmpeg RTP streaming error [closed]

≡放荡痞女 提交于 2019-12-04 12:26:12

问题


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

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

I don't know what's wrong.


回答1:


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

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

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

Read each stream with, e.g., ffplay rtp://127.0.0.1:11112.

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



来源:https://stackoverflow.com/questions/12007882/ffmpeg-rtp-streaming-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!