How to stabilize a video from the CLI:

Install dependencies:

$ brew install ffmpeg --with-libvidstab
$ brew install vid.stab

Analyze video and save info to `transforms.crf`:

$ ffmpeg -i input.mp4 \
-vf \
vidstabdetect=result="transforms.crf":shakiness=10:accuracy=15 \
-f null -

Use the info to perform the stabilization:

$ ffmpeg -i input.mp4 \
-vf vidstabtransform=smoothing=30:input="transforms.crf" \


TIL about Imagemagick’s `montage` command which makes tiling images with the CLI dead simple:

montage \
-geometry 250x250+0+0 \
-background "#000" \
friend1.png friend2.png friend3.png friend4.png \

`250x250+0+0` makes each tile 250x250 with 0 spacing, which gives you a 500x500 image.

Shorter version for input in Bash:

montage \
-geometry 250x250+0+0 \
-background "#000" \
friend{1..4}.png \

If you only want to resize images *larger* than 250, add a `>` and quotes around the `-geometry` argument:

-geometry "250x250>+0+0"

Another more involved tool to complement for animated screencasts is asciinema:


How to tile videos from the CLI:

ffmpeg -i vid1.mp4 -i vid2.mp4 -filter_complex "\
[v1][v2]hstack[v]" \
-map [v] \

Sign in to participate in the conversation

Follow friends and discover new ones. Publish anything you want: links, pictures, text, video. This server is run by the main developers of the Mastodon project. Everyone is welcome as long as you follow our code of conduct!