How can I make this script point to a different output source? I'd like to pair this with Source Record so I can have overlay-free replays.
The way I do it is to use Touch Portal to call a bat file that uses ffmpeg to copy the clip to a separate folder. I get the bat file to date and time stamp them en-route so I end up with both a Replay and a folder of highlights for later
example
Always save my replay as one single file that I overwrite called 'Game Replay Clip.mkv' that is 30s long
I have batch files for Saves, Goals, 30s Clips and 10s Clips, each just using ffmpeg to copy and cut on the fly as needed.
Example
set datetimef=%date:~-4%%date:~3,2%%date:~0,2%_%time:~0,2%%time:~3,2%%time:~6,2%
"C:\Users\johni\Downloads\ffmpeg-20200227-9b22254-win64-static\bin\ffmpeg.exe" -ss 00:00:12.0 -i "D:\Recording1080p\Game Replay Clip.mkv" -c copy "D:\Recording1080p\Clips\%datetimef%-Goal.mkv"
del "D:\Recording1080p\Game Replay Clip.mkv" /f /q
"C:\Users\johni\Downloads\ffmpeg-20200227-9b22254-win64-static\bin\ffmpeg.exe" -ss 00:00:12.0 -i "D:\Recording1080p\Clips\%datetimef%-Goal.mkv" -c copy "D:\Recording1080p\Game Replay Clip.mkv"
line by line...
set datetimef=%date:~-4%%date:~3,2%%date:~0,2%_%time:~0,2%%time:~3,2%%time:~6,2%
This sets the variable called 'datetimef' to hold the current date and time to the second
"C:\Users\johni\Downloads\ffmpeg-20200227-9b22254-win64-static\bin\ffmpeg.exe" -ss 00:00:12.0 -i "D:\Recording1080p\Game Replay Clip.mkv" -c copy "D:\Recording1080p\Clips\%datetimef%-Goal.mkv"
This calls the ffmpeg program location, and clips from second 12 to a new file that is about 20s in the Clips folder that starts with the datetime value and -Goal.mkv (e.g. 20211031_162255-Goal.mkv). I use this 20s file later in a highlights video.
del "D:\Recording1080p\Game Replay Clip.mkv" /f /q
This silently deletes the exting replay clip the obs 'Replay' scene is pointing to
"C:\Users\johni\Downloads\ffmpeg-20200227-9b22254-win64-static\bin\ffmpeg.exe" -ss 00:00:12.0 -i "D:\Recording1080p\Clips\%datetimef%-Goal.mkv" -c copy "D:\Recording1080p\Game Replay Clip.mkv"
This calls the ffmpeg program location again, and clips from second 12 again to create a new
'Game Replay Clip.mkv' file that is about 8s long for the OBS Replay to use. My Replay scene is set to play at 50% and 30% zoom, so I get a slow motion 16s replay on the stream.
Hope this helps