<br><br><div class="gmail_quote">On Thu, Jul 19, 2012 at 9:47 PM, Michael Bradshaw <span dir="ltr"><<a href="mailto:mbradshaw@sorensonmedia.com" target="_blank">mbradshaw@sorensonmedia.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Visually, things look ok (aside from the frame being ~1.5 seconds<br>
after the requested time), but I think that's because ffmpeg just<br>
keeps reading and decoding until it gets a full frame out, and it<br>
won't do that until it hits a keyframe, and that it's disguising the<br>
fact that it's not seeking to a keyframe (or maybe that a packet's<br>
.flags value is lying). But I could be misunderstanding something.<br>
<br></blockquote><div><br></div><div>Thats the whole problem here. The seek code is horrible, and the decoders have to pick up the slack and ensure they only recover from a keyframe.</div><div>Sadly people around here will usually say "but it works when i use the ffmpeg application", but thats not the only place avformat and avcodec are used. :p</div>
<div><br></div><div>If you want to do accurate seeks with only avformat, you have to add a lot of boilerplate on top of it right now - or if you want to do accurate seeks even with ffmpeg. Sure, if you tell it to seek, it'll output an image, but it won't be the image at the time you specified, it'll very likely be at a later point in time.</div>
</div>