I want to broadcast a video file via FFMpeg , but I get 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.
Please, help.
解决方案
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.