This file contains 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
double numSegmentFrames = segmentDuration * frameRate; | |
if(keyFrameInt > numSegmentFrames) { | |
System.out.println("Key frame interval too high!"); | |
System.out.println(keyFrameInt + " > " + numSegmentFrames); | |
return; | |
} | |
if(numSegmentFrames % keyFrameInt == 0) { |
This file contains 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
ffmpeg -hide_banner -y -noautorotate -probesize 9.22337e+18 -analyzeduration 600000000 \ | |
-i input.mp4 -c:v h264_videotoolbox -profile:v baseline -level 3.2 -allow_sw 0 -bf 0 -b:v 2700k -g 250 \ | |
-filter_complex [0:0]null[VC];[VC]setpts=N/(FRAME_RATE*TB)[VIDEO] -map [VIDEO] -c:a copy -map 0:1 -sn \ | |
-f mp4 -map_chapters -1 output.mp4 |