video-convert/README.md

38 lines
1.0 KiB
Markdown
Raw Normal View History

2022-07-04 20:00:00 -04:00
# 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...]`
2022-07-04 20:00:00 -04:00
The file names MUST end in -<height>p.<mp4|webm> as this is how this script determines the source resolution and container type.
2022-07-04 20:00:00 -04:00
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