[FFmpeg-user] How do you keep all video metadata when transcoding using ffmpeg?
Dennis Mungai
dmngaie at gmail.com
Fri Oct 13 11:25:11 EEST 2023
On Thu, 12 Oct 2023, 22:18 William C Bonner, <wimbonner at gmail.com> wrote:
> In my experience, adding a -map 0 option makes copying all the extra stuff
> more likely. This was my command to compress a DVD I'd ripped to an MKV
> file, converting the video to h.264 but copying all of the other tracks and
> details.
>
> C:\WINDOWS\ffmpeg.exe -i
> "J:\DVD\_BARB_AND_STAR_GOTO_VISTA_DEL_MAR_88C3\Barb and Star Go to Vista
> Del Mar (2021)_t00.mkv" -c:v libx264 -crf 17 -preset veryfast -c:a copy
> -c:s copy -map 0 -movflags +faststart -n
> "J:\DVD\_BARB_AND_STAR_GOTO_VISTA_DEL_MAR_88C3\Barb and Star Go to Vista
> Del Mar (2021)_t00.x264.mkv"
>
You'll need to add -map_metadata 0 after -map 0.
If you're dealing with mp4 input and outputs, you'll additionally need to
add -movflags use_metadata_tags right before the mp4 muxer.
>
More information about the ffmpeg-user
mailing list