It's a bit complicated to post the code. However, I did try to init the parameters on the encoder side, it didn't seem to do tny good.
Carmel 2011/7/27 Alex Cohn <[email protected]> > On Wed, Jul 27, 2011 at 17:23, כרמל מגן <[email protected]> wrote: > >> I am sending and receiving h.264 video on mpeg2-ts over udp. >> After noticing some lag, I added code that prints a timestamp and >> framenumber after sending and after av_read_frame returns. when comparing >> timestamps between frames with the same frame number, there is a ~60 ms >> delay (when sending 30 fps). Furthermore, if I stop at a breakpoint and >> delay the sending of frame number X, the timestamp of receiving frame number >> X-2 corresponds to the time of sending of X (i.e., the time between >> receiving frame number X-3 and frame number X-2 is longer if I delay the >> sending of X longer). The unavoidable conclusion is that av_read_frame *does >> not return* with frame X-2 until frame X starts arriving. >> > > av_read_frame takes an AVFormatContext* as the first parameter. How did you > create this object on the receiver side? Can you post the relevant code > snippet? > > And I still suspect that your sender used msx_b_frames == 2 when it > initialized the AVCodecContext* encoderContext for avcodec_open(). > > Cheers, > Alex > > _______________________________________________ > Libav-user mailing list > [email protected] > http://ffmpeg.org/mailman/listinfo/libav-user > >
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
