Extracting WMA channels

Just have a drink and chat
Zooya
New Cone
New Cone
Posts: 3
Joined: 20 Jan 2009 18:25

Extracting WMA channels

Postby Zooya » 20 Jan 2009 18:27

Hello!

I have an iRiver E100 that is capable of recording audio from its built-in microphone, external microphone and line-in. Most of the time I make recordings with its built-in one which is mono, though the format it's recording is a Stereo WMA, 192kbps and it's a waste of disk capacity, since both audio tracks contain the same material. There is no option adjusting the channels for recording.

I'm looking for a (command line if there's one) tool that can extract one channel from a WMA file and save to another. For instance my 192kbps WMAs consist two 96kbps WMA audio streams, one for each channel (2). I'd like to extract one of these channels to a new file, that'd be Mono and 96 kbps.

I'm pretty sure that audio channels are stored somehow separately. For example, I have a recording, speech-of-my-friend-in-the-school.wma that is 11 682 672 in bytes and 8:04 long (484 seconds). At 192kbps a 484 seconds long audio clip would be (192000*484)/8 = 11 616 000 bytes which is almost the same as the real size (maybe there are more frames than exactly 484 seconds and the real bitrate doesn't end with 000, there's a header, that's why the real size is bigger), so I don't think it spares disk space by summing/differencing audio tracks, because in this case the size should be around half as big as a conventional 192kbps clip.

I have WinAmp and audio editing softwares, but I would not like to convert my clips. I could downmix them and convert them using ffmpeg/lame/etc. but this will result in the loss of quality. The only option for me is copying one channel and saving it as a mono-channel WMA.

Tried using AsfBin, but couldn't figure out how to separate a stereo audio tracks into two mono channels without re-encoding. Tried: asfbin -i <inputfile> -o <outputfile> -nostream 2 , but it handles the audio part as one stream.

Also tried with ffmpeg -i <inputfile> -ab 96k -ac 1 -acodec copy <outputfile>, no success, it generates an output file arund the same size and bitrate as the input.

I'm not familiar with VLC. Is it able to do this?

Thanks in advance
Zooya

3breadt
Big Cone-huna
Big Cone-huna
Posts: 827
Joined: 19 Mar 2006 11:37
Operating System: Win7 Pro / OS X 10.7
Location: Paderborn, Germany
Contact:

Re: Extracting WMA channels

Postby 3breadt » 25 Jan 2009 18:35

try
ffmpeg -i <inputfile> -ac 1 <outputfile.mp3>

or change acodec copy to any other audio codec, because otherwise it will just copy the stereo stream and ignore the ac 1and ab 96k setting.
-- 3breadt (aka altglass)

Zooya
New Cone
New Cone
Posts: 3
Joined: 20 Jan 2009 18:25

Re: Extracting WMA channels

Postby Zooya » 25 Jan 2009 21:12

try
ffmpeg -i <inputfile> -ac 1 <outputfile.mp3>

or change acodec copy to any other audio codec, because otherwise it will just copy the stereo stream and ignore the ac 1and ab 96k setting.
Already tried -acodec copy with no success. If I specified another -acodec it would re-encode the stream, which I don't want.

3breadt
Big Cone-huna
Big Cone-huna
Posts: 827
Joined: 19 Mar 2006 11:37
Operating System: Win7 Pro / OS X 10.7
Location: Paderborn, Germany
Contact:

Re: Extracting WMA channels

Postby 3breadt » 27 Jan 2009 12:18

Why would you not want it to be reencoded?

-acodec copy will prevent you from being able to rip it to mono, so you have to change to another codec. And going to mp3 might be also a way to save some space.
-- 3breadt (aka altglass)

Zooya
New Cone
New Cone
Posts: 3
Joined: 20 Jan 2009 18:25

Re: Extracting WMA channels

Postby Zooya » 05 Feb 2009 23:54

Why would you not want it to be reencoded?
Because it's a waste of CPU and loss of quality. There is nothing that needs to be recoded, my WMA files are in excellent condition and sound great. The only problem with them is they store twice as much data as they should. There should be some solution for this without recoding.

3breadt
Big Cone-huna
Big Cone-huna
Posts: 827
Joined: 19 Mar 2006 11:37
Operating System: Win7 Pro / OS X 10.7
Location: Paderborn, Germany
Contact:

Re: Extracting WMA channels

Postby 3breadt » 19 Feb 2009 14:18

I think the time needed to figure out how to do it w/o reencoding is way longer than the time needed to reencode them to mono :D
-- 3breadt (aka altglass)


Return to “Coffee Corner”

Who is online

Users browsing this forum: No registered users and 14 guests