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.1.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.1-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dav2mkv-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 364197694c89f406d2ce7072db403578e0ff09d81ec12b6a3c6949863b57ae42
MD5 fc5fcb832315de79b8ca542bb452404e
BLAKE2b-256 17b2d27454c463a682713bf8266b7c1790bf0cc445e60ed15166dc7cd2b6f443

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dav2mkv-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7feae4ea909aed154a7a2fa430830bedc2dfdeca14a9023e89403ad15b0581cd
MD5 9e253f630fdcbb33f9890bda97675efc
BLAKE2b-256 5e5ecea73ce584b24cc85af80f0e30c32a2e6849503ad6a267ee11522aa4ba69

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