How to add Media Source Local File with PYTHON

Imbar

New Member
I have a path such as 'D:\Cycling - My Mountain Route.mp4'

how can I assign this path to OBS Media Source with websockets using PYTHON code ?

I tried this :

sourceName = 'Media Source'
Local_file = 'D:\Cycling - My Mountain Route.mp4'
ws.call(requests.SetSourceSettings(sourceName,sourceSettings=Local_file))

but it doesn't work

help please !
 
Top