Encoding with FFMPEG
FFMPEG is a command line tool that allows you to encode video & images to different formats. You can also make GIFs from videos!
To install using Homebrew:
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
Then to encode a video file, pulled from here, use:
ffmpeg -i input.mov -vcodec h264 -acodec aac -strict -2 output.mp4
To change the resolution, scale=640:480
is the new aspect ratio:
ffmpeg -i video_1920.mp4 -vf scale=640:480 video_640.mp4 -hide_banner
Or max supported by Alexa:
ffmpeg -i video_1920.mp4 -vf scale=1280:720 video_640.mp4 -hide_banner
To pull the audio off of a video for Alexa devices without screens:
ffmpeg -i video.mp4 -f mp3 -ab 192000 -vn music.mp3