Tools and other software MkvTagger: Edit tags MKV tags (incl. MP-TVSeries, TheTvDB.com, TheMovieDB, MusicVideos ...) (1 Viewer)

chefkoch

Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,129
    1,634
    Dresden / Munich / Maastricht
    Home Country
    Germany Germany
    Which tagger do you use for modifying the tags of your music files (MP3 ID3, ....)?
    Mp3tag? MusicBrainz Picard? MPTagThat? foobar? others, multiple ones, ...?

    Why do you even tag your music files?
    Because you might want to have more metadata embedded to be identified correctly by different media players?

    Editing meta data in video files?
    Why don't you put metadata like a movie's IMDB-id, or an episode's series name, season index and episode index in the tags of your video files?
    Because:
    • you use *.nfo files containing an IMDB-id for movies. fine, good way to make sure the file is being identified correctly. But do you create *.nfo files for all your series / episodes?
    • you use a defined file/folder structure, which works in most cases. If you decide to change filenames, you need to make sure the definition is still be able to detect the information.
    • you did not know that you are able to store a huge amount of metadata within your video files.
    How can I tag my video files?
    I am mainly talking about Matroska files here: *.mkv & *.mk3d
    Tagging Matroska audio files *.mka is also possible, but not topic of this thread nor of this tool.
    It is also possible to tag *.mp4 or *.m4v files, but this is also not topic of this thread.

    For general information about the Matroska container, please take a look at their official homepage & wikipedia.
    Information about Matroska tagging can be found at http://matroska.org/technical/specs/tagging/index.html .
    For muxing (converting) *.avi, *.mpg, *.flv, *.mp4 files and many other into Matroska I recommend the MkvToolnix.

    Difficulties to edit Matroska tags:
    • While having these xml files as tag file format, it is very flexible and extensible (You can include in your video files almost any metadata you want to), creating/editing those files is not very comfortable.
    • After the xml has been embedded within the *.mkv file, you can not change it directly.
    The following tools can be used to edit Matroska tags manually:
    • Extracting (reading) xml tags from Matroska files can be done by mkvextract.exe, which is included in the MkvToolnix.
    • Notepad (better Notepad++) for modifying the xml file.
    • Writing xml tags back to Matroska files can be done by mkvpropedit.exe without the need to remux a file. This is done in less the a second.
    Seems it is everything possible already. What is it about MkvTagger now?
    MkvTagger is simply supporting you with:
    • reading existing xml tags from MKV files
    • modifying the xml tags
    • writing them back into MKV file
    by executing the previously mentioned tools mkvextract.exe and mkvpropedit.exe and creating well-formed xml files containing your metadata, which you defined in the MatroskaTagger user interface.

    The download of the tool is attached to this post.
    The tool is still work in progress and it's GUI is not beautified, yet.
    The are still a lot of tags unused and not implemented, yet. New ones will be added from time to time. Missing ones can be added manually in the preview window of the new tag file.

    Before requesting a change or feature you should know that:
    • I won't include a feature to mux non-MKV files into MKV-files. This should be done manually to select audio stream languages and other properties or merge splitted video files into one MKV, etc.
      Take a look at Lehmden's Video2MKV tool for this task.
    Known issues:
    • Certification is not retrieved from theMovieDb.org
    • a lot of tags missing for musicvideos
    • SORT_WITH sub tag is not supported (i.e. Title sort by)
    • tags within an ORIGINAL tag are not supported, yet (i.e. original movie title)
    • CHARACTER (role) is not supported for actors
    Screenshots of the application:
    20130225_210756.png 20130225_210804.png 20130225_210810.png
    Screenshot of tagging a MusicVideo:
    20130307_125954.png
    Screenshots of MediaPortal 2 after reading them:
    20130226_151032.png 20130226_151038.png 20130226_151044.png 20130226_151050.png 20130226_151056.png
    Update 2013-04-03:
    20130403_054108.png 20130403_054136.png 20130403_054145.png 20130403_054444.png 20130403_054504.png20130403_054515.png20130403_054639.png
     

    Attachments

    • MkvTagger_2013-03-03.7z
      3.2 MB
    • MkvTagger_2013-03-07.7z
      3.2 MB
    • MkvTagger_2013-04-02.7z
      3.4 MB
    • MkvTagger_2013-04-03.7z
      3.4 MB
    Last edited:

    dir

    MP Donator
  • Premium Supporter
  • August 30, 2006
    408
    36
    Home Country
    Afghanistan Afghanistan
    Hi,
    Great idea. Testing now, will log thoughts as I go:

    - it would be nice if it defaulted to C:\ProgramData\Team MediaPortal\MediaPortal\database\TVSeriesDatabase4.db3, or at least the directory, saves navigating for 99% of users
    - I'm not sure if there's a problem that I have my TV files split in several places/machines. It only lets me specify one folder for media files.
    - stage 2, reading tags from existing mkv-files, is insane. It spawns a cmd shell for each of my 24,000 tv shows, which renders my PC unusable while it runs since each shell steals mouse/keyboard focus. Good news: This stage took only 8 mins, but really it needs to spawn a single cmd window or better yet, not display the cmd window at all so I can keep using my pc while its running.
    - stage 3, "Write Episode Infos" is alarming. What is it writing, and to what? Anything that is going to touch my collection should explain itself. (Yes, I know I should try this on a subset first for testing, but that's beside the point. Even when this has been tested, its still going to raise alarm bells)
    - starting stage 3 freezes the app/window for about a minute or two. I can see that its still using 1-2% of my CPU, but I don't know what its doing, how long its going to take, and whether its hung.
    - stage 4 brings up that cmd shell (mkvpropedit.exe) for each file, with the text "the file is analysed// The changes are written to the file." This needs to be a single display, showing which file its actively working on, again so that it doesn't render my PC unusable during the stage.
    - I don't know what stage 4 is doing - is it updating existing mkv files with a few bytes of text, or is it reading and writing each mkv file in and out? I have >15TB of files - reading/writing that amount of data would be totally insane. (And can I interrupt/kill it without damaging whatever file its working on?)
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,561
    3,943
    Lehmden
    Home Country
    Germany Germany
    Hi.
    I've set up a test Database with some Files from different series. All files are recognised. Only glitch is on "double episode single file". TVSeries did recognise them well. But in tag- file there is only the first episode. Maybe this is the only possibility, I don't know...

    The rapidly poping up and closing shell window is irritating. It's flickering really heavy on the screen. Would be better if the operation could be quiet...

    How can I read the new added tags? Mediainfo did not show them. And with MKVMerge I only can see there are tags but not what's inside those tags.

    After this is an "one night wonder" it's really good usable, great. Thanks a lot..

    "Write Episode Infos" is alarming. What is it writing, and to what?
    This is really self explaining. This tool creates Matroska Tag files (xml files). This is the main goal of this tool. No modifications are done to any of your videos up to stage 3.

    I don't know what stage 4 is doing - is it updating existing mkv files with a few bytes of text, or is it reading and writing each mkv file in and out? I have >15TB of files - reading/writing that amount of data would be totally insane. (And can I interrupt/kill it without damaging whatever file its working on?)
    Stage 4 modifies only a few bites on your mkv files, to add those tags generated in stage 3. Without this it's not that useful at all, but you don't need to do stage 4... mkvpropedit only modifies the header of the mkv file, not the entire file. If you use mkvmerge, you need to remux the whole file, but that's not the case with mkvpropedit (mainly the one and only reason mkvpropedit exists)...
     

    dir

    MP Donator
  • Premium Supporter
  • August 30, 2006
    408
    36
    Home Country
    Afghanistan Afghanistan
    Ah, good. Last question: Now that it has finished, can I delete the 24,000 .xml files it created? I assume these were only temporary and the contents of each is now safely inside each mkv file, thus I should be able to delete them. Yes?
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,561
    3,943
    Lehmden
    Home Country
    Germany Germany
    can I delete the 24,000 .xml files it created?
    As far as I understand it, yes you can. Keeping those files is really useful for all "Non- MKV" files in collection. If you later remux those files with MKVMerge you can add the tags easily...

    Cleaning up xml files that are successfully added to mkv files could be next step of improvement. But cleaning up only the proper added ones and leave those from avi, mpg,... untouched..
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,561
    3,943
    Lehmden
    Home Country
    Germany Germany
    Hi.
    I've modified a little AutoIt tool called "Video2mkv_convert" I once wrote to muxx wmv files to mkv. This was done through ffmpeg as mkvmerge can't open wmv.
    Now this tool is able to convert complete folders of video files to mkv and it adds (if available) the tag files generated by MPTvSeries2MKV to the resulting mkv. You can create the "filename.xml" tag file any way you like, but I've tested it only with xml- files generated by MPTvSeries2MKV. Supported container are avi, mpg, ts, mp4, mov, flv, wmv and ofc mkv. More to add is easy if they are supported by mkvmerge or ffmpeg...

    As no recoding is done the quality of the resulting file should be exactly the same as the original file...

    It's easy to use. simply extract the 7z archive to a place you like. English (default) and German language are available but it's easy to edit the language.au3 file with Notepad (or similar) to represent your language. If you want to use the German language you need to copy deutsch.au3 from language sub folder to language.au3 in main folder. If you create language files your own it would be great to post them here so other users from your country can use it too...

    Now you're ready to remuxx your TV Series collection to mkv. You choose the folder with incoming files (video and tag files) and the output dir (original files will be kept until you delete them manually) and let the program do its work. After a while (depends on file size, drive speed and of course on number of files) you have all your chosen videos newly remuxed to mkv...

    Source is included so you can modify the tool if you like and/or need...
     

    Attachments

    • Video2mkv_convert.7z
      8.2 MB

    dir

    MP Donator
  • Premium Supporter
  • August 30, 2006
    408
    36
    Home Country
    Afghanistan Afghanistan
    Interesting. Just tried running Video2mkv_convert.exe (I assume that's the right exe to run as there is alos "mkvmerge.exe" in the same archive). It's a command-line app but prompts to choose the source and destination directories via a pop-up.

    The first problem I have is that my TV collection is

    e:\tv\series 1\season 01\s01e01 - blah.avi
    e:\tv\series 2\season 01\s01e02 - blah.avi
    e:\tv\series 2\season 02\s02e01 - blah.avi etc.

    And there are 24,000 files across 400 series and probably 3000 season directories.

    So there's no way I can manually specify each and every one of them. And I can't create a script to do this automatically, because of the pop-up.

    Ideally, the program allows run-time parameters and won't prompt, and allows for things like:
    - destination directory is same as source
    - retain original file's date/time (don't create new file with today's date/time)
    - once file is "converted" to mkv, delete original video file AND xml file.

    Good idea for a utility, tho. If it can be run as I'm suggesting, it could also be included in torrent/sabnzbd download workflow.

    (and if you really want it to be cool, have it update the MP tv database file with the new filename so My TV_Series doesn't consider all the converted files as new!)
    And make sure it has a beer dispenser thingie on the side. All the new cool gadgets have beer dispensers on the side. Like video games. And trucks. And chicks.

    Not so much chicks.
     
    Last edited:

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,561
    3,943
    Lehmden
    Home Country
    Germany Germany
    It's a command-line app
    No it isn't. This App only calls a command line app to do the work (either ffmpeg.exe or mkvmerge.exe, depends on what type of input file is used)

    - destination directory is same as source
    This is possible, simply choose same dir for input and output...

    And I can't create a script to do this automatically
    The source is included. AutoIt is easier to learn and much more powerful than batch..

    - retain original file's date/time (don't create new file with today's date/time)
    As I need to create a new file (in = avi out = mkv) this is normal. I probably can preserve timestamp via FileGetTime() and FileSetTime() functions, maybe I will add this later...

    - once file is "converted" to mkv, delete original video file AND xml file.
    This could be added easily but I don't like it. It's too dangerous imho. You never know if the resulting file isn't damaged somehow...

    probably 3000 season directories.
    Nearly the same amount here, but I don't want to process this on entire collection at a glance. Too much files, too much time consumption... That's why I only work with copies of my files. I will see if I can add support for sub- dirs in next version..
     

    dir

    MP Donator
  • Premium Supporter
  • August 30, 2006
    408
    36
    Home Country
    Afghanistan Afghanistan
    Ah, yes, sorry, its not a cmd-line program, I was just launching it from there.

    I know I can specify the same destination directory as the source, but it takes 15 clicks to do so and doesn't remember across invocations. So to run this utility on multiple directories would be extremely tedious. Allowing the sub-directories option would go a long way to helping this.

    I take your point about not deleting the original, but giving the user the option, with red-text warnings would at least allow users the choice. As it stands, if the sub-directory option was available, I'd quickly run out of disk space through the mass duplication of all my files. So I'd either have to not use the subdirectory on the master folder, or repetitively run the app on hundreds of child folders. Having said that, I can see scenarios where something could go wrong - directory paths that are on read-only network shares or disconnections mid-copy, strange NAS behaviours, etc.
     

    Users who are viewing this thread

    Top Bottom