# Matroska Title saved by FFmpeg, is auto-deleted by Mp3tag after saving

**URL:** https://community.mp3tag.de/t/matroska-title-saved-by-ffmpeg-is-auto-deleted-by-mp3tag-after-saving/65083
**Category:** Fixed Bugs
**Tags:** bug-fixed
**Created:** [June 19, 2024, 8:43am UTC](https://community.mp3tag.de/t/matroska-title-saved-by-ffmpeg-is-auto-deleted-by-mp3tag-after-saving/65083 "2024-06-19T08:43:39Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Wakaku](https://community.mp3tag.de/user_avatar/community.mp3tag.de/wakaku/32/6418_2.png) [@Wakaku](https://community.mp3tag.de/u/Wakaku)
#### Post date: [June 19, 2024, 8:43am UTC](https://community.mp3tag.de/t/matroska-title-saved-by-ffmpeg-is-auto-deleted-by-mp3tag-after-saving/65083/1 "2024-06-19T08:43:39Z")

</div>

**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.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 19, 2024, 8:51am UTC](https://community.mp3tag.de/t/matroska-title-saved-by-ffmpeg-is-auto-deleted-by-mp3tag-after-saving/65083/3 "2024-06-19T08:51:09Z")

</div>

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  
 ![image](https://community.mp3tag.de/uploads/default/original/3X/1/e/1e1d13f5331169a90d764fcdf5c5b3b90f0f9469.png)

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 19, 2024, 9:08am UTC](https://community.mp3tag.de/t/matroska-title-saved-by-ffmpeg-is-auto-deleted-by-mp3tag-after-saving/65083/4 "2024-06-19T09:08:35Z")

</div>

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  
 ![image](https://community.mp3tag.de/uploads/default/original/3X/1/3/13a09ffae33f407ea8262dfb4ccee15f9cda7344.png)  
The content for TITLE is missing.  
The content of artist is written to ALBUMARTIST.

---

<div class="post-metadata">

### Author: ![Wakaku](https://community.mp3tag.de/user_avatar/community.mp3tag.de/wakaku/32/6418_2.png) [@Wakaku](https://community.mp3tag.de/u/Wakaku)
#### Post date: [June 19, 2024, 9:21am UTC](https://community.mp3tag.de/t/matroska-title-saved-by-ffmpeg-is-auto-deleted-by-mp3tag-after-saving/65083/5 "2024-06-19T09:21:28Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 19, 2024, 9:34am UTC](https://community.mp3tag.de/t/matroska-title-saved-by-ffmpeg-is-auto-deleted-by-mp3tag-after-saving/65083/6 "2024-06-19T09:34:23Z")

</div>

Yes you are right, the TITLE exists inside the MKV and it is showed from Windows File Explorer for example:

 ![image](https://community.mp3tag.de/uploads/default/original/3X/0/d/0d07e3cc8bc7f4a734cb3e9ffd7f616c056c473f.png)

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.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 19, 2024, 11:03am UTC](https://community.mp3tag.de/t/matroska-title-saved-by-ffmpeg-is-auto-deleted-by-mp3tag-after-saving/65083/7 "2024-06-19T11:03:00Z")

</div>

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](https://ffmpeg.org/doxygen/4.3/group __metadata__ api.html) to create a `dummy05.mkv` based on @Wakaku's `dummy01.mkv`:

```auto
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 copyright="8 ffmpeg Copyright" ^
-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:

 ![image](https://community.mp3tag.de/uploads/default/original/3X/3/9/397f1ab54c45b4aec9ca1884f96ce8e31c1cb8f1.png)

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**  
and  
TAGNAME **-language**

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 19, 2024, 11:20am UTC](https://community.mp3tag.de/t/matroska-title-saved-by-ffmpeg-is-auto-deleted-by-mp3tag-after-saving/65083/8 "2024-06-19T11:20:45Z")

</div>

This is the output of above 22 Tags from ffprobe.exe

```auto
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
    COPYRIGHT : 8 ffmpeg Copyright
    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

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [June 19, 2024, 12:05pm UTC](https://community.mp3tag.de/t/matroska-title-saved-by-ffmpeg-is-auto-deleted-by-mp3tag-after-saving/65083/9 "2024-06-19T12:05:54Z")

</div>

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](https://matroska.org/technical/tagging.html) 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](https://docs.mp3tag.de/mapping/) shows how Mp3tag maps, e.g., an `ARTIST` field on T=50 to the `ALBUMARTIST` field.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 19, 2024, 1:58pm UTC](https://community.mp3tag.de/t/matroska-title-saved-by-ffmpeg-is-auto-deleted-by-mp3tag-after-saving/65083/10 "2024-06-19T13:58:30Z")

</div>

Thank you for this useful information an links.

With the help of this Open Source [tageditor](https://github.com/Martchus/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:

 ![image](https://community.mp3tag.de/uploads/default/original/3X/7/6/76ff0009611ae2c988a8010dace1831e799b72fb.png) ![image](https://community.mp3tag.de/uploads/default/original/3X/d/f/df90cc3ca74190a80687caa4ff8ee451dcf2276e.png)

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

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [June 20, 2024, 9:22am UTC](https://community.mp3tag.de/t/matroska-title-saved-by-ffmpeg-is-auto-deleted-by-mp3tag-after-saving/65083/11 "2024-06-20T09:22:38Z")

</div>

I've just released [Mp3tag v3.26b](https://community.mp3tag.de/t/455) which should now also read the Matroska Segment title.

---

<div class="post-metadata">

### Author: ![Wakaku](https://community.mp3tag.de/user_avatar/community.mp3tag.de/wakaku/32/6418_2.png) [@Wakaku](https://community.mp3tag.de/u/Wakaku)
#### Post date: [June 20, 2024, 3:14pm UTC](https://community.mp3tag.de/t/matroska-title-saved-by-ffmpeg-is-auto-deleted-by-mp3tag-after-saving/65083/12 "2024-06-20T15:14:08Z")

</div>

Thanks, all is great, no issues so far. 👍🫶

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [July 20, 2024, 3:14pm UTC](https://community.mp3tag.de/t/matroska-title-saved-by-ffmpeg-is-auto-deleted-by-mp3tag-after-saving/65083/13 "2024-07-20T15:14:24Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
