xstream

streaming tool for xorg over udp
git clone git://git.kocotian.pl/xstream.git
Log | Files | Refs

commit d32b2d5e38ca706206d4d21bf6e9566be85ed9bb
Author: kocotian <kocotian@kocotian.pl>
Date:   Fri, 12 Mar 2021 14:33:20 +0100

Initial

Diffstat:
Axstream | 37+++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+), 0 deletions(-)

diff --git a/xstream b/xstream @@ -0,0 +1,37 @@ +#!/bin/sh +case $1 in + -*) + case $1 in + -a) + AARGS="-f alsa -i default + -r 30 + -c:v h264 -crf 0 -preset ultrafast -c:a aac" + ;; + -p) + PLAY="1" + ;; + esac + shift 1 + ;; +esac + +IP="${1:-127.0.0.1}" +if [ ! -z "$1" ]; then + shift 1 +fi +PORT="${1:-7468}" +if [ ! -z "$1" ]; then + shift 1 +fi + +if [ $PLAY -eq 1 ]; then + ffplay -f mpegts "udp://$IP:$PORT" +else + ffmpeg -y \ + -f x11grab \ + -framerate 60 \ + -s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \ + -i "$DISPLAY" \ + $AARGS $@ \ + -f mpegts "udp:$IP:$PORT" +fi