1.
Say create a
dummy01.mkv
MKV file with FFmpeg. Say 10 secs, no audio. I just based the code below from a Stack Overflow post years ago, as I am just a regular user.
ffmpeg.exe -y -hide_banner -t 10 -f lavfi -i color=c=gray:s=200x200 -an -sn dummy01.mkv
2.
Use FFmpeg to put a
Title
into that
dummy01.mkv
. Save as a new
dummy02.mkv
.
ffmpeg.exe -y -hide_banner -i dummy01.mkv -metadata "title=ABCXYZ" -c:v copy -an -sn dummy02.mkv
3.
Open that new
dummy02.mkv
with Mp3tag. Say put a value in the
genre
box, say
comedy
, then save. Then the
Title
is gone or deleted from the MKV file. Such "Title" is labeled as
Movie name
in MediaInfo, while in Windows' File Explorer, the column title in Details View is also Title.
I had a previous similar post. Back there, MKVToolNix GUI and its mkvpropedit.exe were used instead. Same issue of the Title getting auto-deleted by Mp3tag after modifying an input box and then saving.
Please, please check on this. Numerous of my MKV files lose their titles all at once after modifying with Mp3tag.
On your step
#3
I can't see that the TITLE was read from your MKV at all.
I can find the text
ABCXYZ
in the mkv, but not anywhere in Mp3tag after executing your step
#2
and loading
dummy02.mkv
The only Tag content visible in
Alt
+
T
is ENCODER
For a test I tried this command to add some further metadata:
ffmpeg.exe -y -hide_banner -i dummy01.mkv -metadata title="ffmpeg Title" -metadata year=2024 -metadata artist="ffmpeg Artist" -metadata album="ffmpeg Album" -metadata genre="ffmpeg Pop Rock" -metadata comment="ffmpeg Comment" -c:v copy -an -sn dummy04.mkv
Mp3tag displays only
The content for TITLE is missing.
The content of artist is written to ALBUMARTIST.
But the TITLE is in fact inside of the MKV file, as proven by FFprobe, MediaInfo, and Windows File Explorer's Title column in Details View. If opened by MKVToolNix GUI, it's also there.
The FFmpeg command of putting the Title into the Matroska file is just the same for other formats like Mp4 and Mp3 files.
All of them are compatible with each other. If remuxed by MKVToolNix, that Title is preserved.
I have been batch tagging Matroska files before with Mp3tag, and such issue did not exist back in time. If I try to look back hard, my guess is 2022-2023 range when the issue manifested. I have old MKV files since the 2019, and no Title auto-deletion issue back then.
I just tested with MPC-HC, MPC-BE, VLC, KMPlayer, SMPlayer, and mpv (mpv.exe), and all of such players displayed that Title in their respective titlebars.
Nonetheless, Mp3tag shouldn't be auto-deleting whatever the value is in that Title. Especially if a different input box is modified by Mp3tag, just like in my example earlier, the
genre
box.
Yes you are right, the TITLE exists inside the MKV and it is showed from Windows File Explorer for example:
But the TITLE seems not to be read from Mp3tag.
And you are right:
Mp3tag seems to write the content back in way that - for example ExifTools - can't read it anymore.
The TITLE seems to get lost completely.
As I don't use Mp3tag for MKV yet, I created a test batch file including all the Tags from the ffmpeg
Public Metadata API
to create a
dummy05.mkv
based on
@Wakaku
's
dummy01.mkv
:
ffmpeg.exe -y -hide_banner -i dummy01.mkv ^
-metadata album="1 ffmpeg Album" ^
-metadata album_artist="2 ffmpeg Album Artist" ^
-metadata artist="3 ffmpeg Artist" ^
-metadata artist-sort="4 ffmpeg Artist Sort" ^
-metadata author-ger="5 ffmpeg Author GER" ^
-metadata comment="6 ffmpeg Comment" ^
-metadata composer="7 ffmpeg Composer" ^
-metadata creation_time="9022-12-31T12:34:56.78Z" ^
-metadata date="1024-06-20" ^
-metadata disc="11" ^
-metadata encoder="12 fmpeg Encoder" ^
-metadata encoded_by="13 ffmpeg Encoded By" ^
-metadata genre="14 ffmpeg Pop Rock" ^
-metadata language="15 ffmpeg GER,ENG" ^
-metadata performer="16 ffmpeg Performer" ^
-metadata publisher="17 ffmpeg Publisher" ^
-metadata service_name="18 ffmpeg Service Name" ^
-metadata service_provider="19 ffmpeg Service Provider" ^
-metadata title="20 ffmpeg Title" ^
-metadata track="21" ^
-metadata year=2024 ^
-c:v copy -an -sn dummy05.mkv
This results in this Mp3tag View -> Extended Tags list:
From the 22 Tags written from ffmpeg into the dummy05.mkv
you can see that 20 are read by Mp3tag.
The Tag #3 artist is displayed as ALBUMARTIST
The Tag #4 artist-sort is displayed as ARTIST-SORT*
The Tag #5 author-ger is displayed as AUTHOR*
The Tag #9 creation_time is missing
The Tag #12 encoder seems not be set with my individual content but with the fixed ffmpeg-Lavf-encoder version.
The Tag #16 performer is displayed as LEAD_PERFORMER
The Tag #20 title is missing.
The Tag #21 track is displayed as DISCNUMBER in Mp3tag.
We can't find ARTIST or TITLE in Mp3tag currently.
* According to the API documentation there at least two modifiers:
TAGNAME -sort
TAGNAME -language
This is the output of above 22 Tags from ffprobe.exe
Input #0, matroska,webm, from 'dummy05.mkv':
Metadata:
title : 20 ffmpeg Title
track : 21
creation_time : 2008-05-07T17:40:12.265380Z
DISC : 11
ALBUM : 1 ffmpeg Album
ALBUM_ARTIST : 2 ffmpeg Album Artist
ARTIST : 3 ffmpeg Artist
ARTIST-SORT : 4 ffmpeg Artist Sort
AUTHOR-ger : 5 ffmpeg Author GER
COMMENT : 6 ffmpeg Comment
COMPOSER : 7 ffmpeg Composer
DATE : 1024-06-20
YEAR : 2024
ENCODED_BY : 13 ffmpeg Encoded By
GENRE : 14 ffmpeg Pop Rock
LANGUAGE : 15 ffmpeg GER,ENG
performer : 16 ffmpeg Performer
PUBLISHER : 17 ffmpeg Publisher
SERVICE_NAME : 18 ffmpeg Service Name
SERVICE_PROVIDER: 19 ffmpeg Service Provider
ENCODER : Lavf60.16.100
Duration: 00:00:10.00, start: 0.000000, bitrate: 5 kb/s
Stream #0:0: Video: h264 (High), yuv420p(progressive), 200x200 [SAR 1:1 DAR 1:1], 25 fps, 25 tbr, 1k tbn
Metadata:
ENCODER : Lavc60.31.102 libx264
DURATION : 00:00:10.000000000
I can not yet explain the difference for the creation_time content.
The Tag #3 artist is displayed as ARTIST
The Tag #20 title is displayed as title
It seems that ffmpeg is writing TITLE
to the Segment Title and not to the Tags. Mp3tag only reads Tags and Chapter information from Matroska. I'll look into this.
@LyricsLover Matroska has a very advanced tagging system which seems to be not really supported by ffmpeg (at least not via these command line parameters).
If you're interested you can read Matroska → Technical Info → Tags where the concept of Target Types is discussed. It allows for the same tag field, e.g., artist to be stored for different levels. In this context T=50 means the album level and T=30 the track level. Tag Field Mappings – Mp3tag Documentation shows how Mp3tag maps, e.g., an ARTIST
field on T=50 to the ALBUMARTIST
field.
Thank you for this useful information an links.
With the help of this Open Source tageditor I was able to fill the "default" mkv tags in the Levels 30, 50 (and 60 collection level) and this is how they look in Mp3tag:
So you are right (as expected):
The L30 Artist would be filled into Mp3tag ARTIST
The L30 Title would be filled into Mp3tag TITLE
The L50 Artist will be filled into Mp3tag ALBUMARTIST