Edit MKV Cover Art Names?

Everything related to MakeMKV
Post Reply
Kogia
Posts: 4
Joined: Mon Nov 16, 2015 1:48 pm

Edit MKV Cover Art Names?

Post by Kogia »

I've recently finished going through all my video files converting them all to MKV with correct subtitles, cover art, etc. However I've just learnt that I named the cover art files wrong, I called them whatever the name of the movie was, followed by ''cover'' (eg. ''28 Days Later cover'') and it seems to get them to display as thumbnails each just has to be called ''cover''.

Is there any way I can edit just the titles of these cover arts, or do I have to go through the whole process of MKVMerging again?

Notepadd xx doesn't work because the files are too big.

Thanks in advance.
ndjamena
Posts: 830
Joined: Mon Jan 07, 2013 12:23 am

Re: Edit MKV Cover Art Names?

Post by ndjamena »

for %%g in (*.mkv) do (
MKVExtract attachments "%%~fg" 1:"%%~dpng.jpg"
MKVPropEdit "%%~fg" --attachment-name cover.jpg --replace-attachment 1:"%%~dpng.jpg"
)

That should work, I'm not going to test it though.
Kogia
Posts: 4
Joined: Mon Nov 16, 2015 1:48 pm

Re: Edit MKV Cover Art Names?

Post by Kogia »

Ndjamena, thanks very much for your reply, unfortunately I think I probably need what you've suggested in more simple step by step ways as I didn't understand that at all.

All I've ever used MKVMerge for is the basic converting of files to MKV and removing subtitle tracks, etc. It looks like you're talking about editing something and I'm happy to give that a go, but I'm not familiar with this software enough to know straight away what your suggestion is.

Thanks again in advance.

I should also add, I don't need to do this all as a batch if that makes it really complicated, I can do each dvd, I just didn't want to have to go through the whole process of finding and downloading the cover art, then remixing the whole movie again.
ndjamena
Posts: 830
Joined: Mon Jan 07, 2013 12:23 am

Re: Edit MKV Cover Art Names?

Post by ndjamena »

Are you using window?

If so copy and paste this:

Code: Select all

for %%g in (*.mkv) do (
MKVExtract attachments "%%~fg" 1:"%%~dpng.jpg"
MKVPropEdit "%%~fg" --attachment-name cover.jpg --replace-attachment 1:"%%~dpng.jpg"
)
pause
into notepad and save it into the directory with the MKVs as whatever.bat (ie with a .bat extension) then double-click the .bat file.

if you need to process an entire directory tree use "for /r" instead of "for"

(oh, you might need to either add the MKVToolNix directory to the PATH environment variable or add the full paths of the executables into the script (ie replace "MKVExtract" with the full path of the MKVExtract.exe executable etc.)
Last edited by ndjamena on Tue Nov 17, 2015 3:11 pm, edited 1 time in total.
Kogia
Posts: 4
Joined: Mon Nov 16, 2015 1:48 pm

Re: Edit MKV Cover Art Names?

Post by Kogia »

Thanks again, that extracted the images from the file so I now have the attachments as separate jpgs again, but it didn't change the names within the file.

This means I will need to go through and re-Merge each movie, is there a code that would simply change the attachment name within the mkv?
ndjamena
Posts: 830
Joined: Mon Jan 07, 2013 12:23 am

Re: Edit MKV Cover Art Names?

Post by ndjamena »

Unless something went wrong it should have changed the name, it did in my file...

Other than this:

https://github.com/mbunkus/mkvtoolnix/issues/1513


Assuming the images were the only attachments in the file the MKVPropEdit command should have renamed the images inside the file...

What's happened exactly?

Can you still see the attachments using MKVMerge -I?

Does MKVToolNixGUI list them when you drop the files onto it?

How are you determining the file names didn't change?

Did you see any errors being outputted as the batch ran?

I probably should have added a "pause" at the end of the batch (fixed)... you can always add the line and run it again to check for errors...
Kogia
Posts: 4
Joined: Mon Nov 16, 2015 1:48 pm

Re: Edit MKV Cover Art Names?

Post by Kogia »

Did it, thank you very much for your help with that. Saved me a hell of a lot of time and my movies folder now looks like a Blockbuster video store.

many thanks.
TonyaRose312
Posts: 1
Joined: Mon Apr 17, 2017 3:09 pm

Re: Edit MKV Cover Art Names?

Post by TonyaRose312 »

You can find here: videostudiopro.com a very simple editor for these things that works wonders with .mkv files :)
Post Reply