Skip to content

Instantly share code, notes, and snippets.

@yewton
Last active January 5, 2019 12:44
Show Gist options
  • Save yewton/9d272374bcabf06ce933413d636f9844 to your computer and use it in GitHub Desktop.
Save yewton/9d272374bcabf06ce933413d636f9844 to your computer and use it in GitHub Desktop.
Crop last N seconds w/ FFmpeg one-liner
gfind . -name '*.mp4' -print0 | gxargs -0 -I{} sh -c 'ffmpeg -i "{}" -t $(echo "$(ffprobe -i "{}" -show_entries format=duration -v quiet -of csv="p=0") - 15" | bc) "cropped_$(basename "{}")"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment