Help… MKV file renaming

I recently had to reinstall my computer and so started again with a new install of Picard. I used to have a plugin which read .mkv and some other video files into Picard and could rename them… I now can’t find it to reinstall… does it still exist (I’m still using 2.6.4)

At a cursory glance, it looks like that plugin may have removed around 6 months ago:

1 Like

Yes, I removed this plugin recently because it was utterly broken since Picard switched to Python 3, all the tag writing code no longer worked. I wanted to actually write a proper Matroska plugin, but did not find the time to finish this yet.

If your only goal is to be able to load and rename Matroska files, without reading and writing tags, then you could use this simple plugin (untested):

PLUGIN_NAME = "Matroska file format"
PLUGIN_AUTHOR = "Philipp Wolfer"
PLUGIN_DESCRIPTION = "Allow loading and renaming Matroska files. No tagging."
PLUGIN_VERSION = '0.1'
PLUGIN_API_VERSIONS = ["2.0", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8"]
PLUGIN_LICENSE = "GPL-2.0-or-later"
PLUGIN_LICENSE_URL = "https://www.gnu.org/licenses/gpl-2.0.html"

from picard.file import File
from picard.formats import register_format
from picard.metadata import Metadata

class MatroskaFile(File):
    EXTENSIONS = [".mka", ".mkv", ".webm"]
    NAME = "Matroska"

    def _load(self, filename):
        metadata = Metadata()
        # Implement loading and parsing the file here.
        # This method is supposed to return a Metadata instance filled
        # with all the metadata read from the file.
        metadata['~format'] = self.NAME
        return metadata

    def _save(self, filename, metadata):
        # Implement saving the metadata to the file here.
        pass

register_format(MatroskaFile)

Just put the above in a text file, call it e.g. matroska.py and load that via “Install plugin” in Picard Options > Plugins

4 Likes

Thanks.

I was just a bit mystified … will test that code sometime :slight_smile:

Is there any work to readd this feature? I just ripped a Blu-ray of some Atmos music + 2 CDs. My CDs work fine because they’re FLAC, but my MKVs can’t get renamed automatically.

There’s an option to stream convert MKV to MP4, but it’s not as simple as “load up in MKVToolNix and hit go”.

I’d like to have full Matroska support, but currently there is not work for this. Have you only want to rename the files you can use the plugin I posted above.

2 Likes

That’s exactly what I want! :smiley: I’d like some ID3 info, but renaming is more important to me. Thanks!

I sure hope we can re-add support officially since I’ll be grabbing more Atmos discs (that also have 2-channel downmixes for non-Atmos players).