Project

mkv2m4v

0.01
No commit activity in last 3 years
No release in over 3 years
mkv2m4v is a command line utility that converts audio and video tracks from a MKV (Matroska Media) container into a format compatible with Apple TVs.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 4.3
~> 10.0

Runtime

~> 0.5
~> 1.1
~> 0.7
~> 2.0
 Project Readme

mkv2m4v

Gem Version Maintainability Gem Downloads

Converts audio and video tracks from a MKV (Matroska Media) container into a format compatible with Apple TVs.

It attempts to pass through as many codecs as possible.

  • It assumes that the video track is already in H.264/MPEG-4 (Advanced Video Codec).
  • It will convert a DTS audio track into separate AAC and AC3 tracks.
  • If no DTS, it will pass through the original AAC and/or AC3 tracks.

Installation

mkv2m4v is dependent upon mediainfo, ffmpeg, mkvextract, and MP4Box.

$ brew install mediainfo
$ brew install ffmpeg --with-tools --with-fdk-aac
$ brew install gpac
$ brew install mkvtoolnix # version >= 6 required
$ gem install mkv2m4v

Note: gpac includes MP4Box:

If you have any trouble after installing the mkdv2m4v gem, you can test the dependencies using the --check argument:

$ mkv2m4v --check

Usage

$ mkv2m4v some-video.mkv

Background

I got fed up with the reliability of the conversion tools out there for converting MKV video containers to Apple TV compatible videos. Many of the existing tools appear to have potential on the surface, but they fail under certain scenarios.

Handbrake is still the most realiable existing tool out there, but it re-encodes h.264 video tracks, which is not ideal and very slow.

The goal is to get a better, more automated tool to accomplish the task of generating Apple TV compatible videos. Nothing more. It should generate an M4V media file with the best possible quality given the original source and the defaults should require no additional human interaction.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

MIT License