Skip to main content

Convert DAV/video files to MKV/MP4 via FFmpeg stream copy

Project description

DAV2MKV: The Ultimate DAV to MKV/MP4 Converter

A Python command-line tool for converting DAV video files to MKV or MP4 while maintaining perfect quality through stream copying. dav2mkv uses FFmpeg to perform direct stream copy operations, ensuring no quality loss during conversion.

Features

  • Direct stream copy (no quality loss)
  • Maintains all original streams (video, audio, subtitles)
  • Batch processing with parallel directory conversion
  • Convert a single file or an entire folder of files
  • Specify the output container format (MKV or MP4, default is MKV)
  • Display detailed video information before conversion
  • Progress tracking
  • Cross-platform compatibility (Windows, macOS, Linux)

Prerequisites

  1. Python 3.12+
  2. FFmpeg and FFprobe installed and available in your system PATH

Installing FFmpeg

FFmpeg can be installed using various package managers or directly from its website:

Windows

  • Download the latest static build from gyan.dev.
  • Extract the files and add the bin folder to your system's PATH.
  • Use a package manager:
    • Winget:
      winget install ffmpeg
      
    • Chocolatey:
      choco install ffmpeg-full
      

macOS

  • Use Homebrew:
    brew install ffmpeg
    

Linux

  • Use your distribution's package manager:
    • Ubuntu/Debian:
      sudo apt update && sudo apt install ffmpeg
      
    • Fedora:
      sudo dnf install ffmpeg
      
    • Arch:
      sudo pacman -S ffmpeg
      

Installation

pip install dav2mkv

For development:

pip install -e ".[dev]"

A standalone Windows executable is also published on GitHub Releases.

Usage

dav2mkv -f input.dav -o output.mkv
dav2mkv -d ./videos -o ./converted --container mp4 --recursive
python -m dav2mkv input.dav ./converted --container mp4

Options

  • -f, --file: Single video file to convert
  • -d, --directory: Directory containing video files to convert
  • -o, --output: Output file or directory
  • --container: mkv or mp4 (default: mkv)
  • --recursive: Process subdirectories (directory mode)
  • -c, --concurrent: Parallel workers (directory mode)
  • --log-level, --log-file: Logging options

Development

Run local quality checks:

py scripts/verify.py

Apply formatting fixes before checks:

py scripts/verify.py --fix

Notes

  • Ensure FFmpeg and FFprobe are correctly installed and accessible from the command line.
  • For directory conversion with a separate output folder, use -o to specify the destination directory.

License

This project is licensed under the Commercial Restricted License (CRL). See the LICENSE.md file for details.

Contributions

Contributions, issues, and feature requests are welcome. Feel free to fork this repository and submit pull requests.

Support

If you find this project useful, star it on GitHub and share it with others.

Project details


Download files

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

Source Distribution

dav2mkv-1.0.3.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

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

dav2mkv-1.0.3-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file dav2mkv-1.0.3.tar.gz.

File metadata

  • Download URL: dav2mkv-1.0.3.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for dav2mkv-1.0.3.tar.gz
Algorithm Hash digest
SHA256 bb770c4141b54e11f1a6419bad3386040cc6647bc5f8ba0c3d5de53af54a1400
MD5 b66d6dc2d959e5a457c986681e6218ba
BLAKE2b-256 9bd297a04a573a1468f089ed1c6ab5b330b8da8bec316b7fcb0fa94c9631c349

See more details on using hashes here.

File details

Details for the file dav2mkv-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: dav2mkv-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for dav2mkv-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 322ca11f8f59aaf4417fbdcc1d539534280a578bb25930cf30bff0a92c2746f1
MD5 1ee85db9d76a81238e59e040bdb16998
BLAKE2b-256 393c5dc5b1f0d110b338f902030e1054d818ac1b8af7364292a9d9294b83c065

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page