Shoutbox

Audio extraction without recompressing? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Audio extraction without recompressing? (/showthread.php?tid=23296)

Audio extraction without recompressing? by sock on 04-04-2004 at 04:11 AM

(Also posted on the Winamp.com Forums)

Hello! :)

Umm... does anyone know of a way to extract the audio stream out of a WMV file, without recompressing (re-encoding) it?

The audio codec is Windows Media Audio V8 (128 kbps, 44 kHz, stereo) and the video codec is Windows Media Video V7.

I tried Microsoft's Windows Movie Maker and Windows Media Encoder 9 Series, both can't do it. I also tried VirtualDub and VirtualDubMod, but they both can't work with WMV files because of legal issues. :(

This thing seems so trivial, it's actually simpler to extract the compressed audio stream than decompress and compress it again. All you have to do is copy the audio data to a new file and add a header or something. You'd expect many apps to be capable of doing that... but no. They all have to recompress! :@

So why won't I recompress, you ask? Firstly, it just freakin' ticks me off having to do something that is entirely unnecessary (recompressing). Secondly, recompressing a lossy format is never a good thing to do, the quality degrades.

This is so frustrating... Please, come to my rescue.

Thanks a bunch! :)


RE: Audio extraction without recompressing? by Guido on 04-04-2004 at 04:22 AM

Errr... if I understand correctly what you want to do... you can extract the audio on Wav, Mp3, another WMA or many other audio formats from a Windows Media file (wma/wmv/asf...) with DBpoweramp


RE: Audio extraction without recompressing? by sock on 04-04-2004 at 07:48 PM

Thanks 'FD:), but I'm afraid that's no good.... That program does two things:

- Decompresses (decodes) the audio stream from the WMV file using a WMA codec, which produces a Wave file;
- Compresses (encodes) the raw audio stream using a codec and format of my choice.

I don't want that. It involves recompressing a lossy data stream, which degrades its quality. What I want is a program that does this:

- Extracts the compressed (encoded) WMA audio stream from the video file without decoding it, and saves it to a new WMA file (with an appropriate file header, I suppose).


RE: Audio extraction without recompressing? by Guido on 04-04-2004 at 08:30 PM

Oh, I get it :P

Well, apart from extracting it to a wav, I can't think of any way to split up the audio from the video without losing quality after recompressing it :-/


RE: Audio extraction without recompressing? by M-Head on 04-04-2004 at 09:00 PM

I doubt the quality would suffer that much, would it?


RE: Audio extraction without recompressing? by Concord Dawn on 04-04-2004 at 09:25 PM

I don't think that it would.


RE: Audio extraction without recompressing? by Guido on 04-04-2004 at 10:47 PM

quote:
Originally posted by M-Head
I doubt the quality would suffer that much, would it?
I don't either, but Sock's like that :banana:
RE: Audio extraction without recompressing? by sock on 04-04-2004 at 11:03 PM

Blah.... :p

Any audiophile will tell you that recompressing data that's been compressed using a lossy codec is a bad idea. The quality will always degrade somewhat (depending on how you recompress the data and how it was compressed before). But even if you take an MP3 that's compressed at 64 KBPS and recompress it at 320 KBPS, the quality will not improve. The source compression can never be exceeded by the new one, and is most likely to be in better quality.

And besides, it's such a waste! Why degrade the quality? Why decompress the audio, and then compress it again?? Why?!? It's already there, perfectly compressed! :'(

Well anyway, it looks like no software can do it (stupid WMV!:blah:), so I guess I'm forced to recompress... :(


RE: Audio extraction without recompressing? by M-Head on 04-05-2004 at 09:28 AM

I know, but is the quality loss really that noticable?


RE: Audio extraction without recompressing? by Anubis on 04-05-2004 at 10:03 AM

When I rip CD's to 192kbps MP3's so I can listen to them on my comp I don't notice any difference. So the quality reduction really shouldn't be anywhere near noticeable...man sock you're a perfection freak!


RE: Audio extraction without recompressing? by CookieRevised on 04-05-2004 at 10:34 AM

Many people can here the difference.
And I can understand Sock's wishes perfectly... I also want things as perfect as possible... (and that's why I'll create a new thread with something related to soundfiles)

Anyways... saving to a normal wav doesn't compress the audio again. (Unless you use some special filters and stuff or decreases the bitrate and such of course). Saving the uncompressed audio stream is also useless. You wouldn't have anything to play it with. It needs to be recoded (but not nessecairly recompressed) into a new codec. So, if you keep the bitrates, samplerates, etc... and you save to wav, nothing is lost... as far I can tell...


RE: Audio extraction without recompressing? by sock on 04-06-2004 at 01:53 AM

quote:
Originally posted by M-Head
I know, but is the quality loss really that noticable?
Well, with a Lame-encoded MP3 at 192 KBPS it isn't that noticeable, however it's never bad to crave for the better. And again, it's not just the quality that bothers me, it's also the stupidness and wastage behind the idea of having to recompress. It bothers me fundamentally.



quote:
Originally posted by anubis_kree_
When I rip CD's to 192kbps MP3's so I can listen to them on my comp I don't notice any difference. So the quality reduction really shouldn't be anywhere near noticeable...man sock you're a perfection freak!
That's different. Audio CD data has a very large size, so compressing it is something you'd want to do. In my case, the audio is already highly compressed. Also, audio CD data is in a very high quality, so you can compress it very efficiently. When recompressing data (with lossy codecs), some quality is always lost.



Now to answer Cookish... :p

Well, you're not making much sense..... :p Let's get a few things straight:

Wave (.wav) files use PCM (Pulse-Code Modulation) to store digital audio data (audio CDs use it too). PCM is a standard digital audio representation system. This system uses no compression, so 128 KBPS at PCM sounds like total crap. :p

If I really wanted to preserve the quality at any cost, I'd have to save the audio at the standard PCM bitrate (1440 KBPS or something:p), and either leave it that way (as a .wav file) or use a lossless audio codec (such as FLAC) to recompress the data without losing any quality. Using a lossless codec would still generate a pretty big file size, since lossless codecs don't discard any data. So in both cases, I get a big file size (in my case, ~28mb on PCM and ~17mb on FLAC), which isn't very nice. :p In comparison, at the original 128 KBPS WMA compression, the audio size is only ~2.6mb.

Now let's review your post! :banana:

quote:
Anyways... saving to a normal wav doesn't compress the audio again. (Unless you use some special filters and stuff or decreases the bitrate and such of course).

True, but it generates a huge file. A lossless audio codec can help there, but it's still pretty big, as I mentioned above. :p


quote:
Saving the uncompressed audio stream is also useless. You wouldn't have anything to play it with.

When I said "uncompressed audio stream", I was referring to PCM data. So this is the same thing as above really.


quote:
It needs to be recoded (but not nessecairly recompressed) into a new codec.
The whole point of media codecs is to compress/decompress the data. There's no media codec that doesn't (de)compress. If I want it uncompressed, I can put the raw decompressed audio data in a PCM (.wav) file, which is again the same thing as above. :p


quote:
So, if you keep the bitrates, samplerates, etc... and you save to wav, nothing is lost... as far I can tell...
I can't keep the same bitrate when moving from MP3 to PCM without losing quality, as PCM has no compression. The audio in MP3 is decompressed before it can be played by the computer, so in fact every song can be represented at 1440 (?) KBPS, as PCM, at the same quality as the source.
RE: Audio extraction without recompressing? by CookieRevised on 04-06-2004 at 02:08 AM

It made/makes much sense If you know what I meant and if you aren't so picky.... ok slap me for my english :refuck:

quote:
Originally posted by sock
quote:
Saving the uncompressed audio stream is also useless. You wouldn't have anything to play it with.
When I said "uncompressed audio stream", I was referring to PCM data. So this is the same thing as above.
I wasn't referring to PCM data :p

quote:
Originally posted by sock
quote:
It needs to be recoded (but not nessecairly recompressed) into a new codec.
The whole point of media codecs is to compress/decompress the data. There's no media codec that doesn't (de)compress. If I want it uncompressed, I can put the raw decompressed audio data in a PCM (.wav) file, which is again the same thing as above.
Maybe I used the wrong term here, I didn't meant "codec", but "format"... It needs to be coded, but that doesn't automaticly mean it needs to be compressed. Yes, many music-formats compresses also when it is encoding. But take for example midi (I think anyways; fill in other formats here :p), no compression there, only encoding...

quote:
Originally posted by sock
quote:
So, if you keep the bitrates, samplerates, etc... and you save to wav, nothing is lost... as far I can tell...
I can't keep the same bitrate when moving from MP3 to PCM without losing quality, as PCM has no compression.
ok, forget "bitrate", you know what I mean :D, don't be so picky :p


Anyways, my whole point was, you can save MP3 into WAV without losing quality (as you know). And of course this means big filesizes :p
RE: RE: Audio extraction without recompressing? by sock on 04-06-2004 at 02:34 AM

Blah, you replied while I was editing my post a bit... :p


* sock won't comment on the first replies (to avoid :argue:). :p


quote:
Anyways, my whole point was, you can save MP3 into WAV without losing quality (as you know). And of course this means big filesizes :p

Oh... I know I can do that. :p But I want the original compression so I could have a small file size + same quality + no redundant processing.

But thanks anyways. :p


(I'm sorry if I'm annoying you, Cookish:p)


Anyway, I suppose I'll just re-encode it with the same codec (at a higher bitrate perhaps). I suppose that won't degrade the quality much. :-/ That is, until a better solution is found. :p
RE: Audio extraction without recompressing? by CookieRevised on 04-06-2004 at 03:15 AM

(Naaaah... :D) Anyways, I browsed the web and it is indeed hard to find... although I've found some links, but I don't know if they extract the audio instead of recoding/sampling/whatever.... anyways:
http://www.qwerks.com/product.asp?ProductID=6424
http://www.zealotsoft.net/index.htm
http://www.xvideoconverter.com/index.htm
I've found some more, but maybe you can redo the search with the terms I used: "wmv extract audio", "wmv rip", "wmv audio lossless" and some other things like that...

I also searched the "fileformat-sites" (like http://www.wotsit.org/ for example) to try and find some clue weither the audio and video stream is encoded/compressed/whatever within eachother (so it would prevent ripping the audio), but found no clue either...


RE: Audio extraction without recompressing? by sock on 04-06-2004 at 03:37 AM

Thanks. :) I doubt any of these actually extracts the compressed stream as-is, but I'll give them a try.

And yeah, ASF/WMV undoubtedly uses interleaving... I suppose that's what makes it difficult to demultiplex the file... :-/ But it sure is possible!