[Libav-user] rtp h264 stream too fast

adreas Polyxronopoulos apolyxrono at yahoo.co.uk
Mon Nov 14 14:59:14 CET 2011


Hi all,

i have a yuv420p(352x2880 at 10fps) file and i am trying to encode it and stream it in rtp using the following ffmpeg-cmd:

ffmpeg  -re -s 352x288 -f rawvideo -pix_fmt yuv420p  -r 10 -i sample_352x288 at 10_YUV420p.yuv -an  -vcodec libx264  -preset fast -profile baseline -threads 0 -r 10 -s 352x288 -b:v 200k -flags global_header  -f rtp rtp://127.0.0.1:9999 ;

I managed to play the rtp-stream with mplayer using as input the sdp info created from the previous command. (mplayer sdp:// stream.sdp)

However when i am trying to do the same task using libav* and the muxing.c in examples dir, i have the following problems:

1) I can not set the profile, level and some other options for h624 encoder using av_set_opt(), i got SegmentationFault, but i have added as a ticket in ffmpeg-bug report system with ticket_id: 650
    and i passed this problem setting the desired options from within X264_init().

2) The duration of the file is 52.6 sec (526 total frames @ 10 fps),  in the above ffmpeg command the -re option forces ffmpeg to read the file in native frame rate at 10fps. How can i do this from my source code ? Should i implemented and how ? Is there any value to set in any libav structure ?

thanks in advance
 
andreasP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20111114/29f4e3ad/attachment.html>


More information about the Libav-user mailing list