Skip to content

Instantly share code, notes, and snippets.

@tschuy
Last active November 18, 2016 22:39
Show Gist options
  • Save tschuy/d0a9a78ef19d9310d59d19e71fde8706 to your computer and use it in GitHub Desktop.
Save tschuy/d0a9a78ef19d9310d59d19e71fde8706 to your computer and use it in GitHub Desktop.
#!/bin/bash
# MIT License (c) 2016 tschuy
vid=$1
outputbase=$2
len=$3
increment=1
ext="${vid##*.}"
# for every argument passed in,
for arg in "${@:4}"
do
ffmpeg -loglevel error -ss $arg -i $vid -t $len -c copy $outputbase$increment.$ext
increment=$((increment+1))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment