What a day. Spent the day hunting a bug in my code, only to find out that it wasn’t in my code. (Update: Turns out my code was wrong in two ways, more below the original entry.) (Update 2: There are options to set this in the Arduino IDE Preferences)
There’s an error in the sprintf and snprintf implementation on Arduino that occurs when more than 8 varargs are passed in after the format specifier.
Continue reading sprintf / snprintf Problem on Arduino.
Rather than use animated GIFs when I’m trying to show a video without sound, I prefer to use
ffmpeg to strip out the audio and scale down the video. I’ve looked this command up way too many times:
ffmpeg -i test.mp4 -c:v libx264 -profile:v baseline -vf scale=640:-1 -an test-640.mp4
Update 7 October 2018:
Twitter has some video requirements such as a maximum framerate, that need to be accounted for:
ffmpeg -i test.mp4 -c:v libx264 -profile:v baseline -vf scale=540:-1 -t 30 -r:0.0 30 test-540.mp4
The above command will rescale the video to a quarter of Full HD resolution in portrait orientation, set a duration of 30 seconds (the -t option) and set the output video stream 0.0 framerate to 30 frames per second.
Update 2 July 2019:
ffmpeg -i input.mp4 -c:v libx264 -profile:v baseline -vf scale=1280:-1 -an -ss 5.5 test-1280.mp4
Set the start time at 5.500 seconds and scale to 1280px width.
ffmpeg -i input.mp4 -vframes 1 -vf scale=1280:-1 “poster.jpg”
Create a poster image for the video file.