Opened 8 weeks ago
Last modified 6 weeks ago
#2995 new enhancement
Announce video stream as DLNA/UPnP media source
Reported by: | amontero | Owned by: | amontero |
---|---|---|---|
Priority: | major | Milestone: | 4.2 |
Component: | network | Version: | 3.0.x |
Keywords: | Cc: |
Description
Usage scenario:
Nowadays, all TVs feature DLNA "client" (renderer in DLNA parlance). They can render multimedia streams available in the LAN from any available media server. It is also a standard widely supported by lots of devices and software (Playstation, VLC, Kodi).
By just announcing the stream to the LAN (via an optional switch), any of these devices could be used as a monitor without any direct (physical) cabling to PC/server.
I'm still not deep into xpra usage, but think of it as secondary desktop on your TV or to use a headless (no VGA, DVI, HDMI physical cabling) for a desktop. Or just easily exposing a single GUI app output to the LAN.
Since there is already a media stream, only doing a proper UPnP server LAN broadcast would do, since client devices would just connect to the stream.
My Python is not that awesome, but with proper guidance I can even take a stab at it.
Attachments (1)
Change History (4)
comment:1 Changed 8 weeks ago by
Status: | new → assigned |
---|
comment:2 Changed 8 weeks ago by
Owner: | changed from Antoine Martin to amontero |
---|---|
Status: | assigned → new |
With the patch above and a TCP server on port 10000, you can hit this URL to download a video stream of window 2 (you can skip &wid=2
if there is only one window):
wget "http://localhost:10000/video?encoding=h264&wid=2"
It needs a lot more work:
- code is hacked together, needs tidying up and moving to a dedicate handler class
- error handling
- if the window is resized... the video stream won't be
- not tested with desktop and shadow mode, should work
- the stream uses raw
h264
- you can play it withmplayer
but probably not with other devices, it should be usingh264+mp4
to get a container format
etc..
I don't have time to chase this.
comment:3 Changed 6 weeks ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2995
No there isn't. By default, screen updates are encoded using various codecs (not always video) and sent as discrete packets.
A DLNA connection would require running a
WindowVideoSource
in video mode (onlyh264
enabled) with thefull_frames_only=True
.The URL would need to hit a script path to create it, similar to what we already do for audio with IE in
http_audio_mp3_request
. Authentication could be done using an OTP, or none to begin with. (generating qrcodes for those URLs might be useful too #2627)There would need to be some wiring added to
WindowSource
so that it doesn't send any packets via the regularqueue_packet
function. (and disable congestion notifications)Rate control may need this override to trigger
damage_packet_acked
as soon as the buffer is written out to the http connection.Overall, this does not look too hard to implement.