GNOME Bugzilla – Bug 320072
[matroskamux] needs better handling of VBR input
Last modified: 2007-03-02 17:30:30 UTC
Scenario: filesrc location=vbr.mp3 ! mad ! vorbisenc ! matroskamux ! filesink At some point at the beginning matroskamux sends a duration query upstream to query the total duration for the headers. At this point mad might not necessarily have a good approximate value for the total duration yet, not to mention an exact value, so matroskamux stores a way-off duration value in its header. I wonder if that can be improved somehow. flacenc for example makes downstream (filesink) seek back to the beginning of the file at EOS and overwrites the previous header values with more accurate headers. Maybe matroskamux can do that as well? Or maybe we can append an index from which the demuxer can then deduce the real length? Cheers -Tim
Erm, the above pipeline lacks an audioconvert element of course ;)
In the moment, matroska muxer uses seeking really extensively (I was thinking about some redesigning this behavior when I was porting the muxer, but thyen I decided it is better to start with something that is known to work and refactor the code later). So I think the best solution for now is to take the "flacenc approach". I will think about it and provide a patch.
This feature is already implemented. Matroskamux rewrites total duration at the end of muxing.
> This feature is already implemented. Matroskamux rewrites total duration at the > end of muxing. Excellent, will close this then.