Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
13th April 2013, 16:38 | #1 | Link |
Registered User
Join Date: Jun 2010
Posts: 36
|
Combining three mono wavs into 2.1 PCM?
I have the following:
A silent MP4 video -H264 - MPEG-4 AVC part 10 avc1 -1920x1080 -23.976 FPS -Planar 4:2:0 YUV Three WAV files -PCM S16 LE araw -Mono -48Khz -16 bit The first two are identical, and the second is the base line. I want to author a Blu-Ray with PCM 2.1 audio. Or if this is possible and supported by BD players, PCM 1.1 (I'm assuming it isn't). I don't want to re-encode any of the audio - I want the three WAV files to be discrete channels in a PCM 2.1 sound track. How can I go about doing this? I know how to do all of the steps except actually combine the three audio files in the manner I want. |
13th April 2013, 17:56 | #2 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
The subwoofer speaker can't play frecuencies over 120/200 Hz. Maybe is better mix the tracks.
__________________
BeHappy, AviSynth audio transcoder. |
|
13th April 2013, 19:10 | #3 | Link |
Warm and fuzzy
Join Date: Apr 2010
Location: Moscow, Russia
Posts: 201
|
ikantspelwurdz
. Try this. . Code:
Left=WAvSource("Left.wav") Right=WAvSource("Right.wav") LFE=WAvSource("LFE.wav") Audio2_1=MergeChannels(Left, Right, LFE) LFE = means subwoofer. And so on... .
__________________
Warm and fuzzy (white and fluffy) |
13th April 2013, 21:56 | #4 | Link |
Registered User
Join Date: Jun 2010
Posts: 36
|
tebasuna51:
These were ripped from a DVD, originally in 2.1 AC3 format. I imported into Audacity, converted to three 48Khz mono tracks, and all I did to change them was cut some time from the beginning and very slightly reduce the tempo. Then I exported them as WAVs. So as long as the original AC3 file's .1 channel was only in low frequencies, I'm pretty sure my third WAV file should be the same. Jenyok: Is that for AviSynth? I've never used AviSynth before, though I'm willing to teach myself how if that's the right tool for this job. |
13th April 2013, 23:57 | #5 | Link |
Registered User
Join Date: Jun 2010
Posts: 36
|
I think I figured out how to do what I want to do.
Load Audacity Edit->Preferences->Import/Export->Export->Use custom mix Import three WAV files Export as WAV (Microsoft) signed 16 bit PCM Set output channels to FOUR L->Channel 1 R->Channel 2 R->Channel 3 LFE->Channel 4 Doing this generates a 3F/LFE WAV file, which is basically what I want. Filesize is huge, but it's going on a Blu-Ray. |
14th April 2013, 09:31 | #6 | Link | ||
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
Quote:
Is enough 3 channels L, R and LFE, 2.1 like original.
__________________
BeHappy, AviSynth audio transcoder. |
||
14th April 2013, 15:22 | #7 | Link | ||
Registered User
Join Date: Jun 2010
Posts: 36
|
Quote:
Quote:
And it gets worse. When I use Tsmuxer to make the Blu-Ray with my 3F/LFE WAV, the output TS thinks the audio is 4.0. So now I've tried re-encoding as a SIX channel WAV. L.wav->Channel 1 R.wav->Channel 2 R.wav->Channel 3 LFE.wav->Channel 4 Nothing->Channel 5 Nothing->Channel 6 This produces the desired result. The final TS treats the audio as 5.1 surround, but the 3F's all fire the same mono track, the 2R's are silent, and the LFE is correct. But now I'm having syncing issues. What's strange is that if I use Avidemux to mix the 6-channel WAV with an MKV, the output MKV syncs fine. But if I use Tsmuxer to turn that very same MKV into a TS, the TS desyncs. |
||
14th April 2013, 21:44 | #8 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
When you select WAV output in Audacity, make a wav file with a simple header without info about the channels present.
We need a header WAVE_FORMAT_EXTENSIBLE You can convert you 3 channels wav file with simple header to a true 2.1 wav file with: WavFix 3chan.wav 2.1.wav -m 11 After that any smart soft (tsMuxeR included) must recognize the wav like 2F/LFE Edit: if wav file is > 4GB you need add the parameter -ignorelength and to be read by tsMuxeR must be W64 instead WAV WavFix 3chan.wav 2.1.w64 -ignorelength -o 3 -m 11 WavFix.exe included here (new version 2016-08-01) [EDIT]Also WavSplit.exe included
__________________
BeHappy, AviSynth audio transcoder. Last edited by tebasuna51; 29th September 2021 at 17:04. Reason: update link |
16th April 2013, 04:03 | #9 | Link |
Registered User
Join Date: Jun 2010
Posts: 36
|
Thanks for that. The output says "Stereo/LFE" as expected. I will attempt to Tsmux it with the video tomorrow.
Do you know if it's possible to have a 1.1 WAV file, and if so, if that can be Blu-Ray compliant? I'm still assuming no, since nobody has said otherwise, but the question's still open. |
16th April 2013, 14:06 | #10 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
I don't know if is BluRay compliant, but the wav file 1.1 can be obtained using a MaskChannel of 12:
WavFix 2chan.wav 1.1.wav -m 12 Code:
The default channels mask (-m 0) are: Mask Chan. MS channels Description ---- ----- ------------------------- ---------------- 4 1 FC Mono 1.0 3 2 FL FR Stereo 2.0 7 3 FL FR FC Stereo + Center 3.0 51 4 FL FR BL BR Quadro 4.0 (2/2.0) 55 5 FL FR FC BL BR like Dpl II 5.0 (3/2.0) 63 6 FL FR FC LF BL BR Old Surround 5.1 (3/2.1) 319 7 FL FR FC LF BL BR BC With back center 6.1 (3/2/1.1) 1599 8 FL FR FC LF BL BR SL SR Standard surround 7.1 (3/2/2.1) Some other common channels mask (-m Mask): Mask Chan. MS channels Description ---- ----- ------------------------- ---------------- 12 2 FC LF Center + LFE (1.1) 11 3 FL FR LF Stereo + LFE (2.1) 259 3 FL FR BC First Surround (2/1.0) 267 4 FL FR LF BC First Surround + LFE (2/1.1) 1539 4 FL FR SL SR Alternative Quadro 4.0 (2/2.0) 15 4 FL FR FC LF Stereo + Center + LFE 3.1 263 4 FL FR FC BC like Dpl I (3/1.0) 271 5 FL FR FC BC LF like Dpl I + LFE (3/1.1) 59 5 FL FR BL BR LF Quadro + LFE (2/2.1) 1543 5 FL FR FC SL SR Alternative like Dpl II 5.0 (3/2.0) 1551 6 FL FR FC LF SL SR New surround 5.1 (3/2.1) 1807 7 FL FR FC LF BC SL SR Alternative surround 6.1 (3/2/1.1) 1591 7 FL FR FC BL BR SL SR Standard surround 7.0 (3/2/2.0) 255 8 FL FR FC LF BL BR FLC FRC With front center left/right (5/2.1)
__________________
BeHappy, AviSynth audio transcoder. |
1st August 2016, 11:11 | #11 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
but the real mask is Front: L C R, Side: L R, LFE so I try to edit the .wav with Code:
wavfix "old.wav" "new.wav" -ignorelength -m 1551
__________________
See My Avisynth Stuff |
|
1st August 2016, 19:51 | #12 | Link | ||
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
If the wav was obtained decoding AC3/DTS 5.1 the surround channels (120º) are more near of Back (130º) channels than to the Side (100º) channels. BTW both channelmask are valid for standard 5.1 configuration. Quote:
Only work when input wav file don't have channelmask (simple header). I must do a new version. By the moment you can use: eac3to "old.wav" "new.wav" than change the Back to Side if you really need it.
__________________
BeHappy, AviSynth audio transcoder. Last edited by tebasuna51; 1st August 2016 at 19:54. |
||
1st August 2016, 19:57 | #13 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
Looking forward to the new version
__________________
See My Avisynth Stuff |
|
1st August 2016, 22:11 | #15 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
the original DTS like that
__________________
See My Avisynth Stuff |
1st August 2016, 22:42 | #16 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Nope, a standard DTS 5.1 have the layout M (see the image), with channels: L C R, Ls, Rs, LFE
The exact channel correspondence can be see in 7.1 layout A: L = FL C = FC R = FR Lss = SL (Side Left) Rss = SR (Side Right) Lsr = BL (Back Left) Rsr = BR (Back Right) LFE = LF The DTS channels Ls (Left Surround) and Rs (Right Surround) don't have a exact correspondence with WAV channels. Are between Side and Back channels, maybe near Back. Then both channelmask must be accepted. BTW I put a new WavFix version in precedent post.
__________________
BeHappy, AviSynth audio transcoder. |
1st August 2016, 23:03 | #17 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
and thank you for WavFix new version
__________________
See My Avisynth Stuff |
|
2nd August 2016, 21:22 | #18 | Link | |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
Quote:
Code:
ffmpeg -i "FL.wav" -i "FR.wav" -i "LFE.wav" -filter_complex "[0:0][1:0][2:0] amerge=inputs=3" -channel_layout "2.1" -vn -c:a pcm_s16le "out.wav" EDIT I don't know if this should be called "re-encoding" or not: the audio samples are being merged into a single stream without changing the samples themselves. The only reason for the above caveat is that ffmpeg disallows the -codec copy option when filtering, so one could argue that (trivial) re-encoding is being done. Last edited by raffriff42; 3rd August 2016 at 01:16. |
|
|
|