<div dir="rtl"><div style="direction: ltr;">I don't have b-frames in the stream, and anyway, since I do the decoding myself, and not through the libav, I want it to leave the logic to me and just pass everything as it arrives. Is there anyway to cause it to work that way?</div>
<div style="direction: ltr;"><br></div><div style="direction: ltr;">Carmel</div><br><div class="gmail_quote"><div dir="ltr">2011/7/25 Alex Cohn <span dir="ltr"><<a href="mailto:alexcohn@netvision.net.il">alexcohn@netvision.net.il</a>></span></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr"><div class="im">On Monday, July 25, 2011, כרמל מגן <<a href="mailto:carmel.work@gmail.com" target="_blank">carmel.work@gmail.com</a>> wrote:<br>
> I have investigated the matter some more, and it seems that the delay is exatcly 2 frames (its 80 ms when I use PAL 25 fps video and 66 ms when I  use NTSC 30 fps video). Furthermore, it appears when sending frames 1,2,3 av_read_frame does not return with frame 1 before I start sending frame 3. Does anybody have an idea why this might happen and how I can prevent it?<br>

> Thanks<br>> Carmel<br><br></div>The stream has a setting of max b-frames. If you can control your source, simply set th his parameter to 0. Otherwise, you can work around the delay produced by libav, but when the b-frame actually arrives, you will have to wait, anyway. The behavior of libav is tuned to provide smooth playback with constant delay.<br>

<br>Regards,<br><font color="#888888">Alex</font><div><div></div><div class="h5"><br><br>> 2011/7/19 כרמל מגן <<a href="mailto:carmel.work@gmail.com" target="_blank">carmel.work@gmail.com</a>><br>>><br>>> Hello<br>
>> I have been integrating mpeg2 transport stream support into an application I'm developing using libavformat.<br>
>> After successfully transmitting my video (h.264 frames encoded by the calling application) and receiving it, I did some latency testing. <br>>> To my surprise, I calculated 80 ms between the time that I finished sending the frame in one process (av_write_frame returns) until I finish receiving it in the second process (av_read_frame returns and the packet contains the same frame).<br>

>> To identify the frame I used the pts field of the packet. (i.e I printed the time when sending together with the pts of the frame, and then the time of receiving together with the pts of the frame, and then calculated the difference).<br>

>> This was tested using multicast transmission between 2 processes on the same computer (on two different machines sitting on different networks) so I don't believe network latency can account for it.<br>>> Can anybody explain what might be taking all that time and how I can reduce it? My application demands very low latency.<br>

>> Thanks<br>>> Carmel
</div></div></div><br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br></div>