Hi
I'm a cat, please patience.
from this commandline I get an audio wav file with 2 channels, can I generate the mix of pan into one single track and one channel (not 2 channel)?Code:ffmpeg64bit2014.exe -y -i input.avi -vn -map_channel 0.1.0 -map_channel 0.1.1 -af "pan=stereo:c0<c0+c1:c1<c0+c1,volume=1.5" -c:a pcm_s24le gat.wav
my input is a stereo L+R file
+ Reply to Thread
Results 1 to 10 of 10
-
-
This can probably help you out?
FFMpeg: Manipulating audio channels -
This works for me:
Code:ffmpeg64bit2014.exe -y -i input.avi -vn -af "pan=mono|c0=0.5*c0+0.5*c1,volume=1.5" -c:a pcm_s24le gat.wav
-
wow
[Attachment 92634 - Click to enlarge]
it works ***
so
is it the same of usingCode:ffmpeg64bit2014.exe -y -i input.avi -vn -af "pan=mono|c0=0.5*c0+0.5*c1,volume=1.5" -c:a pcm_s24le gat.wav
Code:ffmpeg64bit2014.exe -y -i input.avi -vn -af "pan=stereo:c0<c0+c1:c1<c0+c1,volume=1.5" -c:a pcm_s24le -ac 1 gat.wav
? -
This is the simplest code that does what you are trying:
If you get clipping remove the volume=1.5.Code:ffmpeg64bit2014.exe -y -i input.avi -vn -af "pan=mono|c0=c0+c1,volume=1.5" -c:a pcm_s24le output.wav
Or this code will normalize but same as the above if you get clipping.
Adding gain requires different coding if that is what you want instead of volume increase.Code:ffmpeg64bit2014.exe -y -i input.avi -vn -af "pan=mono|c0<c0+c1,volume=1.5" -c:a pcm_s24le output.wav
Basically the equal sign = adds their volume levels directly for each channel.
The less than sign means "Normalize" & calculates the total gain coefficient (1 + 1 = 2) and divides each individual channel's gain by that total.Last edited by cholla; 9th Jun 2026 at 10:50. Reason: added simpler codes
-
Simple stereo to mono mix, (L+R)/2,
https://trac.ffmpeg.org/wiki/AudioChannelManipulation#stereomonostream
Code:ffmpeg -i stereo.flac -ac 1 mono.flac
-
jagabo your code will work except the OP wants to remove the video so it needs -vn added.
I had never worked with the Pan settings in ffmpeg before.
They are to control the levels. So a mono does not get the full level of each track.
If the full level is used a lot of conversions get clipping.
This one should resist clipping
If you leave this out of the code c:a pcm_s24le it will usually do 16-bit .Code:ffmpeg64bit2014.exe -y -i input.avi -vn -af "pan=mono|c0=0.5*c0+0.5*c1" -c:a pcm_s24le output.wav
-
-
Jagabo solution is what I do instead I pump to wav then run normalize-audio on it. That is the Linux command, dunno the windows cli equivalent
if all else fails read the manual
Similar Threads
-
ffmpeg audio encoding help
By marcorocchini in forum Newbie / General discussionsReplies: 0Last Post: 12th Mar 2025, 16:44 -
ffmpeg audio mapping problem
By geextah_2 in forum Video ConversionReplies: 9Last Post: 22nd Mar 2024, 09:15 -
FFmpeg audio channels
By khaled22 in forum Newbie / General discussionsReplies: 5Last Post: 12th Jun 2023, 14:32 -
FFMPEG audio question
By DDF in forum Video ConversionReplies: 2Last Post: 22nd Mar 2023, 06:09 -
ffmpeg not copying both audio tracks
By the_steve_randolph in forum Newbie / General discussionsReplies: 1Last Post: 11th Jul 2021, 12:09


Quote
