-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support remote controlling retro console devices #103
Comments
Hmm... We are focused on providing a remote desktop that offers a way to control a remote screen as well as send the remote screen to the client. Streaming only videos of such devices is pretty trivial and there are WebRTC gateways that would provide a Web UI as well. I am unsure what the gain would be by supporting to send a unidirectional stream like the description. Could you elaborate on how this request aligns with the Selkies project? |
I understand sending over a unidirectional stream is trivial and can be done with other WebRTC gateways. Maybe not all described use cases are that relevant. However, my personal use case is remote play on the original retro consoles (eg. NES, SNES, ...). When attaching the HDMI to my server using a capture card (represented as UVC device) and streaming it over the local network I would be able to see the gameplay but there is no way to control the game. Therefore, I also need the controller input to be streamed back to the server and then (via custom implementation not related to this project) pass it to the controller input of the console. Without this enhancement the video from the capture card should first go through the display stack to be shown on the screen before selkies-gstreamer can stream it to remote devices. This would definitely add to latency in a scenario where low input latency is key. To provide more flexibility for other people's use cases in general supporting appsrc can be very useful. This allows the src of the video can come from anywhere and can have any gstreamer filter be applied to it before passing it on to selkies-gstreamer. This implementation can help all use cases where video comes from an external source and user input is needed. |
Okay. Let's say that we can use appsrc to stream arbitrary screens to Selkies. However, the interface to relay the control input is a wholly different thing to do. This is processed independently of GStreamer. Because you still have to go through a Linux host in whichever case, I don't believe that the latency benefits will be large enough. |
We will consider this proposal, IF there is a unified API to process and pass inputs for such retro consoles and video devices. Otherwise, retro game emulators like RetroArch also are meant to run on an X server. |
There is a standard for passing input info over USB/Bluetooth/...: HID format. But unfortunately in reality it is not as simple as that: eg. for sending inputs over USB the host running selkies-gstreamer should have a USB 'OTG' port so it can act as a USB slave. This is a port most PC's don't have as it was originally created for handheld devices like smartphones. For my personal situation, I plan to abuse the UART debug port of a Blueretro device so I can pass inputs over a wired connection directly to the retro console. This device supports several retro consoles and input can be transmitted over UART in the HID format. Because the way of handling input is quite scattered I don't think it is useful to implement such custom input forwarding: anyone who wants to use this can catch input events and forward them in a way that is suitable for their situation. But I still think it is useful to provide support for another source for video than the X server/wayland, even if it is only for applying custom gstreamer transformations to the video capture of the display. Further, I should note that I am relatively new to gstreamer and after reading in a bit more I think providing support of something like shmsrc + gdpdepay should be used to allow connection with a gstreamer pipeline from another process. The appsrc plugin seems to be used only for getting data from the same process that is not a gstreamer pipeline into a gstreamer pipeline. |
I'll leave this issue open, but supporting external sources and external input devices should not be our scope, as the current implementations perform everything inside the operating system and don't even rely on a connected physical monitor. There are a lot of different requirements for "custom" input forwarding. If you learn GStreamer a bit more, you should find that replacing The X server is universal to everyone using a Linux operating system. What you are proposing, however, is to handle a set of fragmented devices with different ways to obtain its stream and different ways to process input. https://github.com/darthcloud/BlueRetro looks interesting, though. I suggest forking the project, changing |
Plus, the latency added from the X server is miniscule. I am pretty sure the largest portion of the latency comes from the internet network, not the X server. If there is an application on Linux that lets you control the retro devices, you should use it instead of going through all this effort. Even if you try to implement a method to directly control the retro device, you still pass through the computer that runs Selkies, which relays the video stream that you obtain and pass the input commands. I assure you that latency differences will be minimal even if you go through the X server virtual display. |
https://github.com/LizardByte/PyStream @Wanimatrix Perhaps this is on your direction. |
Closing because this is not a project issue. |
Move to: m1k1o/neko#371 |
Instead of capturing the display using ximagesrc plugin, support v4l2src plugin to allow for webcams or capture cards that support UVC (USB Video Class) to be streamed.
Some use cases:
This feature is already possible now by simply adding a gstreamer pipeline before selkies-gstreamer that takes the UVC stream and displays it on a (virtual or not) display. But supporting this would make it more straightforward and would reduce the need for a virtual display on a headless server.
Another option that allows for more flexibility is to have an API that allows for adding your own elements instead of the ximagesrc. This can be done by supporting the appsrc plugin.
The text was updated successfully, but these errors were encountered: