[FFmpeg-trac] #1293(undetermined:new): ffmpeg unable to parse matroska file with a large lace (250 frames)
FFmpeg
trac at avcodec.org
Wed May 9 22:09:14 CEST 2012
#1293: ffmpeg unable to parse matroska file with a large lace (250 frames)
-------------------------------------+-------------------------------------
Reporter: pkoshevoy | Type: defect
Status: new | Priority: normal
Component: | Version: git-
undetermined | master
Keywords: matroska | Blocked By:
vorbis lave | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Per Matroska spec the absolute limit on the number of frames in a lace is
256 (max unsigned char + 1).
In my Matroska muxer I try to cram as many audio frames into the lace as I
can before the next video frame comes along, then I start a new
SimpleBlock (and new lace obviously). However, when processing an audio
only compression there are no video frames available to prevent the audio
lace from growing too large. That is how I've made a 30 second MKA file
with Vorbis audio, where 250 frames are stuffed into a single SimpleBlock
in a lace.
When I attempt to play this file with my ffmpeg based video player it
sounds like a bunch of skips and pops and playback ends prematurely.
Media Player Classic does the same.
Strangely, if I use MP3 codec instead of Vorbis the file plays fine,
although you can't seek it because it has just one SimpleBlock with 241
frames.
I understand that putting too many frames into a lace is bad for seeking.
As a workaround on my end I limited my muxer to output at most 8 frames
per SimpleBlock, and this has fixed the problem for me.
However, I think ffmpeg needs to be robust enough to handle a file with
large (yet valid) number of frames in a lace.
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1293>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list