S
S
Satisfied IT2019-08-04 19:34:42
fmpeg
Satisfied IT, 2019-08-04 19:34:42

How to save all audio tracks when converting ffmpeg video?

I convert the videos I need to the format hevcusing ffmpegthe following parameters

ffmpeg -y -i inpit.mkv -g 30 -c:a copy -c:v hevc_amf output.mkv
and everything is great. But one unpleasant problem was discovered - if there are several audio tracks in the video, then only one of them remains at the output. What keys to specify so that all the tracks in the file are copied? I read about the parameter -map, but this is if I need to add several tracks, and I want to get the sound as it was in the original.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Taus, 2019-08-04
specialist @borisdenis

ffmpeg -y -i input.mkv -map 0:a -g 30 -c:a copy -c:v hevc_amf output.mkv

-map 0:atogether with -c:a copyallows you to copy all audio tracks as they were in input.mkv.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question