[FFmpeg-devel] matroska file hits eof on any seek

Pavel Koshevoy pkoshevoy at gmail.com
Sat Feb 18 09:35:37 CET 2012


On 2/18/2012 1:06 AM, Reimar Döffinger wrote:
>
> On 18 Feb 2012, at 08:58, Pavel Koshevoy<pkoshevoy at gmail.com>  wrote:
>
>> On 2/17/2012 11:41 AM, Reimar Döffinger wrote:
>>> On Fri, Feb 17, 2012 at 11:15:23AM -0700, Pavel Koshevoy wrote:
>>>> On 2/17/2012 10:51 AM, Reimar Döffinger wrote:
>>>>> Also, if intra refresh is used then it is possible that there
>>>>> is not one single IDR slice even in a multi-hour video that can
>>>>> be seeked to any place without any issue.
>>>> Can you suggest how I should handle this situation?
>>> If you look at libavcodec/h264_parser.c you'll find
>>> what FFmpeg does.
>>> For this case: Parse the recovery SEI and check
>>> recovery_frame_cnt. In that case probably all frames should be
>>> marked as keyframes.
>> Actually, this file doesn't appear to have any SEI NAL units.  At least I couldn't find any using my very basic NAL parser.  I also didn't see any mention of them with ldecod (H.264 reference implementation http://iphome.hhi.de/suehring/tml/download/)
> I didn't investigate in that much detail, but did you look in extradata? (not sure what the mkv term for that is).


I am not sure if you are referring to CodecPrivate data or not, but I 
believe that in matroska it is an AVC Decoder Configuration Record (from 
ISO/IEC
14496-15), it includes an SPS and PPS, but does not include SEI.  Also, 
this file does not use matroska header stripping for frame compression, 
so it isn't there either.

I don't believe this is an intra-only coded file.  According to ldecod 
there are mostly P, B, and b slices, with an IDR slice thrown in 
periodically.

Hope this helps,
     Pavel.



More information about the ffmpeg-devel mailing list