Skip to content

Instantly share code, notes, and snippets.

@numtel
Last active April 13, 2026 04:04
Show Gist options
  • Select an option

  • Save numtel/1648130674e5542594758798894a6291 to your computer and use it in GitHub Desktop.

Select an option

Save numtel/1648130674e5542594758798894a6291 to your computer and use it in GitHub Desktop.
Gnome screencast conversions
#!/usr/bin/env bash
# Check if both arguments are provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 input.webm output.mp4"
exit 1
fi
INPUT_FILE="$1"
OUTPUT_FILE="$2"
# Run the ffmpeg command
ffmpeg -i "$INPUT_FILE" \
-vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" \
-c:v libx264 \
-crf 23 \
-c:a aac \
"$OUTPUT_FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment