Skip to content

Instantly share code, notes, and snippets.

@uglygus
Last active November 14, 2022 17:57
Show Gist options
  • Save uglygus/6bed428614011d8ac3cb5b609bb1ddfc to your computer and use it in GitHub Desktop.
Save uglygus/6bed428614011d8ac3cb5b609bb1ddfc to your computer and use it in GitHub Desktop.
losslessly splits a video file
function ffsplit() {
# bash function to losslessly split
# a video file into 10min segments (600 seconds)
for item in "$@"
do
ffmpeg -i "$item" -c copy -map 0 -segment_time 600 -f segment -reset_timestamps 1 "$item"_seg%02d.mov
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment