Skip to content

Instantly share code, notes, and snippets.

View spydon's full-sized avatar
🔥
Coding on Flame

Lukas Klingsbo spydon

🔥
Coding on Flame
View GitHub Profile
@imankulov
imankulov / watchmedo.sh
Created March 26, 2013 19:37
One-liner. Auto-building Sphinx docs with watchdog. Forked from http://jacobian.org/writing/auto-building-sphinx/
# pip install watchdog
exec watchmedo shell-command --patterns='*.rst;*.py' --ignore-pattern='_build/*' --recursive --command='make html' --wait
@marcduiker
marcduiker / ffmpeg_video_for_twitter.md
Last active June 1, 2024 04:35
FFmpeg command for creating video for Twitter

Convert pngs to mp4

This FFmpeg command reads images named frame_[4 char digit].png and converts it to an mp4 using the h264 encoding which Twitter accepts. The bitrate is set to 5M to reduce blocking as much as possible while keeping the size small.

ffmpeg -framerate 10 -i frame_%04d.png -c:v h264_qsv -b:v 5M video.mp4

Convert and scale an existing mp4 to 1080:

ffmpeg -i input.mp4 -c:v h264_qsv -vf: scale=1080:-1 -b:v 5M output.mp4