askrobots / network-computer
Public
Your phone is the terminal. Stream a Linux/Mac desktop to an iPhone over WebRTC through NAT, with audio and input. Open source, single binaries.
Dan Quellhorst
Firefox policy: no WebRTC mDNS (a page using WebRTC made Firefox listen on UDP 5353)
a1d92f3
1 month, 3 weeks ago
History
nc-winshot · 420 bytes · 8 lines
| 1 | #!/bin/sh |
| 2 | # nc-winshot TITLE-PART OUT.png: one window, as it is on screen (for docs and sites) |
| 3 | set -e |
| 4 | id=$(xdotool search --onlyvisible --name "$1" | tail -1) |
| 5 | [ -n "$id" ] || { echo "no window like $1" >&2; exit 1; } |
| 6 | eval "$(xdotool getwindowgeometry --shell "$id")" |
| 7 | ffmpeg -hide_banner -loglevel error -y -f x11grab -video_size ${WIDTH}x${HEIGHT} -i "${DISPLAY:-:0}+$X,$Y" -frames:v 1 "$2" |
| 8 | echo "$2 ${WIDTH}x${HEIGHT}" |