PDA

View Full Version : mkv: Changing track name or language without remuxing?


bur
21st May 2009, 23:31
I have a couple of videos where the language is set to undefined. Is it possible to change that without having to remux the whole mkv file? Most are rather large HD videos, so remuxing takes some time.

I think language is probably just a flag in the container so changing it should be easy. But does mkvtoolnix support it?

If not, I wouldn't mind manual hex editing, but for that I'd need to know where the language of a track is specified.

Keiyakusha
21st May 2009, 23:57
You can try header editor in mkvmergeGUI, but on large HD videos (I tested on 12GiB mkv) it takes some time too.

bur
22nd May 2009, 08:14
Thanks, I was still using 2.1 and there was no such editor. I'll try that one then.


edit: Works fine, the files needs to be parsed which takes some time but it's still faster than a complete rewrite of the file.

Death KnightŪ
30th May 2009, 00:27
You can use hex editor for that too :)
Really painful at first, but you get familiar after some time.

In hex editor, you needed to search "22B59C" hex. At screenshoot. There ıs 2 of that hex. One for each track ( 1 for video and 1 for audio track).

http://wxhexeditor.sf.net/images/wxhexeditor-mkv-scrnsht.png

"22B59C" hex key (marked with green, upper area of mouse cursor) means language flag, there "83" hex after that indicates language data is 3 letter and than "und" text string that defines language. If you change "und" to "eng", that track language set as english.
Note: I marked all of flags in that MKV with hand. Your hex editor (probably) will not identify that flags automatically. :)

I insist that there are some tools that you can set MKV language on the fly. If there is no one, I will make it one later if there is needing on this way.

So what I am doing with this colorful hex editor? I am author of "DivFix++ (http://divfixpp.sf.net)" and trying to implement MKV repair tool. I think it will be released this year. :)

Mosu
7th June 2009, 19:44
It's true that you can set the language in most files with a hex editor because 1) most muxers always add the language tag and 2) the language tag is always three characters long. However, the track name parameter is often not present at all, and if it is then the name you want to change it to might not be the same length. So a hex editor is of no use in those cases.