'Convert multiple audio tracks using ffmpeg

I need to add multiple audio tracks into a single file:

ffmpeg -i 1.mpg -i 1.wav -i 2.wav -map 0:v -c:v copy -map 1:a -c:a ac3 -b:a 256k -map 2:a -c:a pcm_dvd out.vob

the 1st audio needs to be converted to ac3, the 2nd to pcm, after I ran the command, both audio tracks were converted to pcm format, what's the right way to do this?



Solution 1:[1]

I figured it out myself:

ffmpeg -i 1.mpg -i 1.wav -i 2.wav -map 0:v -map 1:a -map 2:a -c:v copy -c:a:0 ac3 -b:a:0 256k -c:a:1 pcm_dvd 2.vob

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tonitang