Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#1293 closed defect (invalid)

ffmpeg unable to parse matroska file with a large lace (250 frames)

Reported by: Pavel Koshevoy Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: mkv vorbis
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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.

Attachments (2)

5th_30-vorbis.mka (359.8 KB ) - added by Pavel Koshevoy 11 years ago.
this file doesn't play, it has 250 frames in a lace, vorbis audio
5th_30-mp3.mka (355.3 KB ) - added by Pavel Koshevoy 11 years ago.
this file plays but doesn't seek, it has 241 frames in a lace, mp3 audio

Download all attachments as: .zip

Change History (5)

by Pavel Koshevoy, 11 years ago

Attachment: 5th_30-vorbis.mka added

this file doesn't play, it has 250 frames in a lace, vorbis audio

by Pavel Koshevoy, 11 years ago

Attachment: 5th_30-mp3.mka added

this file plays but doesn't seek, it has 241 frames in a lace, mp3 audio

comment:1 by mbradshaw, 11 years ago

Resolution: invalid
Status: newclosed

comment:2 by mbradshaw, 11 years ago

Closed as invalid after talking with Pavel. It's a muxer problem, not an FFmpeg problem.

comment:3 by Carl Eugen Hoyos, 10 years ago

Keywords: mkv added; matroska lave removed
Note: See TracTickets for help on using tickets.