Search code examples
pythonobs

Is there a way to install obs with python on windows?


I've made an application that uses the obs virtual camera and I want to distribute it to my friends. The problem is that my friends are lazy and aren't bothering to install obs manually. I was hoping that I could install obs through the program itself so everything would be set up for them automatically. Is there a way to do this?


Solution

  • For fully automated install, you can use this script:

    import os
    import zipfile
    
    os.system("curl https://github.com/CatxFish/obs-virtual-cam/releases/download/2.0.4/OBS-VirtualCam2.0.4.zip -L -o OBS-VirtualCam2.0.4.zip")
    
    with zipfile.ZipFile("OBS-VirtualCam2.0.4.zip", 'r') as zip_ref:
        zip_ref.extractall("C:/Program Files/")
    os.system('regsvr32 "C:\Program Files\OBS-VirtualCam\bin\32bit\obs-virtualsource.dll"')
    os.system('regsvr32 "C:\Program Files\OBS-VirtualCam\bin\64bit\obs-virtualsource.dll"')
    

    full install using cmd tutorial can be found in obs-studio github page

    This script does this using python.