[FFmpeg-user] mkv from hevc to h264

Kieran O Leary kieran.o.leary at gmail.com
Thu Mar 24 10:09:51 CET 2016

On 24 Mar 2016 5:05 a.m., "Molteni Davide" <dave.molteni at gmail.com> wrote:
> Hi all,
> can you please help me?
> I want to convert in a mkv file only the video encoding from hevc (h265)
> h264 without loosing all the audio tracks in AC3/DTS/... and subtitles.

Hi Dave,

Example 4 in the FFmpeg map wiki looks like the solution but they use mpeg2
as their example. <https://trac.ffmpeg.org/wiki/Map>https
<https://trac.ffmpeg.org/wiki/Map>:// <https://trac.ffmpeg.org/wiki/Map>
trac.ffmpeg.org <https://trac.ffmpeg.org/wiki/Map>/wiki/Map

ffmpeg -i inputfile -map 0 -c:a copy -c:s copy -c:v libx264 output.mkv

Is how I'd do it.

You could get more specific and use -map 0:a and -map 0:s in order to
specify subs and audio only.

More information about the ffmpeg-user mailing list