View Full Version : 7.1ch LPCM to 5.1ch AC3
Blue_MiSfit
5th August 2008, 03:00
Hey Folks,
So I've got a source with 7.1ch PCM audio (wow its big) and I want to encode it with Aften (wrapped in eac3to?) down to 5.1ch AC3 at 384kbps.
The problem is, the "extra" 2 channels in the 7.1 source are a little funny.
When I play this 7.1ch track downmixed to 2ch with my headphones, the sound is filed with echo and reverb. It's very strange sounding. I loaded the WAV into Audacity, and sure enough the extra 2 channels in the 7.1 are responsible.
Switching them off entirely gives a clean 5.1 sound, as well as a clean 2ch downmix.
Unfortunately, using eac3to's -down6 options mixes in these channels with the other 2 surround channels. The end result is a 5.1ch AC3 that sounds okay on a 5.1ch system, but has the same echo/reverb sound when downmixed to 2ch. This isn't acceptable :)
What I want to do is convert the 7.1ch to 5.1ch by literally throwing away the extra 2 surround channels.
I can't see any way to do this with eac3to, and I need to do this quickly and easily for a fair number of titles.
Suggestions?
Thanks!
~MiSfit
yonta
5th August 2008, 08:30
NicLPCMSource("input.pcm", 48000, -16, 8) # 48KHz 16bit 8ch. Use 16(positive) if little-endian. Channels are automatically remapped.
GetChannels(1,2,3,4,5,6) # throws away the extra 2 surround channels
You can download NicAudio v2.0.1 here (http://www.codeplex.com/NicAudio/Release/ProjectReleases.aspx?ReleaseId=12395).
Feed the above script to BeHappy
or
bepipe.exe --script "NicLPCMSource(^input.pcm^, 48000, -16, 8).GetChannels(1,2,3,4,5,6)" | aften.exe -b 640 -readtoeof 1 - output.ac3
tebasuna51
5th August 2008, 10:53
The channel order in 7.1 is FL,FR,FC,LF,BL,BR,SL,SR.
Maybe you need use a GetChannels(1,2,3,4,7,8) if the channels you want throwing away are the Backs instead the Side.
Blue_MiSfit
5th August 2008, 20:05
Interesting!
I'd like to stick to just using eac3to if possible, but I wasn't aware of the channel mapping in 7.1.
I think I mis-spoke when I said the source is LPCM. It's uncompressed PCM, but stored in WAV. I assume this wouldn't work with NicLPCMSource()?
~MiSfit
Blue_MiSfit
5th August 2008, 20:24
Grumble Grumble...
I cant seem to find a download of bepipe anywhere, it's been awhile since I used it.
Googled, and searched the board.
:confused:
Surely this shouldn't be a difficult utility to find!
~MiSfit
setarip_old
5th August 2008, 21:11
@Blue_Misfit
Hi!
The following appears to be a link to a BePipe.exe download location:
http://imcold.evilhosting.org/progs/sng/
Blue_MiSfit
5th August 2008, 21:31
How helpful of you setarip_old!
Thanks!
~MiSfit
Blue_MiSfit
5th August 2008, 21:42
heh... okay
F:\bourne>bepipe.exe --script "WavSource(^f:\bourne\bournetest.wav^).GetChannels
(1,2,3,4,5,6)" | aften.exe -b 384 -readtoeof -c:\bepiped.ac3
is my exact command.
It runs, and says its creating an output file, but I cant find one anywhere. Not at C:\, and not with an exhaustive search with the Windows Search Companion.
Am I doing it wrong? ;)
Thanks all!
~MiSfit
raquete
5th August 2008, 22:01
another option is open your 7.1 wav in adobe audition(edit view or multitrack view)
edit view:
open your 7.1 wav in edit view,
select the desired channel in "window" option (you'll have all files there)
listen,select the desire file and save.
repeat the process with the remainders desirables files.
or
multitrack view:
using the multitrack view, click in "insert"-audio,
select your 7.1 file and all the tracks will open there.
play and "mute" the undesirables tracks.
after that,click in "view"-multichannel encoder.
in "Panning Assignment",adjust the channel for each track:
track 1: FL only,mono
track 2: FR only,mono
track 3: Center only,mono
track 4: LFE only
...etc.
click in "export"
select: (2 options)
export as six individual mono wave files(for 6 individual files)
or
export as one interleaved, 6-channels wave file
setarip_old
6th August 2008, 00:37
@Blue_MiSfitHow helpful of you setarip_old! Thanks!As always, my pleasure ;>}
BTW - You indicate:-c:\bepiped.ac3Should there be a space between "-" and "c:\bepiped.ac3"?
Blue_MiSfit
6th August 2008, 01:15
F:\bourne>bepipe.exe --script "WavSource(^f:\bourne\bournetest.wav^).GetChannels
(1,2,3,4,5,6)" | aften.exe -b 384 -readtoeof - "c:\bepiped.ac3"
produces the same result - nothing!
:(
~MiSfit
tebasuna51
6th August 2008, 01:45
-readtoeof need a value:
-readtoeof 1
now read the wav file until eof ignoring the length in wav header. Usefull for wav > 4GB.
If the wav file is > 4 GB the standard WavSource don't work, you need open the wav file with RaWavSource() included in the same NicAudio v2.0.1
Try with:
F:\bourne>bepipe.exe --script "RaWavSource(^f:\bourne\bournetest.wav^).GetChannels
(1,2,3,4,5,6)" | aften.exe -b 384 -readtoeof 1 - "c:\bepiped.ac3"
BTW, Bepipe.exe can always get from last BeHappy release at http://www.codeplex.com/BeHappy
Blue_MiSfit
6th August 2008, 01:51
DOH!!
Thanks for catching my little "oversight", the encode ran perfectly :)
Good to know, about the size limitations. This file was just a sample, and came in at just under 500mb. Full deliveries will be monsters.
Also, it sounds PERFECT!
~MiSfit
n0mag!c
6th August 2008, 08:59
Also, it sounds PERFECT!
What is can't be said about AC3.
At 384 kbit high frequencies are truncated higher 18kHz.
At 448 (and more) kbit high frequencies are truncated higher 20kHz.
Blue_MiSfit
9th August 2008, 00:34
Well sure, but I have to work within certain restrictions :)
~MiSfit
Blue_MiSfit
14th August 2008, 03:45
So a brief update for any interested parties, I'm expanding this functionality.
I've got lots of very large sources. They're 1080p24 QuickTime MOVs encoded with the Photo-JPEG codec in YUY2. Audio is muxed in, 7.1ch.
So, I'm using QTSource to load the MOV into AviSynth, and encode audio and video from the same script using bepipe and aften :)
~MiSfit
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.