Skip to content

Instantly share code, notes, and snippets.

View bobby-sills's full-sized avatar
🧐
hmmm

Bobby Sills bobby-sills

🧐
hmmm
View GitHub Profile
@DoktorMike
DoktorMike / videoconversionsamples.sh
Last active July 20, 2025 03:58
Useful commands for converting videos using ffmpeg
#!/bin/bash
# Examples taken from https://opensource.com/article/17/6/ffmpeg-convert-media-file-formats
# Convert a webm file to a matroska format with a vp9 encoding and keeping the same audio encoding.
# Also changes the bitrate to 1Mb/s
ffmpeg -i input.webm -c:a copy -c:v vp9 -b:v 1M output.mkv
# Same but change the frame rate to 30 FPS and dropping the bitrate conversion
ffmpeg -i input.webm -c:a copy -c:v vp9 -r 30 output.mkv
# Same but only setting the video size to a predetermined format HD 720 in this case