HydrogenAudio

Lossless Audio Compression => WavPack => Topic started by: _m²_ on 2012-02-05 20:21:15

Title: Feature request: multiple streams per file
Post by: _m²_ on 2012-02-05 20:21:15
I'm about to move from 1 file / track to 1 file / disc scheme.
It works great with CDs, but not with DVDs (and I guess BDs too) because they often have separate stereo and multichannel streams, so I have to use 2 files anyway.
How about support for putting them together? (And maybe compressing together?)
Title: Feature request: multiple streams per file
Post by: bryant on 2012-02-07 19:58:07
I’m not sure exactly how this would work with standard WavPack. Since the WAV file format has no support for this, I guess that the source would have to be two separate audio streams/files, and on decoding there would have to be some indication to only decode the desired sub-stream. This would require some API changes to the WavPack library and probably break compatibility with existing players.

However, it looks like RF64 supports having a separate stereo downmix, so if and when that format gets incorporated into WavPack, it should be possible (although it would still require players to be aware of it). I will definitely consider this when I implement those newer formats (I have only done CAF so far which does not have this feature).
Title: Feature request: multiple streams per file
Post by: Kohlrabi on 2012-02-07 20:16:25
I think it is out of the scope of WavPack to provide a general multimedia container format, so I recommend using the multimedia container format Matroska (http://matroska.org/) for something like this, since it is its intended purpose to allow multiplexing of multimedia streams. mkvtoolnix/mkvmerge(GUI) (http://www.bunkus.org/videotools/mkvtoolnix/) handles WavPack files just fine. Main problem is the playback of those files: While, for example, foobar2000 (http://www.foobar2000.org/) will play the main track just fine, I it is impossible to access the additional audio streams. You'd have to use a full-fledged multimedia (video) player for that. A solution for that problem would be to append all the input files, which can be done with mkvmerge(GUI), and create a chapter layout with a chapter for every track/stream. Then foobar2000 will be able to play every chapter, since it supports Matroska chapters. Shoot (PM) if you need any more pointers.
Title: Feature request: multiple streams per file
Post by: _m²_ on 2012-02-07 20:47:40
Kohlrabi, you made me think...While I still think it would be useful to have it in wavpack, the need seems to be much lower than I thought.
In fact I didn't mention one of other problems that I have with DVD-As because it was clearly not Wavpack's business - bonus videos.

I'll explore the option of using video containers. Foobar compatibility is unnecessary. Amarok is more like it.