Hello guest, if you like this forum, why don't you register? https://forum.fanres.com/member.php?action=register (December 14, 2021) x


[Help] 

7 mono WAV files to 6.1

22 Replies, 4075 Views

Guys, so I have 7 mono WAV files. What's the best and easiest way to combine them all in a 6.1 layout? Many thanks in advance!
Audacity, for example, or eac3to.
Sadly my projects are lost due to an HDD crash... Sad
Fundamental Collection | Vimeo channel | My blog
5.1

Code:
#AviSynth
fl=WavSource("L.wav")
fr=WavSource("R.wav")
c=WavSource("C.wav")
lfe=WavSource("LFE.wav")
sl=WavSource("SL.wav")
sr=WavSource("SR.wav")

MergeChannels(fl,fr,c,lfe,sl,sr)

6.1

Code:
fl=WavSource("L.wav")
fr=WavSource("R.wav")
c=WavSource("C.wav")
lfe=WavSource("LFE.wav")
bc=WavSource("BC.wav")
sl=WavSource("SL.wav")
sr=WavSource("SR.wav")

MergeChannels(fl,fr,c,lfe,bc,sl,sr)

7.1

Code:
#AviSynth
fl=WavSource("L.wav")
fr=WavSource("R.wav")
c=WavSource("C.wav")
lfe=WavSource("LFE.wav")
bl=WavSource("BL.wav")
br=WavSource("BR.wav")
sl=WavSource("SL.wav")
sr=WavSource("SR.wav")

MergeChannels(fl,fr,c,lfe,bl,br,sl,sr)

SMPTE/ITU-R recommendations:

    1 channel: mono
    2 channels: left, right
    3 channels: left, right, center
    4 channels: front left, front right, back left, back right
    5 channels: front left, front right, front center, back/surround left, back/surround right
    6 channels: front left, front right, front center, LFE, back/surround left, back/surround right
    7 channels: front left, front right, front center, LFE, back center, side left, side right
    8 channels: front left, front right, front center, LFE, back left, back right, side left, side right
ffmpeg

https://trac.ffmpeg.org/wiki/AudioChannelManipulation

That site has all the info you need, and is guaranteed lossless I think if you set the right acodec (for the right bit depth). AVISynth for example I think is limited to 16 bit in normal mode but that doesn't necessarily guarantee that it wasn't converted to something else internally.
(This post was last modified: 2021-01-07, 09:21 PM by TomArrow.)
(2021-01-07, 08:37 PM)Chewtobacca Wrote: 5.1

Code:
#AviSynth
fl=WavSource("L.wav")
fr=WavSource("R.wav")
c=WavSource("C.wav")
lfe=WavSource("LFE.wav")
sl=WavSource("SL.wav")
sr=WavSource("SR.wav")

MergeChannels(fl,fr,c,lfe,sl,sr)

6.1

Code:
fl=WavSource("L.wav")
fr=WavSource("R.wav")
c=WavSource("C.wav")
lfe=WavSource("LFE.wav")
bc=WavSource("BC.wav")
sl=WavSource("SL.wav")
sr=WavSource("SR.wav")

MergeChannels(fl,fr,c,lfe,bc,sl,sr)

7.1

Code:
#AviSynth
fl=WavSource("L.wav")
fr=WavSource("R.wav")
c=WavSource("C.wav")
lfe=WavSource("LFE.wav")
bl=WavSource("BL.wav")
br=WavSource("BR.wav")
sl=WavSource("SL.wav")
sr=WavSource("SR.wav")

MergeChannels(fl,fr,c,lfe,bl,br,sl,sr)

SMPTE/ITU-R recommendations:

    1 channel: mono
    2 channels: left, right
    3 channels: left, right, center
    4 channels: front left, front right, back left, back right
    5 channels: front left, front right, front center, back/surround left, back/surround right
    6 channels: front left, front right, front center, LFE, back/surround left, back/surround right
    7 channels: front left, front right, front center, LFE, back center, side left, side right
    8 channels: front left, front right, front center, LFE, back left, back right, side left, side right

Hi, thank you for these codes, but I am completely unfamiliar with Avisynth. So I copied your code to AvsPmod and made a script. So what should I do next?
(2021-01-07, 09:20 PM)TomArrow Wrote: ffmpeg

https://trac.ffmpeg.org/wiki/AudioChannelManipulation

That site has all the info you need, and is guaranteed lossless I think if you set the right acodec (for the right bit depth). AVISynth for example I think is limited to 16 bit in normal mode but that doesn't necessarily guarantee that it wasn't converted to something else internally.

Yes, thanks, I know this one. But somehow ffmpeg isn't doing a good job with 6.1. If I use join filter, it messes the channel layout (C goes to the right for some reason). If I use amerge, then it seems to be doing a proper 6.1, but then I run an mkv file with 6.1 muxed in via my Sony x700 player, it shows pcm 7.0, and not 6.1...
(2021-01-08, 01:38 PM)allldu Wrote: So I copied your code to AvsPmod and made a script. So what should I do next?

Open the script in VirtualDub2 or BeHappy.    Render the audio to FLAC (or whatever).

EDIT: You might find it useful to dub the audio to a blank video clip.  I had assumed that you were working on a project of some kind; otherwise, I don't know where you'd have come across seven mono wav files.

Code:
#AviSynth
fl=WavSource("L.wav")
fr=WavSource("R.wav")
c=WavSource("C.wav")
lfe=WavSource("LFE.wav")
bc=WavSource("BC.wav")
sl=WavSource("SL.wav")
sr=WavSource("SR.wav")

#Assuming 23.976fps input -- change "fps" and "fps_denominator" if necessary
AudioDub(
\BlankClip(c, fps=24000,fps_denominator=1001,width=720, height=480),
\MergeChannels(fl,fr,c,lfe,bc,sl,sr)
\)
(This post was last modified: 2021-01-09, 02:43 AM by Chewtobacca.)
(2021-01-08, 04:51 PM)Chewtobacca Wrote:
(2021-01-08, 01:38 PM)allldu Wrote: So I copied your code to AvsPmod and made a script. So what should I do next?

Open the script in VirtualDub2 or BeHappy.    Render the audio to FLAC (or whatever).

EDIT: You might find it useful to dub the audio to a blank video clip.  I had assumed that you were working on a project of some kind; otherwise, I don't know where you'd have across seven mono wav files.

Code:
#AviSynth
fl=WavSource("L.wav")
fr=WavSource("R.wav")
c=WavSource("C.wav")
lfe=WavSource("LFE.wav")
bc=WavSource("BC.wav")
sl=WavSource("SL.wav")
sr=WavSource("SR.wav")

MergeChannels(fl,fr,c,lfe,bc,sl,sr)

#Assuming 23.976fps input -- change "fps" and "fps_denominator" if necessary
AudioDub(
\BlankClip(c, fps=24000,fps_denominator=1001,width=720, height=480),
\MergeChannels(fl,fr,c,lfe,bl,br,sl,sr)
\)

I'm sure it's pretty simple, but somehow I don't see an option to open scripts in BeHappy when I load the wav files into it, and VirtualDub just can't open audio without video, and when I try Run scripts... it throws out an error.
(2021-01-08, 04:51 PM)Chewtobacca Wrote:
(2021-01-08, 01:38 PM)allldu Wrote: So I copied your code to AvsPmod and made a script. So what should I do next?

Open the script in VirtualDub2 or BeHappy.    Render the audio to FLAC (or whatever).

EDIT: You might find it useful to dub the audio to a blank video clip.  I had assumed that you were working on a project of some kind; otherwise, I don't know where you'd have across seven mono wav files.

Code:
#AviSynth
fl=WavSource("L.wav")
fr=WavSource("R.wav")
c=WavSource("C.wav")
lfe=WavSource("LFE.wav")
bc=WavSource("BC.wav")
sl=WavSource("SL.wav")
sr=WavSource("SR.wav")

MergeChannels(fl,fr,c,lfe,bc,sl,sr)

#Assuming 23.976fps input -- change "fps" and "fps_denominator" if necessary
AudioDub(
\BlankClip(c, fps=24000,fps_denominator=1001,width=720, height=480),
\MergeChannels(fl,fr,c,lfe,bl,br,sl,sr)
\)

Oh, I didn't see your edited post... Well, I was working from a 6.1 DTS file, which I converted to 7 separate wav files, then edited them, and now I want to merge them back to a 6.1 pcm so that later I could mux it in with the video in .mkv container.
Okay, so you've edited the wavs in another program.  The edited part of my previous post will get rid of the error message that VirtualDub2 is throwing.  BeHappy has the option to choose different types of input, including AviSynth, which is the default option; look under [1] Source in the GUI, ensure the input is set to AviSynth, and click on Add.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting Two Audio Files to Sync Lio 3 1,502 2019-11-12, 05:33 AM
Last Post: TomArrow
  AudioMedian Tool (Median from multiple audio files) TomArrow 5 2,614 2019-08-23, 03:05 PM
Last Post: TomArrow
  Editing mkv files Serums 2 2,288 2018-06-21, 08:46 AM
Last Post: Serums



Users browsing this thread: 1 Guest(s)