convert videos to mp4 and webm
Go to file
0x80 45bac8b443
Fix Markdown
2022-07-05 00:00:00 +00:00
LICENSE Initial commit 2022-07-05 00:00:00 +00:00
README.md Fix Markdown 2022-07-05 00:00:00 +00:00
video-convert Initial commit 2022-07-05 00:00:00 +00:00

README.md

video-convert

Bash script to convert a video to mp4 and webm

This script takes a list of inputs with filenames like "filename-1080p.mp4" and uses ffmpeg to convert them to the following formats (as applicable):

  • 1080p mp4
  • 1080p webm
  • 720p mp4
  • 720p webm
  • 480p mp4
  • 480p webm
  • 360p mp4
  • 360p webm

It maintains good quality for the resulting videos. Converting to webm will generally take a very long time.

Usage

video-convert FILE [FILE...]

The file names MUST end in -<height>p.<mp4|webm> as this is how this script determines the source resolution and container type.

This script converts to two formats:

  • mp4 (h264/aac), which is non-free but widely supported
  • webm (vp9/opus), which is free but less widely supported

It only converts to the same or lower height than the source. If you run video-convert myvideo-720p.mp4, for example, it will create the following files:

  • myvideo-720p.webm
  • myvideo-480p.mp4
  • myvideo-480p.webm
  • myvideo-360p.mp4
  • myvideo-360p.webm

License

public domain or CC0