[FFmpeg-devel] H.264 RTP

Luca Abeni lucabe72
Thu Jan 31 10:54:22 CET 2008


Richard Haywood wrote:
> I am new to using ffmpeg and have tried emailing the ffmpeg user list and
> they have no more suggestions.  I've tried to have a look though the code,
> but wondered if anyone else has the same problem and is trying to solve the
> problem already.

There are various unrelated issues here:

> Client:
> gdb ./ffmpeg_g
> (gdb) r -i rtp:// -f mp4 out.mp4
This command line is wrong. If you want to receive RTP traffic, you must
provide an SDP file (note that ffmpeg prints an SDP when streaming to
RTP. You have to cut'n'paste it into a .sdp file).
The correct command line would be
./ffmpeg -i myfile.sdp -f mp4 out.mp4
(this is a user list issue... I am surprised to see that noone answered
this question there).

> At the server I am using:
> ./ffmpeg -f vob -i test.VOB -an -vcodec libx264 -f rtp rtp://
This is also wrong (and is another user issue). You are missing a "-re" option.
Without it, ffmpeg will ouptut RTP packets as fast as possible, making the
stream unplayable. The correct command line should be
./ffmpeg -re -f vob -i test.VOB -an -vcodec libx264 -f rtp rtp://

3) Finally, there is a bug in the SDP demuxer in libavformat, which assumes
that all the RTP streams described in an SDP file are sent over multicast.
In your case, you are streaming to an unicast address, so "ffmpeg -i file.sdp ..."
will fail.
Since you are posting to ffmpeg-devel, I assume that you are willing to fix
this bug ;-)

I posted a workaround for this problem some time ago; you can search the
mailing list for my patch, but it is outdated and it probably does not apply
to current svn. So, you will have to refresh (or to rewrite) that patch.
Also, note that my old patch is just a quick hack, not a real solution
that can be committed to svn. So, you will have to work on it a little bit.


More information about the ffmpeg-devel mailing list