[FFmpeg-devel] x264 encoding over RTP and playing in VLC

Luca Abeni lucabe72
Fri Jun 11 11:44:48 CEST 2010


On 06/11/2010 11:38 AM, Luca Barbato wrote:
> On 6/11/10 10:50 AM, Dominik Tomczak wrote:
>> Hello
>>
>> I'm developing my own software for encoding the raw RGB24/32 video
>> into x264
>> and stream it using RTP to VideoLanPlayer (VLC). I use libavcodec and
>> libavformat. The problem is that I can play the video correctly neither
>> using ffmpeg tool nor using my tool.
>> Could you point me to some samples of ffmpeg code where x264 encoding and
>> RTP muxing is done?
>> When I use ffmpeg with command line:
>>
>> ffmpeg -i c:/movie.avi -an -vcodec libx264 -vpre normal -b 1000k -f rtp
>> rtp://127.0.0.1:5000/
>
> h264 in rtp requires you to put the extradata in the sdp

No, in-band extradata works ok too (SPS and PPS are just included in the
stream, and the player can succesfully play it). AFAIR, DVB-H even
recommended such a solution (ISMA and other standards mandated out-of-band
global headers, but AFAIK no RFC requires that).

Anyway, just try the command line above (adding "-re"), and you will see
that it works.


			Luca



More information about the ffmpeg-devel mailing list