May, 2018 | Tooling
I decided to convert some GIFs in this website to MP4 videos after reading this thoroughly researched blog by Jeremy Wagner.
When I tested it out however, I found that the videos were working only in Chrome. After a bit of Googling, I figured out the right params to be passed to the ffmpeg and it was over 200 characters long. There was no way I was going to remember this. Setting up an alias was the only solution if I ever wanted to use this again.
I had never written any major bash script as of then so I wanted to try making this as one.
brew install ffmpegon macOS).
chmod +x gifvid.
cp gifvid /usr/bin. Use
source is mandatory. The converted video will be written to
--src- Specify the source.
--dest- Specify the destination. Will be
source.mp4if not given.
--crf- Constant Rate Factor. Defaults to
25. Lower the number, higher the quality and file size.