Python plugin: getting recording file path?

LeonidMurashov

New Member
I can't find any information about how to get final ".mp4" file path.
I know that it should look like that "D:/videos/%CCYY-%MM-%DD %hh-%mm-%ss.mp4" for me. But is there any opportunity to get this info from code?

I found something similar for replay buffers. It calls "get_last_replay" from C++ backend. But I am unable to find such a feature for recordings.

Python:
def get_last_replay():
    replay_buffer = obs.obs_frontend_get_replay_buffer_output()
    cd = obs.calldata_create()
    ph = obs.obs_output_get_proc_handler(replay_buffer)
    obs.proc_handler_call(ph, "get_last_replay", cd)
    path = obs.calldata_string(cd, "path")
    obs.calldata_destroy(cd)

    obs.obs_output_release(replay_buffer)
    return path
 

Thinked

New Member
I can't find any information about how to get final ".mp4" file path.
I know that it should look like that "D:/videos/%CCYY-%MM-%DD %hh-%mm-%ss.mp4" for me. But is there any opportunity to get this info from code?

I found something similar for replay buffers. It calls "get_last_replay" from C++ backend. But I am unable to find such a feature for recordings.

Python:
def get_last_replay():
    replay_buffer = obs.obs_frontend_get_replay_buffer_output()
    cd = obs.calldata_create()
    ph = obs.obs_output_get_proc_handler(replay_buffer)
    obs.proc_handler_call(ph, "get_last_replay", cd)
    path = obs.calldata_string(cd, "path")
    obs.calldata_destroy(cd)

    obs.obs_output_release(replay_buffer)
    return path

Did you find any solution to get the path?
 

khaver

Member
You can get that info from the basic.ini file in (Windows):
C:\Users\xxxx\AppData\Roaming\obs-studio\basic\profiles\yyyy\
 
Top