We have found that av_seek_frame does not seek correctly with certain MXF media. (I will be uploading sample media as soon as this bug is registered). The file that we have been using for testing has burnt-in timecode so we can see the exact frame that is being seeked to. Using FFMPEG.exe with the following arguments: ffmpeg -y -ss 15.133 -i "av_seek_frame_failure.mxf" "av_seek_frame_failure_1.jpg" ...goes through av_seek_frame and yields an image showing a timecode of 01:00.14:27, which is incorrect. However, using the following arguments (note -ss parameter is after -i parameter): ffmpeg -y -i "av_seek_frame_failure.mxf" "av_seek_frame_failure_2.jpg" -ss 15.133 ...does not use av_seek_frame because the -i argument is processed first. Instead, it traverses the file frame-by-frame, taking several seconds to do so, and yields an image showing a timecode of 01:00.15:00, which is correct. With this short sample media the difference is only a couple of frames. With longer media the difference is much greater (eg. more than five minutes out if seeking to thirty minutes into one of our test clips!). Traversing the entire file always gives the right result, but is very slow (several minutes for that same test clip). av_seek_frame is suitably fast, but does not give correct results. As noted, I will be uploading sample media immediately. In the meantime and FYI, here is the ffmpeg.exe output for the first command, using av_seek_frame and yielding incorrect results: FFmpeg version SVN-r20761-snapshot, Copyright (c) 2000-2009 Fabrice Bellard, et al. built on Dec 8 2009 14:07:06 with gcc 4.2.1-sjlj (mingw32-2) configuration: --enable-shared --disable-static --enable-memalign-hack --enable-w32threads libavutil 50. 5. 1 / 50. 5. 1 libavcodec 52.42. 0 / 52.42. 0 libavformat 52.41. 0 / 52.41. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0. 7. 2 / 0. 7. 2 [mxf @ 0x44e6d0]MAX_READ_SIZE:5000000 reached Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (30000/1001) Input #0, mxf, from 'av_seek_frame_failure.mxf': Duration: 00:00:31.16, start: 0.000000, bitrate: 56303 kb/s Stream #0.0: Video: mpeg2video, yuv422p, 1920x1080 [PAR 1:1 DAR 16:9], 50000 kb/s, 29.97 tbr, 29.97 tbn, 59.94 tbc Stream #0.1: Audio: pcm_s16be, 48000 Hz, 8 channels, s16, 6144 kb/s Output #0, image2, to 'av_seek_frame_failure_1.jpg': Stream #0.0: Video: mjpeg, yuvj420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding [mpeg2video @ 0x457b90]mpeg_decode_postinit() failure Error while decoding stream #0.0 Error while decoding stream #0.0 Last message repeated 1 times [mpeg2video @ 0x457b90]warning: first frame is no keyframe [image2 @ 0x1c70050]Could not get frame filename from pattern av_interleaved_write_frame(): I/O error occurred Usually that means that input file is truncated and/or corrupted. ...and here is the ffmpeg.exe output for the second command, which does not use av_seek_frame and yields the correct result, but very slowly: FFmpeg version SVN-r20761-snapshot, Copyright (c) 2000-2009 Fabrice Bellard, et al. built on Dec 8 2009 14:07:06 with gcc 4.2.1-sjlj (mingw32-2) configuration: --enable-shared --disable-static --enable-memalign-hack --enable-w32threads libavutil 50. 5. 1 / 50. 5. 1 libavcodec 52.42. 0 / 52.42. 0 libavformat 52.41. 0 / 52.41. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0. 7. 2 / 0. 7. 2 [mxf @ 0x1b1e6d0]MAX_READ_SIZE:5000000 reached Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (30000/1001) Input #0, mxf, from 'av_seek_frame_failure.mxf': Duration: 00:00:31.16, start: 0.000000, bitrate: 56303 kb/s Stream #0.0: Video: mpeg2video, yuv422p, 1920x1080 [PAR 1:1 DAR 16:9], 50000 kb/s, 29.97 tbr, 29.97 tbn, 59.94 tbc Stream #0.1: Audio: pcm_s16be, 48000 Hz, 8 channels, s16, 6144 kb/s Output #0, image2, to 'av_seek_frame_failure_2.jpg': Stream #0.0: Video: mjpeg, yuvj420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding [mpeg2video @ 0x1b27b90]warning: first frame is no keyframe Last message repeated 1 times -0.kB time=10000000000.00 bitrate= -0.0kbits/s [image2 @ 0x1cb94c0]Could not get frame filename from pattern av_interleaved_write_frame(): I/O error occurred Usually that means that input file is truncated and/or corrupted.