Skip to content

Instantly share code, notes, and snippets.

@nicolapiccinelli
Created September 30, 2019 12:04
Show Gist options
  • Save nicolapiccinelli/717e9e9cf8f4214bebc645fe1fc1f0e1 to your computer and use it in GitHub Desktop.
Save nicolapiccinelli/717e9e9cf8f4214bebc645fe1fc1f0e1 to your computer and use it in GitHub Desktop.
Split video into chunks using ffmpeg
#!/bin/bash
# $1 the filename to be chucked
# $2 should contains how frequently the video must be chuncked (00:00:00, hh/mm/ss)
ffmpeg -i $1 -c copy -map 0 -segment_time $2 -reset_timestamps 1 -f segment output%03d.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment