television

a simple LAN/WLAN desktop public broadcasting service
git clone http://git.permacomputing.net/repos/television.git # read-only access
Log | Files | Refs | README

commit 5e7253086f28e01d643d91b5ee937e441ae22717
parent a949b3771b338c4deafe907205c695cbb50c5777
Author: ugrnm <ultrageranium@bleu255.com>
Date:   Wed,  9 Oct 2024 23:14:23 +0200

more examples

Diffstat:
MREADME | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------
1 file changed, 54 insertions(+), 26 deletions(-)

diff --git a/README b/README @@ -7,28 +7,27 @@ A simple LAN/WLAN screen public http broadcasting service. motivation ---------- -I've been in situation of giving lectures or workshops where there is no -screen or projector, or... no cable. The usual workaround that I've seen -friends and colleagues use is to have everyone join jitsi/zoom/bbb/etc and -do the screen sharing there. This works but feels like a grotesque variation -of the "a multinational corporation's service as the easiest way of copying -files between two nearby devices" entry from the crappy everyday tech bingo. - -So here is a reponse with television, a simple binary that takes screenshots -of your desktop at regular intervals and serves the result over http in an +I've been in situations of giving a lecture or a workshop where there was no +screen or projector available, or... No cable. The usual workaround that I've +seen friends and colleagues use is to have everyone join jitsi/zoom/bbb/etc and +do the screen sharing there. This works but feels like a grotesque variation of +the "a multinational corporation's service as the easiest way of copying files +between two nearby devices" entry from the crappy everyday tech bingo. + +So here is a response with television, a simple binary that takes screenshots +of your desktop at regular intervals and serves the result over http on an amazingly well formatted html page that can be accessed by everyone over -LAN/WLAN with their browser. It's *not* a video stream, it's really 1fps style -screensharing which is plenty enough for slides, GUI/TUI/CLI action, etc. +LAN/WLAN with their browser. It's *not* a video stream, it's really a 1fps +style screensharing web thing which is plenty enough for slides, GUI/TUI/CLI +action, etc. -Of course I hear you say, "OK but then we have all these extra screens now". +Of course I hear you say, "OK but then we have all these extra screens now!". Well true, but think about the new creative setups you can come up with, not everyone needs to have their own screen ffs! Take that as an opportunity to -completely rearrange the room. You can do it, I have faith in you. +completely rearrange the room. Make small groups, I don't know. You can do it, +I have faith in you. -just start your television program and tell everyone to join -http://your.local.ip.address:8888 - -firefox, chrome, chromium, edge: works great +firefox, chrome, chromium, edge: works great (desktop and mobile) safari: does not work at all, *boooo* *throws stuff at safari* @@ -57,9 +56,9 @@ television [options] By default, television will make a new screenshot every 2 seconds. This will work everywhere but is quite wasteful, when -idle is used screnshots are made only when user activity is detected. As a bonus, - it means that the clients will make use of the last cached image when + it means that the clients will reuse of the last cached image when there is no activity, therefore reducing drastically the network - traffic. + traffic too! -port http port number (default 8888) @@ -68,24 +67,43 @@ television [options] By default, television relies on kbinani/screenshot for taking a screenshot and pixiv/go-libjpeg for generating a jpg. This should work everywhere, however there can be more effective and efficient - ways to take the screenshot (see example), or it could be interesting + ways to take the screenshot (see examples), or it could be interesting to process the image before serving it. With -snap the whole mechanism for taking the screenshot, saving it as jpeg and placing it in the www folder is skipped and will be replace by your very own (TM) - shell oneliner, assuming you have a working sh. Have fun. + shell oneliner, assuming you have a working sh. Have fun. You deserve + it. -www www directory (default "./www") By default, television will look for the www folder in the same folder from which television is executed, this is far from ideal. - I'm sure you have better ideas. I will suggest one in the example + I'm sure you have better ideas. I will suggest one in the examples section. -example -------- +examples +-------- -./television \ +./television + +What does this do? + +It just werks. Just run it like this from the git folder (after building it), +and ask everyone to join http://your.local.ip.address:8888 + +--- + +./television -port 666 + +What does this do? + +-port 666 Somehow you insisted to serve the result on + http://your.local.ip.address:666. + +--- + +television \ -snap "scrot /tmp/www/tv.tmp.jpg && mv /tmp/www/tv.tmp.jpg /tmp/www/tv.jpg" \ -www /tmp/www \ -idle @@ -101,6 +119,16 @@ What does this do? because this could save a lot of disk write access. -idle takes a screenshots only when user activity is detected, - namely keyboard input or mouse movement. + namely keyboard input or mouse movement. Shh. Don't move. + See. Nothing happens. +--- + +./television \ + -snap "import \ + -colors 2 -dither FloydSteinberg -window root www/tv.tmp.jpg \ + && mv www/tv.tmp.jpg www/tv.jpg" + +What does this do? +-snap "import etc" this is now a lowtechmag presentation <3