Log in

View Full Version : Question about the -oac copy option of MEncoder


microchip8
5th August 2007, 19:19
Hi,

I have a couple of new DVD movies here and I want to encode them to x264 but I want to preserve the Dolby 5.1 sound. I know that MEncoder can copy the audio stream but just after the encoding started, I noticed these two lines...

Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)

and further below...

audiocodec: framecopy (format=2000 chans=2 rate=48000 bits=16 B/s=56000 sample-1)

Does it mean that the -oac copy option of MEncoder only copies 2 channels or all 5.1 channels are copied? The DVD really has 5.1 sound in it... do I also have to use the -channels option of MEncoder together with -oac copy? eg,

-oac copy -channels 6

buzzqw
5th August 2007, 19:25
first dumping with mplayer and then feeding mencoder ?

BHH

microchip8
5th August 2007, 19:32
first dumping with mplayer and then feeding mencoder ?

BHH

no, direct encoding to x264 and copying the audio stream during the encoding process

tebasuna51
5th August 2007, 19:47
no, direct encoding to x264 and copying the audio stream during the encoding process

Please, you can explain how recode the video and mux with the original audio at same process?

microchip8
5th August 2007, 19:53
Please, you can explain how recode the video and mux with the original audio at same process?

Well, MEncoder supports encoding video and copying the original sound. It also supports copying the video and encoding the audio. You can do for example

mencoder dvd://1 -aid 128 -ovc xvid -xvidencopts fixed_quant=2 -oac copy -o somefile.avi

It is explained in the documentation of MEncoder but what they don't mention is if during the audio copy process all channels are copied or just 2 of them by default, hence my question if I also have to use the -channels 6 option

microchip8
5th August 2007, 20:30
OK, so I did a few tests here, first one without the -channels 6 option and second one with -channels 6

First test, avidump from mpeg4ip showed the file only had 2 channels. Second test, avidump showed the file had 6 audio channels in it

So I guess one should use -oac copy -channels 6 if one wants to copy/preserve all 5.1 channels

buzzqw
5th August 2007, 21:19
interesting! thanks for this information

i will check automen

thanks again

BHH

microchip8
5th August 2007, 21:41
no problem, I guess I answered my own question here, :D