Skip to main content

vidmux

PyPi badge Python versions badge License badge GitHub issues badge

Inspect and modify video/audio/subtitle tracks using FFmpeg.

Developed and maintained by Philipp Meder.

Quick Start

Install this package:

pip install vidmux

You can get the newest stable version with:

pip install git+https://github.com/philippmeder/vidmux

License

Distributed under the BSD 3-Clause License.

Usage

You may directly call one of the two following lines:

vidmux [OPTIONS]
python -m vidmux [OPTIONS]

Features

For a full list of features, use:

vidmux --help
  1. Get codecs and audio/subtitle tracks
  2. Mux audio tracks
  3. Set audio/subtitle metadata
  4. Scan library structure
  5. Get video resolution
  6. Rename files
  7. Shift SRT timestamps

Scan for codecs, audio and subtitle tracks

Scan the video files of a library for video/audio codecs and the included audio and subtitle tracks.

vidmux scan [-h] [--extensions EXTENSION [EXTENSION ...]] [--print] [--json FILE] [--csv FILE] [--name FILE] [-l LANGUAGE_ID] library

Options:

  • library (positional): Path to the video library directory.
  • --extensions: Specify (multiple) file extensions to include in the scan.
  • --print: Print the results to the console/terminal.
  • --json: Specify a JSON file where the results should be saved.
  • --csv: Specify a CSV file where the results should be saved.
  • --name: Specify a JSON file where name suggestions will be stored (required for the rename feature).
  • -l, --default-language: Language identifier that will be used to interpret undefined languages of audio/subtitle tracks (currently only applied for naming suggestions).

Mux audio tracks

Mux multiple audio tracks into one video file using FFmpeg.

vidmux mux-audio-tracks [-h] [--dry-run] output inputs [inputs ...]

Options:

  • output (positional): Specify the output file.

  • inputs (positional): Pairs or triplets of inputs: input_file lang [title].

    Example: video_en.mp4 eng video_commentary_en.mp4 eng 'English Commentary' video_de.mp4 deu

  • --dry-run: Print the ffmpeg command without executing it.

Set audio and subtitle metadata

Set the metadata, i.e. language and title, for audio and subtitle tracks.

vidmux set-language [-h] --audio-lang LANGUAGE [LANGUAGE ...] [--subtitle-lang [LANGUAGE ...]]
[--audio-title [TITLE ...]]
[--subtitle-title [TITLE ...]]
[--dry-run]
input_file output_file

Options:

  • --audio-lang: List of language identifiers corresponding to the audio tracks, e.g. deu eng.
  • --subtitle-lang: List of language identifiers corresponding to the subtitle tracks, e.g. deu eng.
  • --audio-title: List of titles corresponding to the audio tracks.
  • --subtitle-title: List of titles corresponding to the audio tracks.
  • --dry-run: Print the ffmpeg command without executing it.

Scan for issues in the library structure

Scan and find issues in the structure of a movie library. Following rules are currently used:

  • Every movie should be in an appropriate subfolder with corresponding name, e.g. Seven Samurai (1954)/Seven Samurai (1954).mp4. It is okay to have multiple versions or parts in the same folder as long as the basic name does not change. Example:
    movie-library/Blade Runner (1982)
    ├── Blade Runner (1982) - [1080p].mp4
    ├── Blade Runner (1982) - [480p].mp4
    ├── Blade Runner (1982) - Director's Cut.mp4
    └── Blade Runner (1982) - Final Cut.mp4
    
  • Every movie should include a publishing year, e.g. Paris, Texas (1984).mp4.
  • The usual suspects of special characters are not allowed in the filename, i.e. <>:"/\\|?*.
vidmux lib-structure [-h] [--extensions EXTENSION [EXTENSION ...]] [--print] [--json FILE] [--csv FILE] library

Options:

  • library (positional): Path to the video library directory.
  • --extensions: Specify (multiple) file extensions to include in the scan.
  • --print: Print the results to the console/terminal.
  • --json: Specify a JSON file where the results should be saved.
  • --csv: Specify a CSV file where the results should be saved.

Get video resolution

Inspect and show the video resolution of a video file (supports URL).

vidmux resolution [-h] path_or_url

Rename files

Rename files according to a mapping given by a file (use vidmux scan --name).

vidmux rename [-h] [--no-backup] file

Options:

  • --no-backup: Prevent the creation of a file containing the original filename (so you can revoke the process).

Shift SRT timestamps

Shift all timestamps in a SRT subtitle file.

vidmux srt-tools [-h] -s SECONDS [-o FILE] [--inplace] [--show-count] input_file

Options:

  • -s, --shift: Timeshift in seconds (e.g. 1.5 or -0.8).
  • -o, --output: Output SRT file (if not provided: stdout or --inplace)
  • --inplace: Overwrite original file (a backup will be created).
  • --show-count: Show number of changed timestamps.

Requirements

  • ffmpeg with ffprobe has to be installed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vidmux-0.2.2.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vidmux-0.2.2-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file vidmux-0.2.2.tar.gz.

File metadata

  • Download URL: vidmux-0.2.2.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vidmux-0.2.2.tar.gz
Algorithm Hash digest
SHA256 e358552b443a617ebba7b979b70b7c5dcab1b35183e2d38f53ed2386a453c6df
MD5 46efcfc4193590eb8ffb0e6cfb6a43cb
BLAKE2b-256 7c8649c055884e19974a24889e4f6cd94ad9bf75c2525db8a2035bc5d4111c9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for vidmux-0.2.2.tar.gz:

Publisher: publish-python-package.yml on PhilippMeder/vidmux

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vidmux-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: vidmux-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vidmux-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b8ac44ed21262e0b368d5a692c65a93ae412d432b8e56349fb7d44b250d272a3
MD5 cb67d66a487c1fb04bd32ac470ae8e4a
BLAKE2b-256 f52cc15263df5f8c948ec8b4d579c3f713563e89501e9876b494074af7365d74

See more details on using hashes here.

Provenance

The following attestation bundles were made for vidmux-0.2.2-py3-none-any.whl:

Publisher: publish-python-package.yml on PhilippMeder/vidmux

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page