[Python + FFMPEG] ChopBuilder recipes, video_utils script @ https://gist.github.com/Enteleform/ccb18f8b7b15ba306b127f8835e85a34
############################################################################
### THIS CODE IS FOR REFERENCE ONLY, NECESSARY MODULES ARE NOT INCLUDED ###
############################################################################
from utils.file_utils import File
from utils.video_utils import Video, concatenate_Videos
countIn_Path = "D:/_Training/Music/Guitar/ChopBuilder/Video/Tabbed/Round 1/[Sources]/Count-In.mp4"
videoPaths = [
"D:/_Training/Music/Guitar/ChopBuilder/Video/Tabbed/Round 1/[Sources]/1-1.mp4",
"D:/_Training/Music/Guitar/ChopBuilder/Video/Tabbed/Round 1/[Sources]/1-2.mp4",
"D:/_Training/Music/Guitar/ChopBuilder/Video/Tabbed/Round 1/[Sources]/1-3.mp4",
"D:/_Training/Music/Guitar/ChopBuilder/Video/Tabbed/Round 1/[Sources]/1-4.mp4",
"D:/_Training/Music/Guitar/ChopBuilder/Video/Tabbed/Round 1/[Sources]/1-5.mp4",
"D:/_Training/Music/Guitar/ChopBuilder/Video/Tabbed/Round 1/[Sources]/1-6.mp4",
"D:/_Training/Music/Guitar/ChopBuilder/Video/Tabbed/Round 1/[Sources]/1-7.mp4",
"D:/_Training/Music/Guitar/ChopBuilder/Video/Tabbed/Round 1/[Sources]/1-8.mp4",
"D:/_Training/Music/Guitar/ChopBuilder/Video/Tabbed/Round 1/[Sources]/1-9.mp4",
]
#################################
### Full Round: Each Speed ###
#################################
speeds = [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5]
for speed in speeds:
videos = [Video(speed=speed, path=countIn_Path) ]
videos += [Video(speed=speed, path=x) for x in videoPaths]
percent = int(speed * 100)
concatenate_Videos(videos=videos, outputFile=f"C:/@TEMP/[ChopBuilder] Round 1 @ {percent}%.mp4")
################################################
### Exercises: Each Speed, Looped 4 Times ###
################################################
repetitionCount = 4
speeds = [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5]
for videoIndex, path in enumerate(videoPaths):
fileName = File(path).name
for speed in speeds:
videos = [Video(speed=speed, path=countIn_Path) ]
videos += [Video(speed=speed, path=path) for x in range(repetitionCount)]
percent = int(speed * 100)
concatenate_Videos(videos=videos, outputFile=f"C:/@TEMP/[ChopBuilder] Exercise {fileName} @ {percent}%.mp4")
########################################
### Exercises: Speed Progressions ###
########################################
speedSets = [
[0.5, 0.6, 0.7, 0.8, 0.9],
[0.8, 0.9, 1.0, 1.1, 1.2],
[1.1, 1.2, 1.3, 1.4, 1.5],
]
for speeds in speedSets:
minPercent = int(speeds[0 ] * 100)
maxPercent = int(speeds[-1] * 100)
for videoIndex, path in enumerate(videoPaths):
fileName = File(path).name
videos = [Video(speed=speeds[0], path=countIn_Path)]
for speed in speeds:
videos += [Video(speed=speed, path=path)]
concatenate_Videos(videos=videos, outputFile=f"C:/@TEMP/[ChopBuilder] Exercise {fileName} @ [{minPercent}% - {maxPercent}%].mp4")