Envek / obs-studio-node-example

Learn how to use OBS Studio from your Electron app for screen video recording
GNU General Public License v2.0
99 stars 19 forks source link

Virtual camera is called `Streamlabs OBS Virtual Camera` #44

Open hrueger opened 3 years ago

hrueger commented 3 years ago

When enabled, the virtual camera shows up as Streamlabs OBS Virtual Camera. The relevant code in obs-studio-node is here, however, there's no hardcoded Streamlabs OBS Virtual Camera...

alokmahor commented 3 years ago

https://github.com/stream-labs/obs-studio-node/issues/909#issuecomment-826261958_

hrueger commented 3 years ago

Thanks @alokmahor. I'll test this. I want to automate the build using GitHub Actions, but unfortunately, obs-studio-node needs VisualStudio 15 or 17. OBS itself, however, needs 17 or 19 with a very recent Windows 10 SDK. On the windows-2019 Actions environment there's only VS 19 and on windows-2016 the Windows 10 SDK is too old. The issue is tracked here: https://github.com/actions/virtual-environments/issues/3294

I'll close this issue once I can confirm that the custom name is working as intended.

alokmahor commented 3 years ago

I am able to build obs-studio-node as well as obs-studio using latest visual studio 19 without any issue.

hrueger commented 3 years ago

Oh, interesting. I'll try that right now.

hrueger commented 3 years ago

@alokmahor Did you install anything related to ffmpeg? I'm stuck with the following error CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):

-- Configuring incomplete, errors occurred!
  Could NOT find FFmpeg (missing: FFMPEG_AVCODEC_LIBRARIES
  FFMPEG_AVCODEC_INCLUDE_DIRS avcodec avdevice avutil avformat)
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindFFmpeg.cmake:151 (find_package_handle_standard_args)
  deps/media-playback/CMakeLists.txt:3 (find_package)

see https://github.com/hrueger/obs-studio-node-builds/runs/2481714957?check_suite_focus=true my workflow is here: https://github.com/hrueger/obs-studio-node-builds/blob/main/.github/workflows/build.yml

alokmahor commented 3 years ago

I have emailed you exact steps

alokmahor commented 3 years ago

To build obs-studio-node you need https://github.com/stream-labs/obs-studio not https://github.com/obsproject/obs-studio

jagaa99a commented 1 year ago

Hi @alokmahor Can you share the exact steps to rename a virtual camera?

Thank you

hrueger commented 1 year ago

Hi @alokmahor, this is what he had sent me via email:

  1. git clone --recursive https://github.com/stream-labs/obs-studio
  2. now edit source code to change virtual camera name in the file plugins/slobs-virtual-cam/windows/obs-virtual-cam/src/virtual-source/dllmain.cpp
  3. now we are ready to compile this project for that we need do download dependencies
  4. download dependencies from https://obsproject.com/downloads/dependencies2019.zip
  5. cd obs-studio
  6. mkdir build64
  7. cmake -G "Visual Studio 16 2019" -A x64 -S . -B build64 -DDepsPath=C:\Users\alokm\Downloads\dependencies2019\win64 -DCMAKE_CONFIGURATION_TYPES=Release -DENABLE_UI=false -DENABLE_SCRIPTING=false
  8. cmake --build build64 --config Release
  9. cd .\build64\
  10. cpack -G TGZ
  11. You have got obs-studio/build64/obs-studio-x64-26.4.9-modified.tar.gz generated which you will use as dependency for building obs-studio-node
  12. we are ready to build obs-studio-node
  13. git clone https://github.com/stream-labs/obs-studio-node
  14. cd obs-studio-node
  15. mkdir build64
  16. cmake -G"Visual Studio 16 2019" -A x64 -DOSN_LIBOBS_URL="C:/Users/alokm/tmp/streamlabs/obs-studio/build64/obs-studio-x64-26.4.9-modified.tar.gz" -B build64
  17. cmake --build build64 --config Release
  18. cd .\build64\
  19. cpack -G TGZ
  20. now you got your custom obs-studio-node build to use in your package.json

Hope that helps!

jagaa99a commented 1 year ago

@hrueger Thank you for sharing.

Have you tried these steps? I stuck at

  1. cpack -G TGZ CPack Error: CPack project name not specified

Did you complete this step?

hrueger commented 1 year ago

I'm not sure. I've been working on this three years ago, I don't remember, to be honest.

jamesguitar3 commented 1 year ago

Hi @jagaa99a , I just ran into the same error. Did you manage to resolve that? Thanks.

cpack -G TGZ CPack Error: CPack project name not specified

jamesguitar3 commented 1 year ago

Just realize that there's no cpack included in the CMakeLists file. I added the following lines in the end of the CMakeLists and was able to pack successfully.

set(CPACK_PACKAGE_NAME "XXX")  
set(CPACK_PACKAGE_VERSION "0.1.0")
set(CPACK_RPM_PACKAGE_GROUP "XXX")           
set(CPACK_PACKAGE_VENDOR "XXX")    

include(CPack)
jagaa99a commented 1 year ago

@jamesguitar3 I have already moved on to another project. But glad that you packaged successfully.