commit bebcdb481c4980c9b6469a080b5f4361a3929c70 from: Oliver Lowe date: Tue Jun 11 03:17:52 2024 UTC add xstream commit - fd79aa766e936d1767d6fd61fa62e448f1de1bc2 commit + bebcdb481c4980c9b6469a080b5f4361a3929c70 blob - 45c7ae7289d6bfd73a4c90820152eacd6a189189 blob + a1be4d332d42e23347d20b56672911e56fb1d11b --- README +++ README @@ -7,6 +7,6 @@ The following commands are provided: hits - count web traffic hlsget - download the contents of a HLS playlist jsfmt - format javascript source code -knocknocauth - create and close knocknoc sessions lemmyverse - find lemmy communities webpaste - create a web paste on webpaste.olowe.co +xstream - stream X display over the network blob - /dev/null blob + b357384f560f75aec85957274eeb496cf4751f2a (mode 755) --- /dev/null +++ bin/xstream @@ -0,0 +1,13 @@ +#!/bin/sh + +usage='usage: xstream addr' + +if test $# -ne 1 +then + echo $usage + exit 127 +fi + +addr=$1 +ffmpeg -hide_banner -f x11grab -i $DISPLAY -r 25 \ + -f mpegts -c:v mpeg2video -b:v 3000k udp://$addr blob - /dev/null blob + a6f6770aa8408c4a5176ec3fdde4735254fe596d (mode 644) --- /dev/null +++ man/xstream.1 @@ -0,0 +1,39 @@ +.Dd +.Dt XSTREAM 1 +.Sh NAME +.Nm xstream +.Nd stream X display over the network +.Sh SYNOPSIS +.Nm +.Ar address +.Sh DESCRIPTION +.Nm +captures the primary +.Xr X 7 +display from +.Ev DISPLAY +and sends encoded video to +.Ar address +via MPEG-TS in UDP. +.Ar address +must be provided in +.Ar host:port +format. +.Pp +Video is encoded with MPEG-2 at a bitrate of 3000kbps. +This is to minimise the use of system resources +on machines with older processors +and on systems with no hardware video encoding support. +To customise these settings, +study the +.Nm +script and use +.Xr ffmpeg 1 +directly. +.Sh EXIT STATUS +.Ex +.Sh EXAMPLE +Send video to live.olowe.co port 6969: +.Dl xstream live.olowe.co:6969 +.Sh SEE ALSO +.Xr ffmpeg 1