Skip to content

Instantly share code, notes, and snippets.

View yumnycheesecakes's full-sized avatar
💭
My English is poor.

yumnycheesecakes

💭
My English is poor.
View GitHub Profile

Pixel Perfect GIF to MP4 Conversion

problem

Sharing pixel art as animated gifs on social media sucks. Uploading animated gifs will typically get automatically converted to a video format with blurry results. We can manually do the conversion ourselves to get much nicer results.

solution

ffmpeg -i input.gif -movflags faststart -pix_fmt yuv420p -vf scale=1920:1080:flags=neighbor output.mp4