AdditionalReplays_0_3_8_beta_2024_12_06.zip, ~9KiB to download.
CRC of the zip archive MD5:542B83759A45F67A7C37B3A4B815FF2C
inside:
"AdditionalReplays.py" (~40 KiB)
Usage is the same as written a few posts above ( here:
https://obsproject.com/forum/threads/additional-replay-buffer.106619/post-657013 ).
Changes:
* VLC sources named "Disabled" no longer treated as valid when 'Disabled' option is selected.
Tech details: DropBox list type was changed from OBS_COMBO_TYPE_EDITABLE to OBS_COMBO_TYPE_LIST, because in my setup editable lists saves keys instead of values in the tables.
- VLC source selection option for Instant Replays renamed from "Disabled" to "Disable".
Tech details: verb instead of adjective.
Was tested only under the Windows OS, Python v3.6.8, moviepy==1.0.3, imageio==2.15.0, imageio-ffmpeg==0.4.9.
Thank you for your continued support for this plugin, Suslik! Your changes have truly transformed this script into something better than before. Let me collect a few of the common issues found in this thread and during my own testing and reiterate the installation instructions for easier troubleshooting for new users.
Install
1. Download
Python 3.6.8. Embeddable zip file
2. Unzip the File as a folder in a permanent location (I suggest C:\Program Files\obs-studio)
3. OBS Tools > Scripts > Python Settings: Set Python Install Path (64bit) to the folder you created
4. Restart OBS
5. OBS Tools > Scripts > AdditionalReplays.py: Install moviepy with pip.
Note: This will install all dependencies in the folder you created in Step 2
6. Restart OBS
7. OBS Tools > Scripts > AdditionalReplays.py: Adjust your settings to your liking
8. OBS Settings > Hotkeys: Find "Replay 1" "Replay 2" & "Replay 3" to set up your custom buffer hotkeys.
Done!
Updating FFmpeg
1. Download a newer version of FFmpeg (Essentials Build)
here.
Note: Version 7.02 is confirmed to work flawlessly (I haven't tested newer builds)
2. Locate moviepy's FFmpeg file and delete it: It is found in your python install folder
Note: In our case, that would be: C:\Program Files\obs-studio\Lib\site-packages\imageio_ffmpeg\binaries
3. Drop your freshly downloaded FFmpeg exe into the folder and rename it to "ffmpeg-win64-v4.2.2.exe"
Fixing ReplayBuffer (No Files being created)
The Fix
1. In AdditionalReplays.py, find line 367. This section controls how long the script checks for files. Line 368 controls the number of times it checks for a file, while line 387 dictates how long it waits between each check.
2. Increase the range in line 368 and/or increase the amount of time between each check in line 387 to something that guarantees that the script checks for long enough to find a file. I recommend a time of 10 seconds between each check.
Explanation
So I had this issue myself for months, and it drove me insane. When I had a very long replay buffer, the script sometimes would create no file at all. I assumed that it was a hardware limitation issue, but it is actually related to how the script checks for files.
The way this script works is:
1. It creates the normal replay buffer (full duration)
2. It checks whether a file was created
3. It then cuts out the desired duration and deletes the original buffer file
The issue occurs during the second step. The script checks for a new file every second (for only 20 seconds). So what happens if you have a very long buffer set up, and it takes longer than 20 seconds to produce a file? The script will not find anything and...do nothing.
How To Find Your Values
The amount of time you will need is heavily dependent on your buffer duration, scene complexity, and your hardware and drive speed. I recommend doing a test recording.
Do the following:
1. Record a high complexity scene for the maximum duration of your ReplayBuffer.
2. OBS > Help > Log Files > View Current Log
3. Press the Save Replay Buffer button and simultaneously start a stopwatch.
4. Once the Log says "Wrote Replay Buffer", stop the stopwatch. Take this as a starting point.
5. Apply the fix with overhead.
In my case, a high intensity 2-hour buffer at 4K@60 took about 3 Minutes to render. So I set my script to check for files for 4 Minutes (24 Times every 10 seconds). This guaranteed an output every time!
Considerations
Tested on: Windows 10 - NVIDIA RTX 3070 - FFmepg 7.0.2 Essentials Build - AdditionalReplays_0_3_8_beta_2024_12_06
Hope this overview helps! Thanks again to Suslik for the great script updates and Bootscreen for the original script.