View Full Version : Wavpack in avi?
HJRodrigo
28th June 2008, 06:49
Can a wavpack audio track be muxed in an avi file? I have been using uncompressed wav's with all my captures in vdub but I now want to compress them in a lossless format and everone seems to suggested that wavpack is the best.
GodofaGap
28th June 2008, 07:03
I don't know if it impossible, but it's not possible right now.
You can use Wavpack or FLAC with Matroska.
LoRd_MuldeR
28th June 2008, 13:34
Well, you can mux almost everything into AVI, including VBR audio. The question is whether any application will be able to extract it properly ;)
Therefore I would stay away from "unusual" audio formats in AVI ...
HJRodrigo
28th June 2008, 15:59
Thanks, I as worried that was the case. I take it that a vwf wavpack codec would be needed to be developed? So even ffmpeg supporting wavpacks is still no help :( ?
LoRd_MuldeR
28th June 2008, 16:19
Thanks, I as worried that was the case. I take it that a vwf wavpack codec would be needed to be developed? So even ffmpeg supporting wavpacks is still no help :( ?
Well, if ffmpeg is able to write wavpack streams into an AVI container, you could do that. Of course.
But still the question: Which player will be able to play this properly?
The player would need two things:
1. An AVI splitter (demuxer) that is able to get the wavpack stream out of the AVI container
2. A wavpack decoder that is able to process the wavpack stream
I don't know if MPlayer or VLC can do that :confused:
Also I don't know if it could be done with a DirectShow-based player, such as Media Player Classic:
Could the DirectShow AVI Splitter handle the wavpack stream? Is there a wavpack decoder-filter for DiretShow yet?
HJRodrigo
28th June 2008, 17:22
I only know of one Directshow wavpack decoder that is able to process the wavpack streams (Unless ffdshow tryout can?)
http://coreforge.org/projects/coredsf/
The splitter makes no mention of avi, but the changelog mentions Matroska.
If I was even able to get a wv in an avi, I guess ffdshow would be my primary hope of being able to play wavpacks in avi's with a DirectShow player?
Both Mplayer and videolan use FFmpeg, so I take it that it would be up to their splitters if they support wv in avi's :(
It is a shame no solution has been made, since wavpack seems to be the best choice for lossless audio in an avi.
LoRd_MuldeR
28th June 2008, 17:32
I only know of one Directshow wavpack decoder that is able to process the wavpack streams (Unless ffdshow tryout can?)
http://coreforge.org/projects/coredsf/
The splitter makes no mention of avi, but the changelog mentions Matroska.
Even if you had a DirectShow decoder-filter for wavpack, you would still need a suitable AVI spiltter (source-filter).
Also a wavpack source-filter (splitter) for ".wv" files isn't helpful here, because your source would be an AVI file, not a "raw" wavpack file.
DirectShow provides an AVI splitter by default. The big question is whether it will be able to handle wavpack streams properly.
I really can't say, because I have never seen wavpack audio in AVI...
I guess ffdshow would be my primary hope of being able to play wavpacks in avi's with a DirectShow player, if I was even able to get a wv in an avi?
ffdshow is an audio/video decoder. It is not a splitter! So no, it definitely can't help you.
Wavpack isn't support in ffdshow's audio-decoder anyway...
Both Mplayer and videolan use FFmpeg, so I take it that it would be up to their splitters if they support wv in avi's :(
Nope, neither MPlayer nor VLC Player use ffmpeg!
Instead MPlayer, VLC Player, ffmpeg and also ffdshow use the very same codec library, namely "libavcodec".
It is a shame no solution has been made, since wavpack seems to be the best choice for lossless audio in an avi.
AVI is an old container with a lot of limitations. Maybe there simply is no "proper" way to mux wavpack into AVI...
GodofaGap
28th June 2008, 18:18
I would simply use Matroska. Compatibility can't be a consideration when you are using WavPack anyway.
A well written AVI splitter shouldn't need anything special to deal with WavPack as long as it has a constant frame length (if not, you don't want to use AVI).
LoRd_MuldeR
28th June 2008, 18:37
A well written AVI splitter shouldn't need anything special to deal with WavPack as long as it has a constant frame length (if not, you don't want to use AVI).
That's what I meant with "Maybe there simply is no 'proper' way to mux wavpack into AVI". Nevertheless I think there is a way to mux audio-streams with variable frame length into AVI. You just have to use the same style that is used for video streams. AFAIK some splitters don't handle this well, but that is more an implementation problem of the splitter, not a problem of the AVI specs. Most splitters should work okay though. But some people still say VBR audio in AVI is a "dirty hack" and I definitely don't want start an AVI flamewar here. So this can't be considered a "proper" way...
GodofaGap
28th June 2008, 21:23
That's what I meant with "Maybe there simply is no 'proper' way to mux wavpack into AVI". Nevertheless I think there is a way to mux audio-streams with variable frame length into AVI. You just have to use the same style that is used for video streams.
Using empty chunks can work in some cases (say with NTSC Film and TV), but if the granularity required becomes too high the extra overhead caused can start to outweigh the compression benefit. It's not a bullet-proof method.
LoRd_MuldeR
28th June 2008, 21:32
I think there are two methods to store streams in AVI:
(1) store exactly one sample/frame per chunk - allows a variable sampe/frame size, because each chunk equals one frame/sample
(2) store several samples/frames per chunk - requires a constant sample/frame size, because the chunk must be cut into individual samples/frames
AFAIK method (1) is usually used for video streams, while method (2) is used for audio streams. And some splitters rely on that!
That's why VBR video streams are no problem, but VBR audio streams are not possible that easy.
Nevertheless you can store VBR audio streams in AVI by using method (1) for both, the audio and the video stream.
Whether such AVI's are legitimate or not is an open discussion...
So you won't need "empty" chunks/frames to store VBR streams in AVI. That would only be required to emulate VFR (Variable Framerate) in AVI.
Correct me if I'm mistaken here...
GodofaGap
28th June 2008, 21:40
So you won't need "empty" chunks/frames. That would only be required to emulate VFR (Variable Framerate) in AVI. Correct me if I'm mistaken here...
That's what I mean with a variable frame length (not variable frame size). Length as in time (in audio this means number of samples). Vorbis is a well-known format that uses this and for this reason you don't see many Vorbis-in-avi files. I don't know the situation with Wavpack, but it could be a major problem if it does.
LoRd_MuldeR
28th June 2008, 21:53
That's what I mean with a variable frame length (not variable frame size). Length as in time (in audio this means number of samples). Vorbis is a well-known format that uses this and for this reason you don't see many Vorbis-in-avi files. I don't know the situation with Wavpack, but it could be a major problem if it does.
I see. That makes sens of course :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.