Skip to content

Instantly share code, notes, and snippets.

@patrickgill
Created June 14, 2016 17:00
Show Gist options
  • Save patrickgill/13bd09c4b51cf2ffaf82edde5851f363 to your computer and use it in GitHub Desktop.
Save patrickgill/13bd09c4b51cf2ffaf82edde5851f363 to your computer and use it in GitHub Desktop.
split a video almost every minute into multiple parts. requires zsh
#!/bin/zsh
#$((2.77+(i*60)-0.5))
#enable brace expansion so padding 0s are added
setopt brace_ccl
for i in {05..22}
do ffmpeg -i s07e21.mkv -acodec copy -ss $(((i*59.5)+2.77)) -t 00:01:00 pt_$i.mp4
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment