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

Pavel Koshevoy pkoshevoy at gmail.com
Sat Feb 18 08:58:42 CET 2012


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/)

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.

$> ffmpeg -i bad_seek_matroska_eof.mkv -c:v copy -vbsf h264_mp4toannexb 
-an blah.h264

ffmpeg version N-36635-gceb0dd9 Copyright (c) 2000-2012 the FFmpeg 
developers
   built on Jan  9 2012 17:49:17 with gcc 4.6.2
   configuration: --disable-static --enable-shared --enable-gpl 
--enable-version3 --disable-w32threads --enable-runtime-cpudetect 
--enable-avisynth --enable-bzlib --enable-frei0r 
--enable-libopencore-amrnb --enable-libopencore-amrwb 
--enable-libfreetype --enable-libgsm --enable-libmp3lame 
--enable-libopenjpeg --enable-librtmp --enable-libschroedinger 
--enable-libspeex --enable-libtheora --enable-libvo-aacenc 
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx 
--enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
   libavutil      51. 34.100 / 51. 34.100
   libavcodec     53. 54.100 / 53. 54.100
   libavformat    53. 29.100 / 53. 29.100
   libavdevice    53.  4.100 / 53.  4.100
   libavfilter     2. 58.100 /  2. 58.100
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0.  6.100 /  0.  6.100
   libpostproc    51.  2.100 / 51.  2.100
Input #0, matroska,webm, from 'bad_seek_matroska_eof.mkv':
   Metadata:
     title           : 
Backstreet.Boys.Live.From.O2.Arena.2008.HDTVRip.1080p.-VoLoNa by 
HDTVshek.HET
   Duration: 00:01:50.84, start: 0.000000, bitrate: 7683 kb/s
     Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x1080 [SAR 1:1 
DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
     Metadata:
       title           : 
Backstreet.Boys.Live.From.O2.Arena.2008.HDTVRip.1080p.-VoLoNa
     Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), s16, 384 kb/s 
(default)
     Metadata:
       title           : AC3 5.1 at 384Kbps
Output #0, h264, to 'blah.h264':
   Metadata:
     title           : 
Backstreet.Boys.Live.From.O2.Arena.2008.HDTVRip.1080p.-VoLoNa by 
HDTVshek.HET
     encoder         : Lavf53.29.100
     Stream #0:0(eng): Video: h264, yuv420p, 1920x1080 [SAR 1:1 DAR 
16:9], q=2-31, 23.98 fps, 90k tbn, 23.98 tbc (default)
     Metadata:
       title           : 
Backstreet.Boys.Live.From.O2.Arena.2008.HDTVRip.1080p.-VoLoNa
Stream mapping:
   Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=    0 fps=  0 q=-1.0 Lsize=       0kB time=00:00:00.00 bitrate=   
0.0kbits/s
video:0kB audio:0kB global headers:0kB muxing overhead -1.#IND00%
Output file is empty, nothing was encoded (check -ss / -t / -frames 
parameters if used)



More information about the ffmpeg-devel mailing list