WebVars

Sharing my experiences, tips and projects in web development

mp3, mp4, music

Quickly Convert .mov to .mp4

Recently, I encountered an issue where .mov files were not supported by Firefox on my Tocer website. To resolve this, I needed to convert them into the .mp4 format, which is supported by Firefox.

Fortunately, I found an easy way to do this.

There’s a powerful tool called ffmpeg that makes this process simple.

You can install it via Homebrew in the Terminal:

brew install ffmpeg

After installation, use the following command to convert your files:

ffmpeg -i input.mov -c:v libx264 -crf 23 -c:a aac output.mp4

Here’s a breakdown of the command options:

  • -i input.mov: Specifies the input file, which is the original .mov file you want to convert.
  • -c:v libx264: Defines the video codec to be used, in this case, H.264, which is widely compatible with most browsers.
  • -crf 23: Sets the video quality. Lower values offer higher quality (ranges from 0–51; 23 is the default).
  • -c:a aac: Specifies the audio codec to be used. AAC is commonly supported by browsers.
  • output.mp4: Sets the name and format of the resulting output file (MP4, which is supported by Firefox).

And that’s it! The process is simple and effective.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *