How to use OBS hotkey "split recording file"

RickyMoose

New Member
Hi, I should start out by saying that I am a complete noob on OBS and have only been using it for about a month. I don't do any streaming with it, just screen recording and I am running 30.2.3 (in portable mode).

My typical use is to record the screen for some testing that I'm doing. The goal is at the start of each test I would like to automatically create a new file using a hot key then when a test is done I would hit another hotkey to continue recording so I don't accidentally miss anything during the entire recording session. I realize I could set up a separate hotkey for start and stop actions but I was looking for a single button press so that once I start a recording session all I need worry about is where the splits happen and I don't accidentally forget to restart.

I have successfully enabled the chapter markers with the hybrid MP4 feature, but the chapters don't appear in tools like shotcut so I'm spending a lot of time manually cutting up the segments I want to keep of the recording . What I would like to do instead is to use the hotkey called "split recording file"; However when I attempted this and pressed the assigned key essentially nothing happened. Recording continued within the same file name no matter how many times I hit the key; a new file was never created so I'm unsure what is wrong here.

Am I right in thinking that using this hotkey is supposed to create a new file during an active recording?

I'm just assuming here that if I start recording a file like: 2024-10-23_12.35.56.mp4 , That each time I hit the hot key I would expect to see a new file with some sort of segment number added to the end of the file name like this:

2024-10-23_12.35.56-1.mp4
2024-10-23_12.35.56-2.mp4
2024-10-23_12.35.56-3.mp4




Also, I was just curious why some of the hotkeys have an * next to them and others do not; What does the * imply in the GUI?

Thanks

1729705153409.png



1729704916924.png
 

Suslik V

Active Member
...hotkeys have an * next to them and others do not; What does the * imply in the GUI?
Mutually exclusive actions. If the same hotkey assigned - only one action will be executed.

...just assuming ... That each time I hit the hot key I would expect to see a new file with ... number added to the end of the file name
No.
New name generation is based on general rule same as to starting new recording (time based name or numeric index in braces for the copy).

"split recording file" ... Am I right in thinking that using this hotkey is supposed to create a new file during an active recording?
Yes.

...the chapters don't appear in tools like shotcut
Hybrid MP4 is experimental and OBS exclusive feature, it may not fully supported in your NLE. No evidences that it was tested for this editor during development.
https://github.com/obsproject/obs-studio/pull/10608#issuecomment-2089966050 said:
...
Chapters are supported in various media players and NLEs such as Davinci Resolve

hybrid MP4 feature ... hotkey called "split recording file"; However when I attempted this and pressed the assigned key essentially nothing happened.
If you discovered new issue, please, attach OBS log-file from the session where the issue present (look for log file in the main menu Help).
Splitting feature was developed before hybrid MP4 was introduced in OBS, so strange things may happen. The "Split Recording File" and "Add Chapter Marker (Hybrid MP4 only)" is different actions and hotkeys can be shown in OBS UI even if both features not available - features disabled, recording is inactive, paused, or if chapter insertion is not supported by the current output (it was developers decision, see for details: https://github.com/obsproject/obs-studio/pull/10804 ).
 

RickyMoose

New Member
Suslik V,

Thanks for the reply.

Even if it name a new file with just date/time stamp would be just fine. The numbering was just an example. Since I have never seen the splitting work, I did not know what to expect.

As a test I switched to mkv and regular mp4 (non-hybrid) and even set a new hot key for splitting but each time it did nothing but continue to record the current file until I manually stopped it.

So if you are telling me that file splitting should be working then I would say that is probably a bug or at least for me it is. If there is something else you would recommend that I try to get file splitting to work please let me know and I will give it a shot. If that was working I could abandon using chapter markers since they really don't provide any value for me at the moment in my workflow.


Also as for the chapter support, that was just a nice to have if shotcut would have recognized them. Ultimately I'm trying to get individual files so I had only assumed that maybe it might be possible to use chapters as a marker for some other software.



Cheers!
 

Suslik V

Active Member
OBS forum has Resources section. Some chapter tools can be found there:
and more. I didn't check if all solution works today, the links here just for example.

As for the issues:

Take in mind that hotkeys pushed for application that running with higher privileges cannot be stolen, so you may need to run OBS as admin.
 

RickyMoose

New Member
I tried it again using some other random hot keys to ensure there are no conflicts and then also tried running as admin as you suggested, below is a link to that log. Thanks.



OBS 30.2.3 log file uploaded at 2024-10-25, 10:02:29

Test steps:

1.start obs (run as admin)
2. start recording
3. press "split recording file" hot key 3 times with .5 sec delay
4. stop recording and exit obs


 

Suslik V

Active Member
Hmm... OBS log has no info that split executed. There I expected "Changing output file to" words with new path. I assume OBS not able to recognize hotkey event (I hope you are using casual, not "scripted" keyboard).

Anyway, there is script file: https://gist.github.com/norihiro/5ccd3da3280e613224d21926dc94e993 (save it with .lua extension to be able to add it to main menu Tools > Scripts). This "manual-file-splitting.lua" script was made by developers for test purposes (source: https://github.com/obsproject/obs-studio/pull/6779#issuecomment-1191461130). There, at script properties on the right, you will find new button named "Manual split now" - when clicked during recording - new file expected to be created. Also, this script adds new hotkey to the list of Hotkeys named: "Manual split recording file" (it is named differently from default hotkey). You may give it a try too. Feature surely worked for older OBS.
 

RickyMoose

New Member
I installed the script and tried with and without elevation but each time no new file was created.

Also like before tried a few different key assignments just to make sure no clashes (like just the 0 key to do split) but the one I had actually wanted was Ctrl + OBS_KEY_VK_CANCEL (CTRL + Break)

OBS 30.2.3 log file uploaded at 2024-10-25, 16:10:17

Test steps: to use manual-file-splitting.lua

1.start obs (as admin)
2. start recording
3. press "Manual split recording file" hot key 3 times with .5 sec delay
4. stop recording and exit obs





(I hope you are using casual, not "scripted" keyboard).

I assume by "scripted keyboard" you mean am I using some type of keyboard with macros?
If so, I do have a Corsair K70 RGB PRO but I don't use any macro features or even the RGB (just boring solid 1 color ). I don't even have its iCUE software loaded.


Thanks.

 

RickyMoose

New Member
And i also saw this in the log I am not sure what false implies here if it even means anything.

16:09:22.507: [Lua: manual-file-splitting.lua] manual_split split_file_enabled=false
16:09:23.800: [Lua: manual-file-splitting.lua] manual_split split_file_enabled=false
16:09:24.992: [Lua: manual-file-splitting.lua] manual_split split_file_enabled=false
 

Suslik V

Active Member
Code:
16:09:19.534: [mp4 output: 'adv_file_output'] Writing Hybrid MP4 file 'C:/Users/User/Videos/OBS_Recordings/2024-10-25_16.09.19.mp4'...
16:09:22.507: [Lua: manual-file-splitting.lua] manual_split split_file_enabled=false
16:09:23.800: [Lua: manual-file-splitting.lua] manual_split split_file_enabled=false
16:09:24.992: [Lua: manual-file-splitting.lua] manual_split split_file_enabled=false
...
means that function called but no action taken.

Likely, feature named "Automatic File Splitting" was disabled in OBS Settings (because other two conditions: "recording_active" and not "recording_paused" expected to be "true"). If I understand it right, you may find the "RecSplitFile" variable manually inside "basic.ini" file (use "notepad++" application to open this file, it supports CR/LF endings). The folder for the file is accessible from the main menu File > Show Profile Folder.
When "Automatic File Splitting" feature enabled in UI, then you'll see RecSplitFile=true in the "basic.ini" file and script will write to the OBS log "manual_split split_file_enabled=true" at each function call (button press).
 

RickyMoose

New Member
I added RecSplitFile=true (line was not there prior) to the [AdvOut] section and it works now.

I do however have to report that on a few of my tests, the very first file (Highlighted below) of a session where i hit the split hotkey did not have any audio until I the 2nd file was written out and i stopped the recording.

Here are two log examples where the first file has no sound in it.


Note: On one of the logs the 1st segment file size recording time is only 8 seconds and the other one is 24 seconds before I hit the hot key. I did a few more experiments where I waited at least a minute after starting the recording and then hit the hot key after the one minute marker and those attempts so far all files had sound. So there may be a A minimum amount of time required before you attempt a manual split or else you risk losing some of your audio.

1730144082778.png
1730144113013.png




Thanks again.
 

Suslik V

Active Member
I added RecSplitFile=true (line was not there prior)...
It is nice move. But it should be added automatically as soon as you made checked the "Automatic File Splitting" checkbox in OBS settings for output. I'm understanding that "manual split" and "automatic split" sounds different, but by OBS logic you need to enable "Automatic File Splitting" to be able to select "manual" setting. If you make it work only by editing configuration files of OBS by hand - then there is something wrong.

there may be a A minimum amount of time required before you attempt a manual split or else you risk losing some of your audio.
I didn't heard about this before. if you wish, you can make report to: https://github.com/obsproject/obs-studio/issues
 
Top