Application in Electron which you can use to control the Theta, paste the url for a YouTube stream and my application starts a new stream with OBS. But the problems already start by choosing the right API.
I am going to use Windows, this pc is connected to the internet with ethernet and activates a hotspot where the Theta can connect to in client mode.
The live stream to OBS will be going over a USB cable but when I connect the Theta to a pc the wifi gets disabled (I read this already in your post here). Is there a workaround for this?
No, you can’t send WiFi API commands to the THETA when it is streaming through the USB cable. You can send USB API commands to control the stream.
I’m still testing on a Theta V but I will be using the Theta Z1 for the final project. I will have the Z1 in a few days and I don’t know yet if the it also disables the wifi on USB connection.
I do not think you can use the Wi-Fi API while the THETA Z1 is streaming over the USB cable. You can use the USB API with the USB cable and the stream will work.
You can stream over Wi-Fi. One of the easier solutions is to use the RICOH THETA LiveView, however that will not generate the FPS you need for streaming to YouTube. This Wi-Fi plug-in can stream to YouTube.
It sounds like your application would benefit from the USB API.
- Is it possible to have client mode always enabled on the Theta V or Z1?
You can leave the THETA in client mode 24/7 and it will stay up if you disable sleep and shutdown. You can do this with the API.
- Can I use the USB for the stream in OBS and the Web API for commands simultaneously?
No.
- Alternatively how can I use the full USB API with Electron?
- Use existing library for PTP on the desktop. For Linux, it is libptp
- Use Electron child process to run the shell command from Electron (It will run the host command line script) Child process | Node.js v21.4.0 Documentation
On Windows Desktop, look at WpdMtp.
- Also, do I need to be a real professional to make this work? Its my first Electron app and I’m still in secondary school.
Get it working from a shell script first and then do the GUI with Electron later. This developer was in high school too. His application didn’t stream.
If you divide your project into small steps and test each step, you can do it. The streaming and the USB API access (with existing library) are controlled by components other people built, so you should be able to glue the components together with JavaScript and Electron.
The primary difficulties you will encounter:
- there’s no example using the USB API with Electron, but you should be able to find some from the command line, then you just need to practice using sub-process (I think called child process in Electron) . With this technique, you should be able to use an command line example that someone else built and then adapt it for your specific application
- There are more examples on this forum of using the USB API with Linux (on Raspberry Pi), but I believe there are people using Windows. Please help out the community and document your work with Windows and the USB API.
Translate this from Japanese to your language.
I think I can take care of the OBS part (OBS settings are in JSON format) but I was wondering if you could share your thoughts and experience with me about the Theta.
Feel free to ask more questions.