[FFmpeg-devel] matroska file hits eof on any seek
Reimar.Doeffinger at gmx.de
Sat Feb 18 09:06:28 CET 2012
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).
> Also, I was not able to extract the h264 bytestream from the mkv file, not until I remuxed it with yamkaRemux. I would have expected that to work at least.
As said, the parser is currently disabled, so it thinks there are no keyframes.
You will need -copyinkf (or something like that, not sure about the spelling, but the meaning is "copy initial non-keyframes").
More information about the ffmpeg-devel