Skip to main content

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.

Git project

https://gitlab.com/ArnaudM/CM2C

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 FFmpeg to Windows here : https://ffmpeg.zeranoe.com/builds/.

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

Install FFmpeg on Linux

Run the command: * Debian, Ubuntu: sudo apt-get install ffmpeg * Red Hat, Fedora: 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  movie file
  --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
  -b, --burn_sub        burn subtitle in the video
  -e, --ext_sub         use external subtitle in SRT format
  -s, --shutdown        shutdown after all conversions (Windows only)
  -p PRESET_NAME, --preset=PRESET_NAME
                        define the preset to convert the movie(s) (ultrafast,
                        superfast, veryfast, faster, fast, medium, slow,
                        slower, veryslow)
  -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-0.2.2.tar.gz (8.0 kB view hashes)

Uploaded Source

Built Distribution

CM2C-0.2.2-py2.py3-none-any.whl (6.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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