[MPlayer-users] Re: ac3 to ogg

Adam Nielsen a.nielsen at optushome.com.au
Tue Oct 7 06:29:46 CEST 2003


> I obtain a ogg file with 6 channels but the channels are inverted... why?

The locations of the channels differ depending on the program being used - as 
far as I'm aware there's no channel standard for Ogg files yet (e.g. channel 
#3 might be left-rear for AC3, but front-centre for Ogg) and .wav files were 
only ever used to hold mono and stereo data.  The only way around this is to 
rearrange the channels with a sound editor.  But make sure the program you're 
playing the Ogg with has got it right too (if you're playing it with mplayer 
you should be right.)

> when a play the ogg file when start it i lissen a "beep" why??

This is because a52dec writes a .wav header, but oggenc is told to expect raw 
data, so this .wav header gets encoded and that's what you hear as a beep.  
You can try doing it in two separate steps, but I think the reason why I did 
it the way above originally was because oggenc couldn't read six channel .wav 
files.  This may have changed by now, but you can try something like:

a52dec -o wav6 $AC3FILE > temp6.wav
oggenc temp6.wav

which will create temp6.ogg, assuming oggenc can read the multichannel .wav 
file.  Alternatively you could just chop off the .wav header, there is plenty 
of information around about how to find out how large this is (the quick 
solution is to find the text "data" near the start of the file, and remove 
everything from the start ("RIFF...") up to and including the four bytes 
following the "data" text.  You'll probably need some sort of hex editor for 
this, although "dd" might work.

Cheers,
Adam.



More information about the MPlayer-users mailing list