Last active
May 3, 2019 17:43
-
-
Save snoj/527e73bac693c5e8306c50d779e3fdda to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$video = "path/to/source/file.mp4"; | |
$video_extension = "mp4"; ##This must match what the source file has. eg. if it's flv, use that. | |
$output_directory = "output/directory/video"; ##destination folder for 2 hour chunks | |
$ffmpegEXE = "path/to/ffmpeg.exe"; | |
for($i = 0; $i -lt 13; $i++) { | |
& $ffmpegEXE -i $video -ss ("{0}:00:00" -f (($i)*2)) -t "2:0:0" -c copy ("{0}_{1}.{2}" -f $output_directory, ($i+1), $video_extension); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment