[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72TV7M21NMB4P4YBVGRDVNB":3,"skill-same:01M72TV7M21NMB4P4YBVGRDVNB":106},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":14,"repositoryHtmlUrl":52,"repositoryHomepageUrl":52,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M72TV7M21NMB4P4YBVGRDVNB","remote-displays",null,"Discover, cast to, and control screens on the LAN.","iberi22\u002Fskills","iberi22","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F10615454?v=4","01M72SQ2NXAA3GW0FSH053A5ES","Brahyan Belalcazar","01M72SQ2PYCH0SSA1K61NGEHDV",0,"MIT","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fremote-displays\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fremote-displays\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: remote-displays\nid: remote-displays\ncategory: tools\ndescription: Discover, cast to, and control screens on the LAN.\nversion: 0.4.1\nauthors: [Brahyan Belalcazar (iberi22), Hermes Agent]\nlicense: MIT\nplatforms: [linux]\ntags: [displays, dlna, upnp, casting, smart-tv, ssdp, mdns, hls]\ngoals:\n  - \"Find smart TVs and UPnP\u002FDLNA renderers on a LAN and cast files, URLs, or live streams to them.\"\n  - \"Control playback, volume, seeking, and Wake-on-LAN power-on from an agent or terminal.\"\n  - \"Mirror a virtual desktop output to a screen over the network via live HLS.\"\nmetadata:\n  hermes:\n    tags: [displays, dlna, upnp, casting, smart-tv, ssdp, mdns, hls]\n    related_skills: []\n---\n\n# Remote Displays\n\nDiscover LAN screens with SSDP\u002FmDNS, cast files or URLs through DLNA\u002FUPnP\nAVTransport, control playback and master volume, wake screens with Wake-on-LAN,\nand mirror a whole compositor output (for example a virtual second monitor) to a\nscreen as a live HLS stream. Everything is Python standard library; the `monitor`\ncommand additionally drives `wf-recorder` and `ffmpeg` when present.\nIt does not do Miracast\u002FWi-Fi-Direct (that needs a Wi-Fi Direct radio), and\nMiracast-over-Infrastructure (MICE) needs a sink advertising `_display._tcp` plus\na helper such as GNOME Network Displays; AirPlay screen-sending has no practical\nLinux sender in this workflow. An mDNS advertisement alone does not prove that a\nscreen supports DLNA control.\n\n## When to Use\n\n- Find Samsung Tizen, LG webOS, or generic UPnP MediaRenderer screens on the LAN.\n- Send a supported media file or reachable media URL to a screen.\n- Inspect the current media URI, playback state, position, and duration.\n- Pause, stop, seek, adjust volume, or mute a renderer.\n- Power on a sleeping screen with a Wake-on-LAN magic packet.\n- Mirror a whole compositor output (e.g. a virtual second monitor) to a screen as a\n  live stream over the network.\n- Check whether a screen advertises MICE before trying an external helper.\n\nDon't use for:\n\n- Low-latency mirroring or gaming streams (HLS segmentation adds seconds of latency).\n- Pairing, authentication, or proprietary TV remote buttons.\n- Assuming AirPlay or Google Cast discovery implies protocol playback support.\n\n## Prerequisites\n\n- Linux with Python 3.10 or newer; no pip packages are required.\n- Computer and screen reachable on the same LAN, without client isolation.\n- A DLNA-enabled screen exposing AVTransport for playback and RenderingControl\n  for volume; enable media sharing\u002Fcasting in the screen settings if necessary.\n- A readable local media file, or a URL the screen itself can retrieve.\n- For `monitor`: `wf-recorder` (Wayland\u002Fwlroots capture; override with `--capture`),\n  `ffmpeg` on PATH for HLS, and on Hyprland the `hyprctl` helper for `--create-headless`.\n  Inbound TCP on the chosen `--port` (default 8124) must be allowed from the screen.\n  Video only; audio is not captured.\n- For `wake`: Wake-on-LAN enabled in the screen's network settings. Give it an IP\n  with a fresh ARP entry or pass its MAC address directly.\n- Inbound firewall access for discovery replies and the media server; see Pitfalls.\n- Run commands through Hermes `terminal` from this skill's root directory.\n- Set `SCREEN_IP` to an address returned by discovery, rather than guessing.\n- For local playback, give the terminal sufficient time to cover `--duration`.\n  The foreground process must stay alive while the screen fetches the file.\n\n## Quick Reference\n\n- `python3 scripts\u002Fremote_display.py --help`\n- `python3 scripts\u002Fremote_display.py discover --timeout 3 --json`\n- `python3 scripts\u002Fremote_display.py info \"$SCREEN_IP\" --timeout 3 --json`\n- `python3 scripts\u002Fremote_display.py status \"$SCREEN_IP\" --timeout 3 --json`\n- `python3 scripts\u002Fremote_display.py play \"$SCREEN_IP\" .\u002Fmovie.mp4 --port 8124 --duration 600`\n- `python3 scripts\u002Fremote_display.py play \"$SCREEN_IP\" \"$MEDIA_URL\" --timeout 3`\n- `python3 scripts\u002Fremote_display.py play \"$SCREEN_IP\" .\u002Fmovie.mp4 --advertise-ip \"$LAN_IP\" --stop-at-end`\n- `python3 scripts\u002Fremote_display.py pause \"$SCREEN_IP\" --timeout 3`\n- `python3 scripts\u002Fremote_display.py stop \"$SCREEN_IP\" --timeout 3`\n- `python3 scripts\u002Fremote_display.py volume \"$SCREEN_IP\" --get`\n- `python3 scripts\u002Fremote_display.py volume \"$SCREEN_IP\" --set 30`\n- `python3 scripts\u002Fremote_display.py volume \"$SCREEN_IP\" --up`\n- `python3 scripts\u002Fremote_display.py volume \"$SCREEN_IP\" --down`\n- `python3 scripts\u002Fremote_display.py volume \"$SCREEN_IP\" --mute`\n- `python3 scripts\u002Fremote_display.py volume \"$SCREEN_IP\" --unmute`\n- `python3 scripts\u002Fremote_display.py seek \"$SCREEN_IP\" 00:10:00`\n- `python3 scripts\u002Fremote_display.py wake \"$SCREEN_MAC_OR_IP\"`\n- `python3 scripts\u002Fremote_display.py monitor \"$SCREEN_IP\" --output HEADLESS-2 --create-headless`\n- `python3 scripts\u002Fremote_display.py monitor \"$SCREEN_IP\" --output HEADLESS-2 --transport hls --segment 1 --list-size 3 --verbose`\n- `python3 scripts\u002Fremote_display.py monitor \"$SCREEN_IP\" --output HEADLESS-2 --transport ts --ts-mime video\u002Fmpeg --verbose`\n- `python3 scripts\u002Fremote_display.py mice-scan --timeout 3`\n\n## Procedure\n\n1. Discover candidates using `python3 scripts\u002Fremote_display.py discover --json`.\n   SSDP searches for MediaRenderer devices and fetches each unique description;\n   mDNS queries AirPlay, RAOP, Google Cast, MICE, Samsung, and service enumeration.\n   Records with the same A-IP are grouped, retaining their mDNS service details.\n   If an advertisement lacks A records, its IP is null; do not invent an address.\n   **Complete when:** the intended screen appears with its IP, or discovery\n   explicitly reports no screens and exits with code 2.\n\n2. Set `SCREEN_IP` from discovery and run\n   `python3 scripts\u002Fremote_display.py info \"$SCREEN_IP\" --json`.\n   Inspect name, model, services, and resolved control URLs.\n   Samsung fallback probes use port 9197 `\u002Fdmr` and port 8001 `\u002Fapi\u002Fv2\u002F`.\n   A Tizen API response alone provides identification, not a DLNA control URL.\n   **Complete when:** the intended screen is identified and its AVTransport\n   service has a control URL, or the absence of that service is recorded.\n\n3. (Optional) Power on a sleeping screen with\n   `python3 scripts\u002Fremote_display.py wake \"$SCREEN_IP\"`; it resolves the MAC from\n   the kernel ARP table (pass a MAC address directly when there is no ARP entry).\n   **Complete when:** the command reports the magic packet destination (the screen\n   powers on only if Wake-on-LAN is enabled in its settings).\n\n4. Select media that the screen supports and can reach.\n   For local files, choose a server port allowed by the host firewall.\n   The script detects the outgoing LAN address through a UDP socket route;\n   set `--advertise-ip \"$LAN_IP\"` when multiple interfaces choose the wrong route.\n   For URLs, use HTTP, HTTPS, or RTSP; the script does not download or transcode them.\n   **Complete when:** the source exists locally or is reachable from the screen,\n   and the chosen local server port is allowed when serving a file.\n\n5. Start casting with\n   `python3 scripts\u002Fremote_display.py play \"$SCREEN_IP\" .\u002Fmovie.mp4 --duration 600`.\n   The local HTTP server exposes only the chosen file, supports HEAD and GET\n   byte ranges, and advertises its URL before sending SetAVTransportURI and Play.\n   Adjust duration to cover playback; default is 600 seconds after Play succeeds\n   (must be greater than 0).\n   Add `--stop-at-end` to send Stop before the local server closes.\n   Direct URL casting starts no server and returns after Play is accepted.\n   **Complete when:** the terminal prints the media URL and `Play accepted.`.\n\n6. In another terminal, run\n   `python3 scripts\u002Fremote_display.py status \"$SCREEN_IP\" --json` twice,\n   a few seconds apart, while the serving process remains alive.\n   Compare TransportState, CurrentURI, position, and duration.\n   **Complete when:** state is PLAYING and position advances for the selected URI.\n\n7. Use `pause`, `stop`, `seek`, or `volume` as needed.\n   Pause and Stop read back playback state; `seek` takes `HH:MM:SS` and reads\n   back the position; volume changes read back volume.\n   Up\u002Fdown move by five within 0–100; mute\u002Funmute read back CurrentMute.\n   **Complete when:** the displayed readback matches the requested change.\n\n8. If desktop sharing is required, run\n   `python3 scripts\u002Fremote_display.py mice-scan`.\n   This only discovers `_display._tcp.local` PTR\u002FSRV\u002FTXT\u002FA records.\n   If a sink appears, the script suggests `gnome-network-displays`; configure\n   that helper separately and open the firewall required by the helper\u002Fsink.\n   **Complete when:** a sink's name, target, port, and TXT appear, or the output\n   clearly says no MICE sinks were found.\n\n9. To mirror a whole screen output to the screen as a live stream, run\n   `python3 scripts\u002Fremote_display.py monitor \"$SCREEN_IP\" --output HEADLESS-2 --create-headless`.\n   The default is tuned HLS: 1 s segments and a 3-segment playlist.\n   `--transport ts` bypasses ffmpeg and serves progressive MPEG-TS at `\u002Flive.ts`;\n   use `--ts-mime video\u002Fmp2t` if the renderer needs that MIME type.\n   It captures the output with wf-recorder, serves the stream on `--port` to the\n   target screen only, and casts with the DIDL metadata strict renderers require.\n   Ctrl+C stops the screen and closes the pipeline; a headless output created by\n   the run is removed on exit unless `--keep-headless` is passed.\n   **Complete when:** `status` shows `PLAYING` on the `live.m3u8` URL and fetch\n   activity continues while the command runs.\n\n## Pitfalls\n\n- Inbound firewall rules must allow TCP on the selected media server port\n  (default 8124) from the screen, UDP 5353 for mDNS, and SSDP reply traffic\n  arriving from UDP source port 1900 to the search socket's ephemeral port.\n  Opening only inbound destination port 1900 does not cover those replies.\n- On NixOS, arrange the relevant allowed TCP\u002FUDP ports or a scoped rule for\n  SSDP replies; this script never modifies firewall configuration.\n- Multicast discovery may fail across routed subnets, VPNs, guest Wi-Fi,\n  VLAN boundaries, or wireless client isolation despite unicast reachability.\n- mDNS binds UDP 5353 with address reuse; if the local responder prevents\n  binding or joining the group, discovery warns and still attempts SSDP.\n- A larger `--timeout` gives replies more time. Each network operation has\n  its own wait; discover performs one SSDP pass then one raw mDNS pass.\n  Description fetches are capped at two seconds each.\n- Some TVs only accept `video\u002Fmp4`; the server chooses Content-Type from the\n  extension and does not inspect or convert codecs.\n- TVs sometimes require H.264 video plus AAC audio inside an MP4 container.\n  Renaming an incompatible file to `.mp4` does not convert it.\n- DLNA is not mirroring. It fetches a static file\u002FURL and exposes playback control.\n- Classic Miracast needs Wi-Fi Direct hardware and a separate sender stack.\n  MICE needs `_display._tcp` advertising, GNOME Network Displays or another\n  helper, and appropriate firewall access; most TVs do not advertise MICE.\n- `monitor` defaults to tuned HLS (1 s target, 3-segment playlist), because\n  Samsung UN65TU7000-series sets disconnected progressive TS with both\n  `video\u002Fmpeg` and `video\u002Fmp2t`. Expect roughly 3–4 s of structural HLS delay;\n  absolute display latency requires visual measurement. `--segment 0.5` still\n  yields ~1 s segments with the fixed 30-frame GOP at 30 fps. Measured on a\n  wired TU7000: first video ≈4 s after Play with these defaults.\n- Progressive TS supports only one GET viewer; another GET receives HTTP 409.\n  HEAD probes do not consume the viewer slot. It skips ffmpeg and segmentation,\n  but renderer buffering and compatibility vary. Do not select it just because\n  SOAP Play succeeds: require PLAYING plus sustained byte flow for at least 60 s.\n- `--verbose` logs request timing, TS byte counters, HLS bytes and publication\n  timestamps. Playlist and stream responses use `no-store`; live reads are at\n  most 64 KiB. The stream is video-only; HLS requires wf-recorder plus ffmpeg.\n- `wake` requires Wake-on-LAN enabled on the screen; without a fresh ARP entry\n  pass the MAC address. The magic packet goes to the broadcast address and,\n  when known, the IP.\n- Some renderers reject `Seek`; expect an error when the service lacks support.\n- The HLS server serves only the playlist and its segments (fixed name whitelist);\n  nothing else in the directory is exposed.\n- AirPlay\u002FRAOP\u002FGoogle Cast\u002FSamsung mDNS records are discovery hints only.\n  This script implements UPnP SOAP control, not those proprietary protocols.\n- The local servers are unauthenticated and bind to the advertised LAN address;\n  `play` and `monitor` additionally serve only the target screen's IP by default\n  (other hosts receive HTTP 403; override deliberately with `--allow-any-client`).\n  Keep them on a trusted network.\n- `monitor` streams the captured desktop output to the screen while it runs:\n  treat it as sensitive screen content and stop the command when done. A\n  headless output created by that run is removed on exit unless `--keep-headless`\n  is passed.\n- A server URL is useful only while the casting process is alive.\n  When duration expires, later seeking or fetching may fail unless Stop was sent.\n- `--stop-at-end` applies to locally served files. Direct URL playback has\n  no local lifetime timer; use the separate `stop` command when needed.\n- Single byte ranges, including suffix ranges, are supported. Multiple ranges\n  and unsatisfiable ranges receive HTTP 416.\n- Renderers without RenderingControl cannot provide volume operations.\n  Some vendor APIs offer identification without an AVTransport service.\n- Errors are concise and go to stderr; JSON success data goes to stdout.\n  Exit 0 means success, 2 means not-found\u002Ftimeout, and 1 means another error.\n  Argparse also uses 2 for invalid command syntax.\n\n## Verification\n\nUse `python3 scripts\u002Fremote_display.py status \"$SCREEN_IP\" --json` twice\nwith a few seconds between reads. Confirm TransportState is `PLAYING`,\nCurrentURI matches the printed media URL, and position advances.\nA successful SOAP Play response alone is insufficient proof of visible playback.\nCheck the screen itself for the expected picture\u002Faudio and verify pause,\nstop, seek, volume, and mute through their readback and the screen's behavior.\nFor `monitor`, repeat the two-read check against the `live.m3u8` URL: the screen\nkeeps fetching the playlist and new segments while the pipeline runs (visible with\n`ss -tn`). For `wake`, success is the printed destination plus the screen powering on.\n\nFor offline implementation checks, run:\n\n```sh\npython3 -m py_compile scripts\u002Fremote_display.py\npython3 -m unittest discover -s scripts\u002Ftests -v\n```\n\nThese checks use synthetic fixtures and mocks plus a local HTTP test server;\nthey do not discover or control a real screen.\n\n## Extensions\n\nSee `references\u002Fextensions.md` for possible extensions and provenance: the verified\ndesktop-streaming recipe used by `monitor`, vendor app launching, subtitle\nside-loading, transcoding, and event subscriptions.\n","# Remote Displays\n\nDiscover LAN screens with SSDP\u002FmDNS, cast files or URLs through DLNA\u002FUPnP\nAVTransport, control playback and master volume, wake screens with Wake-on-LAN,\nand mirror a whole compositor output (for example a virtual second monitor) to a\nscreen as a live HLS stream. Everything is Python standard library; the `monitor`\ncommand additionally drives `wf-recorder` and `ffmpeg` when present.\nIt does not do Miracast\u002FWi-Fi-Direct (that needs a Wi-Fi Direct radio), and\nMiracast-over-Infrastructure (MICE) needs a sink advertising `_display._tcp` plus\na helper such as GNOME Network Displays; AirPlay screen-sending has no practical\nLinux sender in this workflow. An mDNS advertisement alone does not prove that a\nscreen supports DLNA control.\n\n## When to Use\n\n- Find Samsung Tizen, LG webOS, or generic UPnP MediaRenderer screens on the LAN.\n- Send a supported media file or reachable media URL to a screen.\n- Inspect the current media URI, playback state, position, and duration.\n- Pause, stop, seek, adjust volume, or mute a renderer.\n- Power on a sleeping screen with a Wake-on-LAN magic packet.\n- Mirror a whole compositor output (e.g. a virtual second monitor) to a screen as a\n  live stream over the network.\n- Check whether a screen advertises MICE before trying an external helper.\n\nDon't use for:\n\n- Low-latency mirroring or gaming streams (HLS segmentation adds seconds of latency).\n- Pairing, authentication, or proprietary TV remote buttons.\n- Assuming AirPlay or Google Cast discovery implies protocol playback support.\n\n## Prerequisites\n\n- Linux with Python 3.10 or newer; no pip packages are required.\n- Computer and screen reachable on the same LAN, without client isolation.\n- A DLNA-enabled screen exposing AVTransport for playback and RenderingControl\n  for volume; enable media sharing\u002Fcasting in the screen settings if necessary.\n- A readable local media file, or a URL the screen itself can retrieve.\n- For `monitor`: `wf-recorder` (Wayland\u002Fwlroots capture; override with `--capture`),\n  `ffmpeg` on PATH for HLS, and on Hyprland the `hyprctl` helper for `--create-headless`.\n  Inbound TCP on the chosen `--port` (default 8124) must be allowed from the screen.\n  Video only; audio is not captured.\n- For `wake`: Wake-on-LAN enabled in the screen's network settings. Give it an IP\n  with a fresh ARP entry or pass its MAC address directly.\n- Inbound firewall access for discovery replies and the media server; see Pitfalls.\n- Run commands through Hermes `terminal` from this skill's root directory.\n- Set `SCREEN_IP` to an address returned by discovery, rather than guessing.\n- For local playback, give the terminal sufficient time to cover `--duration`.\n  The foreground process must stay alive while the screen fetches the file.\n\n## Quick Reference\n\n- `python3 scripts\u002Fremote_display.py --help`\n- `python3 scripts\u002Fremote_display.py discover --timeout 3 --json`\n- `python3 scripts\u002Fremote_display.py info \"$SCREEN_IP\" --timeout 3 --json`\n- `python3 scripts\u002Fremote_display.py status \"$SCREEN_IP\" --timeout 3 --json`\n- `python3 scripts\u002Fremote_display.py play \"$SCREEN_IP\" .\u002Fmovie.mp4 --port 8124 --duration 600`\n- `python3 scripts\u002Fremote_display.py play \"$SCREEN_IP\" \"$MEDIA_URL\" --timeout 3`\n- `python3 scripts\u002Fremote_display.py play \"$SCREEN_IP\" .\u002Fmovie.mp4 --advertise-ip \"$LAN_IP\" --stop-at-end`\n- `python3 scripts\u002Fremote_display.py pause \"$SCREEN_IP\" --timeout 3`\n- `python3 scripts\u002Fremote_display.py stop \"$SCREEN_IP\" --timeout 3`\n- `python3 scripts\u002Fremote_display.py volume \"$SCREEN_IP\" --get`\n- `python3 scripts\u002Fremote_display.py volume \"$SCREEN_IP\" --set 30`\n- `python3 scripts\u002Fremote_display.py volume \"$SCREEN_IP\" --up`\n- `python3 scripts\u002Fremote_display.py volume \"$SCREEN_IP\" --down`\n- `python3 scripts\u002Fremote_display.py volume \"$SCREEN_IP\" --mute`\n- `python3 scripts\u002Fremote_display.py volume \"$SCREEN_IP\" --unmute`\n- `python3 scripts\u002Fremote_display.py seek \"$SCREEN_IP\" 00:10:00`\n- `python3 scripts\u002Fremote_display.py wake \"$SCREEN_MAC_OR_IP\"`\n- `python3 scripts\u002Fremote_display.py monitor \"$SCREEN_IP\" --output HEADLESS-2 --create-headless`\n- `python3 scripts\u002Fremote_display.py monitor \"$SCREEN_IP\" --output HEADLESS-2 --transport hls --segment 1 --list-size 3 --verbose`\n- `python3 scripts\u002Fremote_display.py monitor \"$SCREEN_IP\" --output HEADLESS-2 --transport ts --ts-mime video\u002Fmpeg --verbose`\n- `python3 scripts\u002Fremote_display.py mice-scan --timeout 3`\n\n## Procedure\n\n1. Discover candidates using `python3 scripts\u002Fremote_display.py discover --json`.\n   SSDP searches for MediaRenderer devices and fetches each unique description;\n   mDNS queries AirPlay, RAOP, Google Cast, MICE, Samsung, and service enumeration.\n   Records with the same A-IP are grouped, retaining their mDNS service details.\n   If an advertisement lacks A records, its IP is null; do not invent an address.\n   **Complete when:** the intended screen appears with its IP, or discovery\n   explicitly reports no screens and exits with code 2.\n\n2. Set `SCREEN_IP` from discovery and run\n   `python3 scripts\u002Fremote_display.py info \"$SCREEN_IP\" --json`.\n   Inspect name, model, services, and resolved control URLs.\n   Samsung fallback probes use port 9197 `\u002Fdmr` and port 8001 `\u002Fapi\u002Fv2\u002F`.\n   A Tizen API response alone provides identification, not a DLNA control URL.\n   **Complete when:** the intended screen is identified and its AVTransport\n   service has a control URL, or the absence of that service is recorded.\n\n3. (Optional) Power on a sleeping screen with\n   `python3 scripts\u002Fremote_display.py wake \"$SCREEN_IP\"`; it resolves the MAC from\n   the kernel ARP table (pass a MAC address directly when there is no ARP entry).\n   **Complete when:** the command reports the magic packet destination (the screen\n   powers on only if Wake-on-LAN is enabled in its settings).\n\n4. Select media that the screen supports and can reach.\n   For local files, choose a server port allowed by the host firewall.\n   The script detects the outgoing LAN address through a UDP socket route;\n   set `--advertise-ip \"$LAN_IP\"` when multiple interfaces choose the wrong route.\n   For URLs, use HTTP, HTTPS, or RTSP; the script does not download or transcode them.\n   **Complete when:** the source exists locally or is reachable from the screen,\n   and the chosen local server port is allowed when serving a file.\n\n5. Start casting with\n   `python3 scripts\u002Fremote_display.py play \"$SCREEN_IP\" .\u002Fmovie.mp4 --duration 600`.\n   The local HTTP server exposes only the chosen file, supports HEAD and GET\n   byte ranges, and advertises its URL before sending SetAVTransportURI and Play.\n   Adjust duration to cover playback; default is 600 seconds after Play succeeds\n   (must be greater than 0).\n   Add `--stop-at-end` to send Stop before the local server closes.\n   Direct URL casting starts no server and returns after Play is accepted.\n   **Complete when:** the terminal prints the media URL and `Play accepted.`.\n\n6. In another terminal, run\n   `python3 scripts\u002Fremote_display.py status \"$SCREEN_IP\" --json` twice,\n   a few seconds apart, while the serving process remains alive.\n   Compare TransportState, CurrentURI, position, and duration.\n   **Complete when:** state is PLAYING and position advances for the selected URI.\n\n7. Use `pause`, `stop`, `seek`, or `volume` as needed.\n   Pause and Stop read back playback state; `seek` takes `HH:MM:SS` and reads\n   back the position; volume changes read back volume.\n   Up\u002Fdown move by five within 0–100; mute\u002Funmute read back CurrentMute.\n   **Complete when:** the displayed readback matches the requested change.\n\n8. If desktop sharing is required, run\n   `python3 scripts\u002Fremote_display.py mice-scan`.\n   This only discovers `_display._tcp.local` PTR\u002FSRV\u002FTXT\u002FA records.\n   If a sink appears, the script suggests `gnome-network-displays`; configure\n   that helper separately and open the firewall required by the helper\u002Fsink.\n   **Complete when:** a sink's name, target, port, and TXT appear, or the output\n   clearly says no MICE sinks were found.\n\n9. To mirror a whole screen output to the screen as a live stream, run\n   `python3 scripts\u002Fremote_display.py monitor \"$SCREEN_IP\" --output HEADLESS-2 --create-headless`.\n   The default is tuned HLS: 1 s segments and a 3-segment playlist.\n   `--transport ts` bypasses ffmpeg and serves progressive MPEG-TS at `\u002Flive.ts`;\n   use `--ts-mime video\u002Fmp2t` if the renderer needs that MIME type.\n   It captures the output with wf-recorder, serves the stream on `--port` to the\n   target screen only, and casts with the DIDL metadata strict renderers require.\n   Ctrl+C stops the screen and closes the pipeline; a headless output created by\n   the run is removed on exit unless `--keep-headless` is passed.\n   **Complete when:** `status` shows `PLAYING` on the `live.m3u8` URL and fetch\n   activity continues while the command runs.\n\n## Pitfalls\n\n- Inbound firewall rules must allow TCP on the selected media server port\n  (default 8124) from the screen, UDP 5353 for mDNS, and SSDP reply traffic\n  arriving from UDP source port 1900 to the search socket's ephemeral port.\n  Opening only inbound destination port 1900 does not cover those replies.\n- On NixOS, arrange the relevant allowed TCP\u002FUDP ports or a scoped rule for\n  SSDP replies; this script never modifies firewall configuration.\n- Multicast discovery may fail across routed subnets, VPNs, guest Wi-Fi,\n  VLAN boundaries, or wireless client isolation despite unicast reachability.\n- mDNS binds UDP 5353 with address reuse; if the local responder prevents\n  binding or joining the group, discovery warns and still attempts SSDP.\n- A larger `--timeout` gives replies more time. Each network operation has\n  its own wait; discover performs one SSDP pass then one raw mDNS pass.\n  Description fetches are capped at two seconds each.\n- Some TVs only accept `video\u002Fmp4`; the server chooses Content-Type from the\n  extension and does not inspect or convert codecs.\n- TVs sometimes require H.264 video plus AAC audio inside an MP4 container.\n  Renaming an incompatible file to `.mp4` does not convert it.\n- DLNA is not mirroring. It fetches a static file\u002FURL and exposes playback control.\n- Classic Miracast needs Wi-Fi Direct hardware and a separate sender stack.\n  MICE needs `_display._tcp` advertising, GNOME Network Displays or another\n  helper, and appropriate firewall access; most TVs do not advertise MICE.\n- `monitor` defaults to tuned HLS (1 s target, 3-segment playlist), because\n  Samsung UN65TU7000-series sets disconnected progressive TS with both\n  `video\u002Fmpeg` and `video\u002Fmp2t`. Expect roughly 3–4 s of structural HLS delay;\n  absolute display latency requires visual measurement. `--segment 0.5` still\n  yields ~1 s segments with the fixed 30-frame GOP at 30 fps. Measured on a\n  wired TU7000: first video ≈4 s after Play with these defaults.\n- Progressive TS supports only one GET viewer; another GET receives HTTP 409.\n  HEAD probes do not consume the viewer slot. It skips ffmpeg and segmentation,\n  but renderer buffering and compatibility vary. Do not select it just because\n  SOAP Play succeeds: require PLAYING plus sustained byte flow for at least 60 s.\n- `--verbose` logs request timing, TS byte counters, HLS bytes and publication\n  timestamps. Playlist and stream responses use `no-store`; live reads are at\n  most 64 KiB. The stream is video-only; HLS requires wf-recorder plus ffmpeg.\n- `wake` requires Wake-on-LAN enabled on the screen; without a fresh ARP entry\n  pass the MAC address. The magic packet goes to the broadcast address and,\n  when known, the IP.\n- Some renderers reject `Seek`; expect an error when the service lacks support.\n- The HLS server serves only the playlist and its segments (fixed name whitelist);\n  nothing else in the directory is exposed.\n- AirPlay\u002FRAOP\u002FGoogle Cast\u002FSamsung mDNS records are discovery hints only.\n  This script implements UPnP SOAP control, not those proprietary protocols.\n- The local servers are unauthenticated and bind to the advertised LAN address;\n  `play` and `monitor` additionally serve only the target screen's IP by default\n  (other hosts receive HTTP 403; override deliberately with `--allow-any-client`).\n  Keep them on a trusted network.\n- `monitor` streams the captured desktop output to the screen while it runs:\n  treat it as sensitive screen content and stop the command when done. A\n  headless output created by that run is removed on exit unless `--keep-headless`\n  is passed.\n- A server URL is useful only while the casting process is alive.\n  When duration expires, later seeking or fetching may fail unless Stop was sent.\n- `--stop-at-end` applies to locally served files. Direct URL playback has\n  no local lifetime timer; use the separate `stop` command when needed.\n- Single byte ranges, including suffix ranges, are supported. Multiple ranges\n  and unsatisfiable ranges receive HTTP 416.\n- Renderers without RenderingControl cannot provide volume operations.\n  Some vendor APIs offer identification without an AVTransport service.\n- Errors are concise and go to stderr; JSON success data goes to stdout.\n  Exit 0 means success, 2 means not-found\u002Ftimeout, and 1 means another error.\n  Argparse also uses 2 for invalid command syntax.\n\n## Verification\n\nUse `python3 scripts\u002Fremote_display.py status \"$SCREEN_IP\" --json` twice\nwith a few seconds between reads. Confirm TransportState is `PLAYING`,\nCurrentURI matches the printed media URL, and position advances.\nA successful SOAP Play response alone is insufficient proof of visible playback.\nCheck the screen itself for the expected picture\u002Faudio and verify pause,\nstop, seek, volume, and mute through their readback and the screen's behavior.\nFor `monitor`, repeat the two-read check against the `live.m3u8` URL: the screen\nkeeps fetching the playlist and new segments while the pipeline runs (visible with\n`ss -tn`). For `wake`, success is the printed destination plus the screen powering on.\n\nFor offline implementation checks, run:\n\n```sh\npython3 -m py_compile scripts\u002Fremote_display.py\npython3 -m unittest discover -s scripts\u002Ftests -v\n```\n\nThese checks use synthetic fixtures and mocks plus a local HTTP test server;\nthey do not discover or control a real screen.\n\n## Extensions\n\nSee `references\u002Fextensions.md` for possible extensions and provenance: the verified\ndesktop-streaming recipe used by `monitor`, vendor app launching, subtitle\nside-loading, transcoding, and event subscriptions.\n",{"id":5,"name":5,"tags":25,"goals":34,"authors":38,"license":15,"version":41,"category":42,"metadata":43,"platforms":47,"description":7},[26,27,28,29,30,31,32,33],"displays","dlna","upnp","casting","smart-tv","ssdp","mdns","hls",[35,36,37],"Find smart TVs and UPnP\u002FDLNA renderers on a LAN and cast files, URLs, or live streams to them.","Control playback, volume, seeking, and Wake-on-LAN power-on from an agent or terminal.","Mirror a virtual desktop output to a screen over the network via live HLS.",[39,40],"Brahyan Belalcazar (iberi22)","Hermes Agent","0.4.1","tools",{"hermes":44},{"tags":45,"related_skills":46},[26,27,28,29,30,31,32,33],[],[48],"linux","main","688810f2886d212632acf81e532b24e483dd8b98","skills\u002Ftools\u002Fremote-displays","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills","https:\u002F\u002Fgithub.com\u002Fiberi22","Senior WEB Full-Stack","2026-10-12 02:46:21",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add iberi22\u002Fskills --skill remote-displays",{"tool":62,"command":63},"bunx","bunx skills add iberi22\u002Fskills --skill remote-displays",{"tool":65,"command":66},"pnpm","pnpm dlx skills add iberi22\u002Fskills --skill remote-displays","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fremote-displays\u002FSKILL.md",true,[70,74,80,86,90,94,98,102],{"path":71,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":16},"LICENSE","许可证",1085,{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fextensions.md","REFERENCE","参考文档",4135,"https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fremote-displays\u002Freferences\u002Fextensions.md",{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"scripts\u002Fremote_display.py","SCRIPT","脚本",54926,"https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fremote-displays\u002Fscripts\u002Fremote_display.py",{"path":87,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":88,"sourceHtmlUrl":89},"scripts\u002Ftests\u002Ffixtures\u002Fmdns_packet.bin",139,"https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fremote-displays\u002Fscripts\u002Ftests\u002Ffixtures\u002Fmdns_packet.bin",{"path":91,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":92,"sourceHtmlUrl":93},"scripts\u002Ftests\u002Ffixtures\u002FrootDesc.xml",730,"https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fremote-displays\u002Fscripts\u002Ftests\u002Ffixtures\u002FrootDesc.xml",{"path":95,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":96,"sourceHtmlUrl":97},"scripts\u002Ftests\u002Ffixtures\u002Fssdp_response.txt",213,"https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fremote-displays\u002Fscripts\u002Ftests\u002Ffixtures\u002Fssdp_response.txt",{"path":99,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":100,"sourceHtmlUrl":101},"scripts\u002Ftests\u002Ffixtures\u002Ftransport_info.xml",400,"https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fremote-displays\u002Fscripts\u002Ftests\u002Ffixtures\u002Ftransport_info.xml",{"path":103,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":104,"sourceHtmlUrl":105},"scripts\u002Ftests\u002Ftest_remote_display.py",35667,"https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fremote-displays\u002Fscripts\u002Ftests\u002Ftest_remote_display.py",[107,113,120,126,132,138],{"skillNo":108,"name":109,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":20},"01M72TWQEQD46ZC9TRBAABF78P","web-design-guidelines","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fweb-design-guidelines\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":20},"01M72TWMQFTYD08DGXVAXRPPEB","blocked-page-recovery","Use when a fetch fails: 403\u002F429, paywall, WAF, bot wall. Recovers the page via archives and provenance-checked fallbacks.","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fblocked-page-recovery\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":20},"01M72TVQMS3HCTX18C8T97WTQQ","studio-coach","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fstudio-coach\u002FSKILL.md",[],[],{"skillNo":127,"name":128,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":20},"01M72TVNA2PR9RZW0ZAXYP1G6J","src-generator","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fsrc-generator\u002FSKILL.md",[],[],{"skillNo":133,"name":134,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":20},"01M72TVEJHHB6SAT3R3TY9MJKS","sqlite-pro","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fsqlite-pro\u002FSKILL.md",[],[],{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":20},"01M72TVC2EVBHQHCX96VTTYKB8","rigor-evaluator","Use when you need a quick heuristic rigor score (10 criteria, 0-2 each) for the features in a .gitcore\u002Ffeatures.json file, to decide which features are ready to ship.","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Frigor-evaluator\u002FSKILL.md",[],[]]