FFmpeg RTP streaming error

Searush picture Searush · Aug 17, 2012 · Viewed 13.8k times · Source

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.

Answer

Camille Goudeseune picture Camille Goudeseune · May 9, 2013

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 .)