Created
January 12, 2019 14:44
-
-
Save tomtaylor/aaf8591afb64bb7fda2ccdcc6d3b6b64 to your computer and use it in GitHub Desktop.
Convert a video frame into a dithered bmp for display on an e-Paper screen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install ffmpeg, imagemagick | |
ffmpeg -ss 00:01:00.00 -i input.avi -frames 1 -vf "scale=640:384:force_original_aspect_ratio=decrease,pad=640:384:(ow-iw)/2:(oh-ih)/2" -vcodec png -f image2pipe pipe:1 | convert -colorspace Rec709Luma -dither FloydSteinberg -remap pattern:gray50 - bmp:- | cat > image.bmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment