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.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > General > Audio encoding

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 2nd December 2024, 10:01   #1  |  Link
GrandAdmiralThrawn
Registered User
 
GrandAdmiralThrawn's Avatar
 
Join Date: Feb 2011
Posts: 51
Help with channel up- & downmixing using ffmpeg

Hello,

I'm trying to remix some channels, e.g. layout "L R C LFE Ls Rs" 5.1 as well as "L R" 2.0 to the 5.1 channel layout "C L R Ls Rs LFE". On top of that, I need to remix "L R C LFE Ls Rs" 5.1 to "L R" stereo. I will also have to resample some parts.

The reason is that I need to stitch some audio tracks with different sample sizes and channel layouts together to match multiple main feature audio tracks. All files are PCM/Wav64 audio, which I intend to just concatenate. But for that to work, the layouts and sample sizes need to match. Resampling is super easy, but remixing is royally confusing me.

With one of the sources which comes in the layout "L R C LFE Ls Rs" I tried this for instance:

Code:
ffmpeg -i input.w64 -filter_complex "pan=5.1|c0=c2|c1=c0|c2=c1|c3=c4|c4=c5|c5=c3[a]" -map "[a]" -ac 6 -acodec pcm_s24le output.w64
Essentially, I'm trying to tell ffmpeg to do this: "Take channel 2 and put it on channel 0 (center), take channel 0 and put it on channel 1 (left)" and so on and so forth.

The result is confusing me, however, as mediainfo now claims the resulting file has the layout "L R C LFE Lb Rb". Huh?

And I haven't even started upmixing the stereo parts or downmixing the surround parts yet...

So in my helplessness, I ran to the great machine god (ChatGPT) and asked it to fix my mess, but it didn't produce anything that would've worked either. Most commands it gave me only produced errors.

So here I am, asking for help.

Inputs that require remixing:

1.) 2.0: Layout "L R", sample size 16 bits
2.) 5.1: Layout "L R C LFE Ls Rs", sample size 24 bits

My desired outputs:

a.) 2.0: Layout "L R", sample size 16 bits
b.) 5.1: Layout "C L R Ls Rs LFE", sample size 24 bits

All files come with a 48 kHz sampling frequency. Every single input file needs to be remixed and partially resampled to match each given output format. So "1." needs to be converted to both "a." and "b." and "2." needs the same.

If possible, I'd like not to throw channels away entirely, so that the resulting streams lose as little audio information as possible.

For getting the channel layouts I use mediainfo, as mentioned, in the hope that it produces correct information.

It would be really nice if you could give me the correct commands for this, and even nicer if you could explain them to me as well, so I can finally understand this stuff.

Thanks a lot!
__________________

Proud owner of a 3dfx Voodoo5 6000 AGP HiNT Rev.A-3700 prototype
No RISC, no fun!
GrandAdmiralThrawn is offline   Reply With Quote
 

Tags
ffmpeg, remixing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:26.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.