3

Let's say I have a video file that has 5.1 audio (maybe AAC or something) and I want to convert that track to stereo so I can use it with Plex without doing any transcoding. Well, I also want to keep the 5.1 track as the 2nd track so if I ever get a 5.1 system, I can use that track. So basically, I just want to copy the video, copy the audio, and add the converted track as the 1st track (the default track).

I've searched all over the web and couldn't find anything about this. I usually just use Handbrake for my video conversions, but it doesn't have a way to just copy the video. Any help would be greatly appreciated.

2 Answers2

8

I was able to pull this off by using the following command. I'm not experienced with FFmpeg though, so I'm probably doing something wrong. Any suggestions at all? I don't even think the "96k" part is working.

Updated working command:

ffmpeg -i "input.mkv" \
-map 0:0 -map 0:1 -map 0:1 \
-c:v copy \
-c:a:0 aac -b:a:0 192k -ac 2 \
-c:a:1 copy \
"output.conv.mkv"

Edit: Just thought I should mention, I originally used libfaac (with 96k bit rate), but actually meant to use libfdk_aac here. I changed it to aac in case anyone wants to use this command as is and have good quality. By the way, FFmpeg documentation says libfdk_aac > aac > libfaac.

2

Use ffmpeg as follows

ffmpeg -i input -vn -c:a aac -ac 2 stereo.mp4

ffmpeg -i input -i stereo.mp4 -c copy -map 0:v -map 1:a -map 0:a dualaudio.mp4
Gyan
  • 38,955