This application scans a directory and its subdirectories for video files and ensures they are in a Jellyfin-friendly format.
- Container: Converts non-mp4/mkv files to
.mp4. - Video Codec: Re-encodes video to H.264 (x264) if not already H.264 or H.265 (HEVC).
- Audio Codec: Re-encodes audio to AAC if not already AAC.
- Backup: Original files are renamed with a
.bakextension. - Output: New files are always
.mp4if conversion is required.
- Python 3.12+
uvpackage managerffmpeginstalled on your system and available in PATH.
-
Install dependencies: Navigate to this directory and run:
uv sync
-
Run the converter:
uv run main.py /path/to/your/video/library
Or if you are in the root of the repo:
uv run video_converter/main.py /path/to/your/video/library
- Allowed input extensions: mp4, mkv, avi, mov, flv, wmv, webm, m4v, mpg, mpeg, 3gp.
- Target format:
- Container:
.mp4 - Video:
libx264(H.264) - Audio:
aac
- Container:
- If a file is already compliant (e.g., an
.mkvwith H.264 and AAC), it is skipped.