Edit MKV file

Discussion of advanced MakeMKV functionality, expert mode, conversion profiles
Post Reply
Wall.E
Posts: 10
Joined: Sun Nov 17, 2024 5:32 pm

Edit MKV file

Post by Wall.E »

Hi,

Quick questions: after ripping a Blu-ray, I got my MKV file, but realized I would like to update it.
(just update the movie name, some audio track names and some MKV flags)

It looks possible to edit the MKV file by opening it in MakeMKV, making the modifications and creating a new mkv file? (avoiding ripping the Blu-ray again for such minor modifications)

So any potential issues, drawback of doing that (vs new rip)?

Also, it looks like we can also do it using MKVToolNix.
Any advantage going via one tool or the other?

Thanks!
flojo
Posts: 116
Joined: Thu Jun 22, 2023 4:27 am
Location: El Paso

Re: Edit MKV file

Post by flojo »

No reripping of the disc, no. Also, never remux if you don't have to.

You can use mkvpropedit or with MKVToolNix GUI you can use the "Header editor" to modify values and then save the values (Ctrl+s or from top menu). This won't require remuxing so it saves in less than a second. Some things do require a remux, but generally descriptive text does not. Try the header editor first but if that falls short, then yes you'd have to remux to a new file.

I don't know how to do the same in place modifications with .mp4 as no tools seem to support modifying the file in place. I thought that GPAC/MP4Box would, but no. So, with mp4 I've had to resort to remuxing the entire file, which is a lengthy process, can be problematic with track delays and a bad copy operation can silently cause a glitchy/corrupt video.
dcoke22
Posts: 3148
Joined: Wed Jul 22, 2020 11:25 pm

Re: Edit MKV file

Post by dcoke22 »

I agree with flojo. I use mkvpropedit via the command line all the time to do things like change an audio track name or set a flag. The syntax is pretty straight forward and it has the benefit of being fast.

You can also do these things in MKVToolNix GUI, but that often takes longer to launch than it does to just use mkvpropedit on the command line.

While you can open the .mkv file in MakeMKV, change the values you want to change and then rip again, this is the least efficient method and is an unnecessary remux.
Wall.E
Posts: 10
Joined: Sun Nov 17, 2024 5:32 pm

Re: Edit MKV file

Post by Wall.E »

Thanks both for your answers!
Very useful :D

So far I've used the Header editor of MKVToolNix (even though the ergonomics is poor) and it has been sooo much faster than to remux/rerip the files.
For updating names & flags it's just perfect! Thanks :)

Now, my last issue is when I need to remove (not add) some audio tracks or subtitles.
So... naive question: is there a quick way to do it, without having to remux/rerip the file or BD?

I explain you why I have this need.
It's a little different than the first time where it was more that I learned about names and flags and wanted to update some of my old rips.

This time the issue is for new rips. I always need to keep the English and French audio tracks and subtitles, of the movie only!
No comments, interviews or special versions for persons with disabilities.

But very often, it's not that simple. There are multiple English and/or French audio tracks and subtitles. And it's not always easy to identify which one is which.
Here is an example with the subtitles...
https://youtu.be/mVzUxkFyEKE?si=JmmxnXzUfdo3FiSj&t=1077

So most of the time, I have to rip the BD a first time, identify what is what (including with software like Subtitle Edit) and then... rip the final version.
BUT... if I could rip the first time with all the English and/or French audio tracks and subtitles, and then remove the ones I don't want from the mkv file/container, like I can now later on edit names & flags, it would be awesome! I would always have to rip only one 1 time a disk instead of 2 most of the time :)
dcoke22
Posts: 3148
Joined: Wed Jul 22, 2020 11:25 pm

Re: Edit MKV file

Post by dcoke22 »

You'll have to remux/rerip to remove audio tracks or subtitles.

MakeMKV allows you to create a decrypted backup of a disc. You can do this by using the icon of the yellow folder with the green arrow on the first screen in MakeMKV. This will get MakeMKV to copy the entire contents of a disc to a folder (in the case of a blu-ray or UHD) or an .iso file (in the case of a DVD) on your computer. You can then open this backup in MakeMKV and create .mkv files from this backup. However, it'll create .mkv files much, much faster than reading from the optical disc. This makes the cost of making a second .mkv file with adjustments to audio tracks, etc. very low.
By creating the decrypted backup, for blu-rays, you can even go into the BDMV/STREAM/ folder in the backup and find the .m2ts file(s) of the movies and play them before you rip to make a better guess at which tracks are which. The specific .m2ts file(s) for a title can be found in the 'segment map' line of the details about a title in MakeMKV.
MartyMcNuts
Posts: 2919
Joined: Wed Nov 22, 2017 11:45 pm

Re: Edit MKV file

Post by MartyMcNuts »

Wall.E wrote:
Wed Nov 20, 2024 4:02 pm
Thanks both for your answers!
Very useful :D

So far I've used the Header editor of MKVToolNix (even though the ergonomics is poor) and it has been sooo much faster than to remux/rerip the files.
For updating names & flags it's just perfect! Thanks :)

Now, my last issue is when I need to remove (not add) some audio tracks or subtitles.
So... naive question: is there a quick way to do it, without having to remux/rerip the file or BD?

I explain you why I have this need.
It's a little different than the first time where it was more that I learned about names and flags and wanted to update some of my old rips.

This time the issue is for new rips. I always need to keep the English and French audio tracks and subtitles, of the movie only!
No comments, interviews or special versions for persons with disabilities.

But very often, it's not that simple. There are multiple English and/or French audio tracks and subtitles. And it's not always easy to identify which one is which.
Here is an example with the subtitles...
https://youtu.be/mVzUxkFyEKE?si=JmmxnXzUfdo3FiSj&t=1077

So most of the time, I have to rip the BD a first time, identify what is what (including with software like Subtitle Edit) and then... rip the final version.
BUT... if I could rip the first time with all the English and/or French audio tracks and subtitles, and then remove the ones I don't want from the mkv file/container, like I can now later on edit names & flags, it would be awesome! I would always have to rip only one 1 time a disk instead of 2 most of the time :)
Just uncheck those unwanted tracks in mkvtoolnix GUI and mux the output. It'll only take a few minutes to complete.
Cheers :D
----------------------------------------------------------------------------------------------------------------------------
For UHD enabled drives (AU/NZ/SG + Others) & DIY Single Drive Flasher (WW): https://uhdenableddrives.com
Wall.E
Posts: 10
Joined: Sun Nov 17, 2024 5:32 pm

Re: Edit MKV file

Post by Wall.E »

MartyMcNuts wrote:
Wed Nov 20, 2024 8:49 pm
Just uncheck those unwanted tracks in mkvtoolnix GUI and mux the output. It'll only take a few minutes to complete.
It can take 10mn, but it's still better than a rip that can take 40mn+.

But is there any consequence on the quality of the video or audio vs a new rip?
Or is it exactly the same, remaining video or audio are not modified by this type of remux where we just remove one track?
Epitaph
Posts: 21
Joined: Tue Oct 17, 2023 6:44 pm
Location: Norfolk, VA USA

Re: Edit MKV file

Post by Epitaph »

Wall.E wrote:
Thu Nov 21, 2024 11:07 am
But is there any consequence on the quality of the video or audio vs a new rip?
Or is it exactly the same, remaining video or audio are not modified by this type of remux where we just remove one track?
Remuxing will just take the video/audio tracks selected(as they are) and place them in a new mkv container.
Wall.E
Posts: 10
Joined: Sun Nov 17, 2024 5:32 pm

Re: Edit MKV file

Post by Wall.E »

Epitaph wrote:
Thu Nov 21, 2024 1:28 pm
Remuxing will just take the video/audio tracks selected(as they are) and place them in a new mkv container.
Thanks!
dcoke22 wrote:
Wed Nov 20, 2024 4:18 pm
By creating the decrypted backup, for blu-rays, you can even go into the BDMV/STREAM/ folder in the backup and find the .m2ts file(s) of the movies and play them before you rip to make a better guess at which tracks are which. The specific .m2ts file(s) for a title can be found in the 'segment map' line of the details about a title in MakeMKV.
That's interesting, thanks! :D

I've tried. Backup OK, find the files OK, but I can't read any .m2ts :?
I tried quickly with VLC, PowerDVD, Windows Media Player, none of those accept to read the .m2ts, while I think they should.
What's the trick? Thanks!
MartyMcNuts
Posts: 2919
Joined: Wed Nov 22, 2017 11:45 pm

Re: Edit MKV file

Post by MartyMcNuts »

Wall.E wrote:
Sun Nov 24, 2024 6:34 pm
Epitaph wrote:
Thu Nov 21, 2024 1:28 pm
Remuxing will just take the video/audio tracks selected(as they are) and place them in a new mkv container.
Thanks!
dcoke22 wrote:
Wed Nov 20, 2024 4:18 pm
By creating the decrypted backup, for blu-rays, you can even go into the BDMV/STREAM/ folder in the backup and find the .m2ts file(s) of the movies and play them before you rip to make a better guess at which tracks are which. The specific .m2ts file(s) for a title can be found in the 'segment map' line of the details about a title in MakeMKV.
That's interesting, thanks! :D

I've tried. Backup OK, find the files OK, but I can't read any .m2ts :?
I tried quickly with VLC, PowerDVD, Windows Media Player, none of those accept to read the .m2ts, while I think they should.
What's the trick? Thanks!
When doing folder backup, did you ensure the decryption checkbox was checked?
Cheers :D
----------------------------------------------------------------------------------------------------------------------------
For UHD enabled drives (AU/NZ/SG + Others) & DIY Single Drive Flasher (WW): https://uhdenableddrives.com
Wall.E
Posts: 10
Joined: Sun Nov 17, 2024 5:32 pm

Re: Edit MKV file

Post by Wall.E »

MartyMcNuts wrote:
Sun Nov 24, 2024 9:20 pm
When doing folder backup, did you ensure the decryption checkbox was checked?
Of course not... :roll: :oops:
It works better now.
Thank you! :)
Post Reply