I have a video file in MKV format. I like the quality of the video, but I dislike having the audio in FLAC format since I decided it takes up too much space.
It is a dual audio file—it’s an anime with Japanese and English audio—and it has several subtitle streams inside as well.
This is the command I use:
ffmpeg -i "01.mkv" -c:v copy -c:a ac3 -c:s copy "test.mkv"
However it only gets the first audio and first subtitle string. I need help with the map option for multiple streams.
-map 0:a? -map 0:s? -map 0:v
before your-c:v
, but apart from that it looks okay to me.ffmpeg -i "01.mkv" -map 0:a? -map 0:s? -map 0:v -c:v copy -c:a ac3 -c:s copy "test.mkv"
-map 0:a:1
would specify only to copy audio stream number 1, while-map 0:a?
should effectively wildcard it and copy them all.