A go wrapper around ffmpeg for fast, batch video format conversion, resolution adjustments, and custom transcoding processes.
You must have ffmpeg installed and accessible in one of the following ways:
- Option 1: ffmpeg is available in your system’s
PATH(i.e., you can runffmpegfrom your terminal or command prompt). - Option 2: The
ffmpegfile (folder) that you download must be located in the same directory as theffmpegoexecutable.
Download ffmpeg from the official site:
https://www.ffmpeg.org/download.html
- Convert
.mp4files to.webmformat - Convert videos (both
.mp4and.webm) to multiple resolutions (240p,360p,480p, etc.)
ffmpego --input <input_folder> --output <output_folder> --action <convertToWebm|convertResolution> --resolution 480,360,240ffmpego --input ./mp4 --output ./webm --action convertToWebm2. Convert all .mp4 or .webm files in ./mp4 folder to multiple resolutions (480p, 360p, 240p) and output to ./webm:
ffmpego --input ./mp4 --output ./webm --action convertResolution --resolution 480,360,240ℹ️ The resolution output will match the input format (i.e., input
.mp4→ output.mp4, input.webm→ output.webm).