Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Convert Movie To Cast (CM2C) is a Python application to convert any video files with subtitle(s) to video supported by Google Chromecast.

Project Description

Convert Movie To Cast (CM2C) is a Python application to convert a lot of video files with subtitle(s) to video supported by Google Chromecast.

Movie extension supported are : mp4, mkv, m4v, avi, mov, mpegts, 3gp, webm, mpg, mpeg, wmv, ogv.

Creator

Arnaud Moura (arnaudmoura@gmail.com).

How it works

CM2C check if the video must be converted to work with a Google Chromecast otherwise it convert the video in MP4 format with only one audio track and no subtitle track. By default, if there are several audio tracks, the english version is keeped.

If there is subtitle, you can burn subtitle into the video or only extract subtitle into SRT/ASS file. By default, if there are several subtitle tracks, the french version is extracted or burned because I’m french :).

Python compatibility

Python version 2.7 and newer.

Dependencies

FFmpeg version 3.0.1 and newer (https://ffmpeg.org/).

progressbar2 version 3.12.0 and newer (https://pypi.python.org/pypi/progressbar2/3.12.0).

Install FFmpeg on Windows

To install FFmpeg on Windows we must download binaries here : https://ffmpeg.zeranoe.com/builds/.

After you must add the FFmpeg binary folder path in the PATH environment variable.

Install FFmpeg on Mac

To install FFmpeg on Mac we must download binaries here : http://www.ffmpegmac.net/.

After you must add the FFmpeg binary folder path in the PATH environment variable.

Install FFmpeg on Linux

Debian, Ubuntu run:

sudo apt-get install ffmpeg

Red Hat, Fedora run:

sudo yum install ffmpeg

Install CM2C

Run the following command in your terminal:

pip install cm2c

Usage

Help text:

Usage: cm2c.py folder [options]
   cm2c.py --file video [options]
   Video extension supported : .mp4, .mkv, .m4v, .avi, .mov, .mpegts, .3gp, .webm, .mpg, .mpeg, .wmv, .ogv

Options:
  -h, --help            show this help message and exit
  -v, --version         show version
  -f FILE, --file=FILE  video file path
  --force               convert the video(s) even if it already has the right
                        format
  -o, --overwrite       overwrite the converted files
  -n, --no_sub          no subtitle extracted and burn in video
  -b, --burn_sub        burn subtitle in the video
  --extract_all_sub     extract all subtitle and the option --burn_sub is
                        disable
  -e, --ext_sub         use external subtitle in SRT or ASS format to burn it in video, it must have the
                        same name of the video
  -s, --shutdown        shutdown after all conversions (Windows only)
  -p PRESET_NAME, --preset=PRESET_NAME
                        define the preset to convert the video(s) [ultrafast,
                        superfast, veryfast, faster, fast, medium, slow,
                        slower, veryslow] (default superfast). A slower preset
                        will provide better compression (compression is
                        quality per filesize).
  -a AUDIO_NAME, --audio_language=AUDIO_NAME
                        define the audio language (default eng)
  -l SUB_LANG, --sub_language=SUB_LANG
                        define the sub language (default fre, fr, und)
  -d SUB_NAME, --sub_name_regex=SUB_NAME
                        define the sub name by regex
  -r REG_EX, --regex=REG_EX
                        define regular expression apply on file names during
                        file parsing (python regex format)
Release History

Release History

This version
History Node

0.3.3

History Node

0.3.1

History Node

0.3.0

History Node

0.2.2

History Node

0.2.0

History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
CM2C-0.3.3-py2.py3-none-any.whl (7.5 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel May 27, 2017
CM2C-0.3.3.tar.gz (8.8 kB) Copy SHA256 Checksum SHA256 Source May 27, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting