Skip to main content

Convert Movie To Cast (CM2C) is a Python application to convert any videos 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 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)

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

CM2C-2.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

CM2C-2.1.0-py2.py3-none-any.whl (7.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file CM2C-2.1.0.tar.gz.

File metadata

  • Download URL: CM2C-2.1.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for CM2C-2.1.0.tar.gz
Algorithm Hash digest
SHA256 8351f0e260fb407626bc04596fcb967efa1afef5c0e735891a302016ddbb8190
MD5 bc9059a4fae4864f0738622e73b136ce
BLAKE2b-256 467471307bd9858fb19b3dab539c34ba6361ae813f46581606a78de8781a2951

See more details on using hashes here.

File details

Details for the file CM2C-2.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: CM2C-2.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for CM2C-2.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8c62548a392ab37757b273ff4e16b3f46f0fb5096de757b22f63e35756fdabc5
MD5 24ff359624131ba426bca8b2e6cefe79
BLAKE2b-256 863a16abda62d0d52dee024e2f7f7377906048c6003483cbd109ef7fb3ff8688

See more details on using hashes here.

Supported by

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