user34894: OBS allows you to change the pattern for the recordings filenames but there is no simple way to update the file name with any custom string before every recording.
You need to visit the options pane and change settings manualy.
The default for the filename formating is: "%CCYY-%MM-%DD %hh-%mm-%ss"
Let's say you've changed the pattern to "MY-HOME-VIDEO %CCYY-%MM-%DD %hh-%mm-%ss" and recorded a file.
Then if you need to make another recording about something else with the prefix "MY-OTHER-VIDEO " you need to change the pattern again, manually.
How to update the filename formating without visiting options pane every time?

user34894: I've managed to achieve this using obs-websocket and simple/dirty python script.
The obs-websocket plugin can get/set the pattern used by OBS to save recording files.
Steps:
Install/configure obs-websocket plugin.
Then use obs-cli (https://github.com/leafac/obs-cli) or obswebsocket (https://pypi.org/project/obs-websocket-py/).
cli example (under Windows os, beware of double quotes):
obs-cli-win SetFilenameFormatting="{ ""filename-formatting"": ""TESTNAME %CCYY-%MM-%DD %hh-%mm-%ss"" }" && ^
obs-cli-win StartRecording && ^
obs-cli-win SetFilenameFormatting="{ ""filename-formatting"": ""%CCYY-%MM-%DD %hh-%mm-%ss"" }" && ^
obs-cli-win GetFilenameFormatting

python example:
client = obswebsocket.obsws("localhost", 4444, "")
client.connect()
print(client.call(obswebsocket.requests.GetFilenameFormatting()))
client.call(obswebsocket.requests.SetFilenameFormatting("TESTNAME" + " - %CCYY-%MM-%DD %hh-%mm-%ss"))
client.call(obswebsocket.requests.StartRecording())
print(client.call(obswebsocket.requests.GetFilenameFormatting()))
client.call(obswebsocket.requests.SetFilenameFormatting("%CCYY-%MM-%DD %hh-%mm-%ss"))
print(client.call(obswebsocket.requests.GetFilenameFormatting()))
client.disconnect()


user38404: I saw your code on the OBS Forum as well and wanted to help here too.
I made some tweaks to your Python example and it worked great!
I want to clarify some things in case anyone wants to do exacly what OP wanted. You should follow these steps:

Install the obs-websocket plugin
Install the obs-websocket-py which is the Python tool for the plugin (you can do this using pip)
Create a new .py file wth this code:

Python:
import obswebsocket
from obswebsocket import obsws, events, requests

client = obswebsocket.obsws("localhost", 4444, "") #Change this if you have a different name, port or password
client.connect()
client.call(obswebsocket.requests.GetFilenameFormatting())
print("Hi! I'm your new video\nWhat's my name?\nFilename:")
client.call(obswebsocket.requests.SetFilenameFormatting(input() + " - %MM-%DD %hh-%mm")) #Custom name + date. The best of two worlds
client.call(obswebsocket.requests.StartRecording())
print(client.call(obswebsocket.requests.GetFilenameFormatting()))
client.call(obswebsocket.requests.SetFilenameFormatting("-%MM-%DD %hh-%mm-%ss"))
print(client.call(obswebsocket.requests.GetFilenameFormatting()))
client.disconnect()


Open OBS and execute the code
And voilà! A new window will open and it should ask you for your video's name and then start recording.

I wanted to write this bc it took me a lot of time to figure this out. So let me know if it helped you too.

34894: <p>OBS allows you to change the pattern for the recordings filenames but there is no simple way to update the file name with any custom string before every recording.</p>
<p>You need to visit the options pane and change settings manualy.
The default for the filename formating is: &quot;%CCYY-%MM-%DD %hh-%mm-%ss&quot;</p>
<p>Let's say you've changed the pattern to &quot;MY-<strong>HOME</strong>-VIDEO %CCYY-%MM-%DD %hh-%mm-%ss&quot; and recorded a file.</p>
<p>Then if you need to make another recording about something else with the prefix &quot;MY-<strong>OTHER</strong>-VIDEO &quot; you need to change the pattern again, manually.</p>
<p>How to update the filename formating without visiting options pane every time?</p>
 34894: <p>I've managed to achieve this using obs-websocket and simple/dirty python script.
The obs-websocket plugin can get/set the pattern used by OBS to save recording files.</p>
<p>Steps:
Install/configure obs-websocket plugin.
Then use obs-cli (<a href="https://github.com/leafac/obs-cli" rel="nofollow noreferrer">https://github.com/leafac/obs-cli</a>) or obswebsocket (<a href="https://pypi.org/project/obs-websocket-py/" rel="nofollow noreferrer">https://pypi.org/project/obs-websocket-py/</a>).</p>
<p>cli example (under Windows os, beware of double quotes):</p>
<pre><code>obs-cli-win SetFilenameFormatting=&quot;{ &quot;&quot;filename-formatting&quot;&quot;: &quot;&quot;TESTNAME %CCYY-%MM-%DD %hh-%mm-%ss&quot;&quot; }&quot; &amp;&amp; ^
obs-cli-win StartRecording &amp;&amp; ^
obs-cli-win SetFilenameFormatting=&quot;{ &quot;&quot;filename-formatting&quot;&quot;: &quot;&quot;%CCYY-%MM-%DD %hh-%mm-%ss&quot;&quot; }&quot; &amp;&amp; ^
obs-cli-win GetFilenameFormatting
</code></pre>
<p>python example:</p>
<pre class="lang-python prettyprint-override"><code>client = obswebsocket.obsws(&quot;localhost&quot;, 4444, &quot;&quot;)
client.connect()
print(client.call(obswebsocket.requests.GetFilenameFormatting()))
client.call(obswebsocket.requests.SetFilenameFormatting(&quot;TESTNAME&quot; + &quot; - %CCYY-%MM-%DD %hh-%mm-%ss&quot;))
client.call(obswebsocket.requests.StartRecording())
print(client.call(obswebsocket.requests.GetFilenameFormatting()))
client.call(obswebsocket.requests.SetFilenameFormatting(&quot;%CCYY-%MM-%DD %hh-%mm-%ss&quot;))
print(client.call(obswebsocket.requests.GetFilenameFormatting()))
client.disconnect()
</code></pre>
 38404: <p>I saw your code on the OBS Forum as well and wanted to help here too.</p>
<p>I made some tweaks to your Python example and it worked great!
I want to clarify some things in case anyone wants to do exacly what OP wanted. You should follow these steps:</p>
<ol>
<li>Install the obs-websocket plugin</li>
<li>Install the obs-websocket-py which is the Python tool for the plugin (you can do this using pip)</li>
<li>Create a new .py file wth this code:</li>
</ol>
<p>Python:</p>
<pre><code>import obswebsocket
from obswebsocket import obsws, events, requests

client = obswebsocket.obsws(&quot;localhost&quot;, 4444, &quot;&quot;) #Change this if you have a different name, port or password
client.connect()
client.call(obswebsocket.requests.GetFilenameFormatting())
print(&quot;Hi! I'm your new video\nWhat's my name?\nFilename:&quot;)
client.call(obswebsocket.requests.SetFilenameFormatting(input() + &quot; - %MM-%DD %hh-%mm&quot;)) #Custom name + date. The best of two worlds
client.call(obswebsocket.requests.StartRecording())
print(client.call(obswebsocket.requests.GetFilenameFormatting()))
client.call(obswebsocket.requests.SetFilenameFormatting(&quot;-%MM-%DD %hh-%mm-%ss&quot;))
print(client.call(obswebsocket.requests.GetFilenameFormatting()))
client.disconnect()
</code></pre>
<ol start="4">
<li>Open OBS and execute the code
And voilà! A new window will open and it should ask you for your video's name and then start recording.</li>
</ol>
<p>I wanted to write this bc it took me a lot of time to figure this out. So let me know if it helped you too.</p>
