Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
![]() |
#1 | Link |
Registered User
Join Date: Jun 2012
Posts: 70
|
Metadata Issues With MKV to MP4 using FFMpeg
Hello,
I use MKVToolNix for simple mkv container manipulations, muxing, demuxing, etc.. In MKVToolNix, when muxing, i usually set a language and a title for the video and audio tracks. Now i'm trying to batch convert a bunch of mkv files to mp4 container without reencoding. The mkvs mostly consist of h264 video and aac audio, though i don't think that changes anything in what i'm trying to do. To do that, i'm using ffmpeg with the following command lines: ffmpeg -i in.mkv -acodec copy -vcodec copy out.mp4 (for videos having 1 single video stream + 1 single audio stream) and ffmpeg -i in.mkv -map 0:0 -vcodec copy -map 0:1 -acodec copy -map 0:2 -acodec copy out.mp4 (for videos having 1 single video stream + 2 audio streams) However, only the language "tags" or metadata are being transferred. For example, in MediaInfo, the mkvs have a "title: bla bla" entry, whilst the mp4s don't. I've been reading about -metadata, -map_metadata and metadata_specifier for stream tagging in ffmpeg, but can't seem to figure out how to achieve what i want. So my 2 questions are: 1) How can i automatically transfer the "title" data from mkvs to mp4s (it probably has to do with -map_metadata in ffmpeg)? 2) At least, how can i set "title" metadata for individual streams using ffmpeg (regardless of the values present in the mkv files, meaning how to set new values, regardless of the batch conversion i'm trying to do)?? |
![]() |
![]() |
![]() |
#2 | Link |
Registered User
Join Date: Jun 2012
Posts: 70
|
Still haven't figured this out on my own.
Just to clear things out, i'm asking how to set individual track names in output files in ffmpeg. Then, after that's done, maybe a way i can automatically transfer track names and languages from input to output files in ffmpeg. Somebody?? |
![]() |
![]() |
![]() |
#4 | Link |
Registered User
Join Date: Nov 2005
Posts: 684
|
I may be wrong, but I've got a hunch the MP4-container doesn't support stream titles.
Code:
ffmpeg.exe -i in.mkv -c copy out.mp4 Code:
ffmpeg.exe -i in.mkv -c copy -metadata:s:0 title="video stream" -metadata:s:1 title="audio stream" out.mp4
__________________
My hobby website |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|