Skip to content

Muxing & TMDB


All of your muxing needs right here.

Here I should maybe also mention the available "tokens" you can use for the filename and mkv title templates in your Setup.


  • $show$
    The show name. Taken from the current Setup.
  • $ep$
    The episode number/string. Taken from the current Setup.
  • $crc32$
    Used to generate a crc32 for the resulting mux.
    You should probably not use this for the mkv title as setting mkv metadata will change the crc.
  • $title$
    Token for the episode title. This will only work if you use the TMDB integration.

Basic Usage

This assumes you have the variables created in the previous 3 wiki entries. (Encodes, Audio, Subs & Chapters)

from vsmuxtools import Setup, mux

setup = Setup("01")

    video_hevc.to_track(name="Vodes Encode", lang="jpn", default=True),
    audio.to_track("Japanese 2.0 (Amazon)", "jpn", True),
    subtitle.to_track("English (CR)", "en", True),
    *fonts, # The * is necessary to unpack the list into multiple "tracks"
# Note that this just returns the Path of the resulting mux. You can do whatever you feel like with it.


This package has a TMDB Integration so you can have episode titles and other various metadata in your mux.

from vsmuxtools import mux, TitleTMDB, TmdbConfig, TMDBOrder

# This is useful for if you don't really care about any of the other metadata besides the ep title.
mux(..., tmdb=TitleTMDB(117465))

# Otherwise you can have fun with every option using this
mux(..., tmdb=TmdbConfig(117465, write_date=True, write_ids=True, write_summary=True))

# You can also use episode groups/orders via their ID
# This for example selects the *proper* season 2 for jujutsu kaisen.
mux(..., tmdb=TmdbConfig(95479, 2, order="64a3fc4fe9da6900ae2fa807"))

# or auto-select an them using the enum
# Automatically fetches the same ID as the example right above this.
mux(..., tmdb=TmdbConfig(95479, 2, order=TMDBOrder.PRODUCTION))