I want to convert this source MP4 video containing AC3 5.1 audio to stereo, but also copy (passthru) the same audio stream as a secondary soundtrack in the output file.
The result is a video with ONE audio stream: just the converted mp3, and it ignores the audio "copy" command to create a secondary soundtrack: the untouched AC3 5.1 audio. (I know Handbrake does this flawlessly, but I don't want to re-encode the video stream which Handbrake requires).Code:ffmpeg -i SOURCE.MP4 -map 0:v -c:v copy -map 0:a -c:a:0 mp3 -ac:a:0 2 -filter_complex "[0:a:0]aresample=matrix_encoding=dplii" -map 0:a -c:a:1 copy OUTPUT.MP4
Any help would be appreciated.
+ Reply to Thread
Results 1 to 3 of 3
-
-
I modified one of my scripts - not tested but should work, audio track is copied and at the same time stereo version with small dynamics compression and level normalization encoded as mp3 and added as second audio track
Code:ffmpeg.exe -i source.mp4 -map 0:v -c:v copy -map 0:a -c:a:0 copy -filter_complex "[0:a:0]pan=stereo|FL < FL + 1.414FC + .5BL + .5SL + .25LFE + .125BR|FR < FR + 1.414FC + .5BR + .5SR + .25LFE + .125BL,dynaudnorm=p=1/sqrt(2):m=100:s=10,firequalizer=gain='if(gte(f,42),0,-INF)+if(lte(f,13749),0,-INF)':accuracy=1:fixed=on:delay=0.05,asetpts=PTS-0.05/TB[a2c]" -map [a2c]:1 -c:a:1 libmp3lame -q:a:1 6 -map 0:s -c:s copy -f matroska source.mkv
Last edited by pandy; 24th Jun 2016 at 09:31.
Similar Threads
-
FFMPEG Audio Volume Command
By Johnbil in forum AudioReplies: 6Last Post: 3rd Dec 2013, 02:09 -
What is the ffmpeg command to merge two mono audio streams into one stereo?
By Iced Coffee in forum Video ConversionReplies: 1Last Post: 10th Feb 2013, 22:54 -
Anyone Can Help to Convert This Preset to FFmpeg Command Line?
By raymng in forum Video ConversionReplies: 2Last Post: 26th Feb 2012, 12:11 -
Paid Job - Convert Preset Files to FFmpeg Command Lines
By raymng in forum ProgrammingReplies: 0Last Post: 19th Feb 2012, 03:01 -
ffmpeg generate audio/add to video help please, command line
By surfmonkee in forum LinuxReplies: 3Last Post: 11th Sep 2011, 16:17