Wavpack Hybrid is not muxed right #713

mbunkus opened this Issue Jan 24, 2015 · 2 comments

1 participant


Original reporter: Liisachan2@faireal.net

When muxing Wavpack Hybrid (WV+WVC), mkvmerge doesn't copy data from WVC properly. Apparently, mkvmerge copies a block from .wvc as a BlockAdditional only after it stores a corresponding block from WC as a matroska Block in a Cluster, and not after it stores the WV block as a SimpleBlock.

This results in a borked file, and possibly choppy playback if the player tried to use the "WVC" data.

A demo in the dos box on my Windows XP follows. This is so strange, but this is what I'm experiencing:

G:\test>wavpack -b160 -c test.wav <--random sample

WAVPACK Hybrid Lossless Audio Compressor Win32 Version 4.60.1
Copyright (c) 1998 - 2009 Conifer Software. All Rights Reserved.

created test.wv (+.wvc) in 0.17 secs (lossless, 60.18%)

G:\test>mkvmerge -o out.mka test.wv
mkvmerge v5.2.1 ('A Far Off Place') built on Jan 27 2012 20:24:36
'test.wv': Using the demultiplexer for the format 'WAVPACK'.
'test.wv': Also using the correction file 'test.wvc'.
'test.wv' track 0: Using the output module for the format 'WAVPACK4'.
The file 'out.mka' has been opened for writing.
Progress: 100%
The cue entries (the index) are being written...
Muxing took 0 seconds.

2012-01-31 14:05 295,559 out.mka <-- obviously too small
2012-01-31 14:04 249,352 test.wv
2012-01-31 14:04 453,146 test.wvc <-- because this data is supposed to be in mka

G:\test>mkvextract tracks out.mka 0:demuxed.wv
Extracting track 0 with the CodecID 'A_WAVPACK4' to the file 'demuxed.wv'. Container format: WAVPACK
Progress: 100%

G:\test>dir .wv
2012-01-31 14:08 249,352 demuxed.wv <-- demuxed right
2012-01-31 14:08 40,966 demuxed.wvc <-- too small (broken)
2012-01-31 14:04 249,352 test.wv <-- original wv
2012-01-31 14:04 453,146 test.wvc <-- original wvc

@mbunkus mbunkus self-assigned this Jan 24, 2015
@mbunkus mbunkus closed this Jan 24, 2015
@mbunkus mbunkus added the fixed label Jan 24, 2015

Original reporter: mbunkus

Should be fixed in revision 8177e74 and builds 402 and later from http://www.bunkus.org/videotools/mkvtoolnix/win32/pre/


Original reporter: Liisachan2@faireal.net

fixed confirmed in 402.
Additional info:
(1) The bug can be worked around in an unfixed version, with --engage no_simpleblocks, but then SimpleBlock is disabled in all tracks.
(2) It seems that on Windows, only Haali's splitter fully supports this type of file, somehow sending both WV and WVC data in Matroska to downstream, enabling lossless playback of hybrid Wavpack. Others (Gabest/MPC, MPC-HC, LAV) ignore BlockAdditional, playing hybrid Wavpack lossily, so this bug was not obvious with them. Wavpack support by LAV is still unstable and crashy anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment