Skip to main content

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

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

Git project

https://gitlab.com/ArMour85/CM2C

Creator

Arnaud Moura (arnaudmoura@gmail.com).

How it works

CM2C analize 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/).

Install FFmpeg on Windows

To install FFmpeg on Windows you 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 you 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

Run the following command in your terminal:

pip install cm2c

Run

To show application helper in your terminal:

cm2c --help

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 files for CM2C 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CM2C 2.1.0
File Size Uploaded
CM2C-2.1.0.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for CM2C 2.1.0
File Interpreter ABI Platform
CM2C-2.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 15.2 kB

Release files / CM2C-2.1.0.tar.gz

Download URL CM2C-2.1.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8351f0e260fb407626bc04596fcb967efa1afef5c0e735891a302016ddbb8190
BLAKE2b-256 checksum
How to use checksums
467471307bd9858fb19b3dab539c34ba6361ae813f46581606a78de8781a2951
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

Release files / CM2C-2.1.0-py2.py3-none-any.whl

Download URL CM2C-2.1.0-py2.py3-none-any.whl
Size 7.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8c62548a392ab37757b273ff4e16b3f46f0fb5096de757b22f63e35756fdabc5
BLAKE2b-256 checksum
How to use checksums
863a16abda62d0d52dee024e2f7f7377906048c6003483cbd109ef7fb3ff8688
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page