Skip to content

Creates a compressed copy of a large MOV file into MP4 format using FFmpeg.

License

Notifications You must be signed in to change notification settings

csantarin/ffmpeg_mov_to_mp4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ffmpeg_mov_to_mp4

Table of contents

What does it do?

It creates a compressed copy of a large .mov file in the .mp4 format using ffmpeg.

This is a simple function. It isn't very tolerant to fault.

Prerequisite

You need to download and install [ffmpeg].

  1. Download and Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Install ffmpeg
brew install ffmpeg

Setup

  1. Follow the Prerequisite instructions.

  2. Clone this repository.

    git clone https://github.com/csantarin/ffmpeg_mp4_to_mov.git
  3. Navigate to the repostitory folder.

    cd <path/to/the/parent/of/your/local/copy>/ffmpeg_mov_to_mp4
  4. Expose the ffmpeg_mov_to_mp4 function to command line.

    source ./ffmpeg_mov_to_mp4.sh 
  5. Follow the Linking instructions to add this command to your command line permanently.

Usage

Call the newly-installed ffmpeg_mov_to_mp4 command.

# Call the function and provide an input file name
# - Include the trailing .mov extension.
# - Include a path (relative or absolute) if necessary.
ffmpeg_mov_to_mp4 <path/to/your/file>.mov

Example:

$ ffmpeg_mov_to_mp4 ../my-project/my-project-recording.mov

Processing ../my-project/my-project-recording.mov ...

# Some processing from the ffmpeg converter...

Done!
../my-project/my-project-recording.mp4

Linking

In case you don't want to constantly source the same same command over and over, you can link the script.

First step: Know your environment

You should locate where your shell environment is.

Assumptions in the subsequent parts:

  • Shell environment file: .zshrc
  • Location: user home directory (~. In the following, it represents the /Users/csantarin folder).

Option 1: Via utility script

There's a link.sh file that can do this for you.

sh ./link.sh ~/zshrc

Result:

Retrieving this repository's working directory ...
/Users/csantarin/ffmpeg_mov_to_mp4

Adding to /Users/csantarin/.zshrc ...
Done!

Option 2: By hand

Copy this to your shell environment file.

source ~/ffmpeg_mov_to_mp4/ffmpeg_mov_to_mp4.sh

Final step: Apply changes

source the changes immediately or launch a new command line session:

source ~/.zshrc

About

Creates a compressed copy of a large MOV file into MP4 format using FFmpeg.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages