I have multiple MOV files and each file has different numbers of audio tracks. I want to convert those files to MOV and combine the audio into a single 12-channel audio track.
For example, I have a source file with 4 single-channel audio tracks, and that file has to be output to a file with a single 12-channel audio track. The 1st audio track from the source file must be output to the 1st channel; the 2nd track to the 2nd channel; the 3rd track to the 3rd channel; the 4th track to the 4th channel; and channels 5–12 in the output file will be left without audio.
Another example: If the source file has 6 single-channel audio tracks, then these 6 tracks will be mapped to channels 1-6 channels in the output file and channels 7-12 will be left without audio.
Below is my FFmpeg command. It completes the video transcode without issue and also outputs a single 12-channel audio track. The problem is that all the audio tracks from the source file are being combined in the 1st channel, and channels 2-12 have no audio. I'm using Switch Telestream Player to QC the files.
ffmpeg -i <input>.mp4 -c:v prores_ks -profile:v 0 -quant_mat 2 -c:a pcm_s16le -b:a 512K -filter_complex "[0:a]pan=mono|c0=c0[a0];[0:a]pan=mono|c0=c1[a1];[0:a]pan=mono|c0=c2[a2];[0:a]pan=mono|c0=c3[a3];[0:a]pan=mono|c0=c4[a4];[0:a]pan=mono|c0=c5[a5];[0:a]pan=mono|c0=c6[a6];[0:a]pan=mono|c0=c7[a7];[0:a]pan=mono|c0=c8[a8];[0:a]pan=mono|c0=c9[a9];[0:a]pan=mono|c0=c10[a10];[0:a]pan=mono|c0=c11[a11];[a0][a1][a2][a3][a4][a5][a6][a7][a8][a9][a10][a11]amerge=inputs=12[aout]" -map 0:v -map "[aout]" <out>.mov
I'm using FFAStrans and its included ffmpeg
executable to automate the movement and transcode of every file that has been placed in its watchfolder. Can you help me build the correct ffmpeg
command?
ffmpeg
command.