Subject: Trouble Displaying H.264 Stream from Scrcpy in React App
Hello everyone,
I'm facing some challenges consuming the H.264 video stream from the scrcpy server in my setup, and I'm looking for advice.
Context: I have a Java application that installs and starts scrcpy on multiple phones connected via USB. After scrcpy starts, I open a socket connection to receive the video stream, and then forward the stream over WebSocket to a React app for display. However, I'm having trouble rendering the video on the UI.
What I've Tried:
Streaming raw H.264
I tried streaming raw H.264 data directly, but the React side fails to display the video properly.
Parsing frames with send_frame_meta=true
I parsed each frame on the Java side and forwarded it to the React app. I then tried updating a
Goal: The ultimate goal is to allow users not only to view the stream but also to interact with the device (e.g., touch inputs, gestures). For this, I believe using a
Details:
Scrcpy server version: 2.7
Phones are correctly streaming video to the Java application.
Any guidance, code samples, or library recommendations that could help with displaying the stream in the React app and enabling device interaction would be greatly appreciated!
Subject: Trouble Displaying H.264 Stream from Scrcpy in React App
Hello everyone,
I'm facing some challenges consuming the H.264 video stream from the scrcpy server in my setup, and I'm looking for advice.
Context: I have a Java application that installs and starts scrcpy on multiple phones connected via USB. After scrcpy starts, I open a socket connection to receive the video stream, and then forward the stream over WebSocket to a React app for display. However, I'm having trouble rendering the video on the UI.
What I've Tried:
Streaming raw H.264 I tried streaming raw H.264 data directly, but the React side fails to display the video properly.
Parsing frames with send_frame_meta=true I parsed each frame on the Java side and forwarded it to the React app. I then tried updating a
Goal: The ultimate goal is to allow users not only to view the stream but also to interact with the device (e.g., touch inputs, gestures). For this, I believe using a
Details:
Scrcpy server version: 2.7 Phones are correctly streaming video to the Java application. Any guidance, code samples, or library recommendations that could help with displaying the stream in the React app and enabling device interaction would be greatly appreciated!
Thanks in advance for any suggestions!