view record-app @ 14:92874671d6e1

Add and exclude more directories and files to focus it/limit file size
author IBBoard <dev@ibboard.co.uk>
date Mon, 19 Mar 2018 19:32:37 +0000
parents e85e3470a41e
children
line wrap: on
line source

#! /bin/bash

echo "Does not work yet" >&2
exit 1



MYCMD=$1

if [ -z "$MYCMD" ]; then
	echo "Usage: $0 <app-name>" >&2
	exit 1
fi

INDEX=''
pacmd list-sink-inputs | while read line; do
	if echo "$line" | grep -qE "^index:"; then
		index=$(echo "$line" | cut -f2 -d:)
	elif echo "$line" | grep -qE "^client:.*$MYCMD"; then
		INDEX=$index
	fi
done

if [ -z "$INDEX" ]; then
	echo "Unable to find stream for $MYCMD" >&2
	exit 1
fi


# TODO: Work out null sink stuff
pactl load-module module-null-sink sink_name=steam
pactl move-sink-input $INDEX steam
parec -d steam.monitor | oggenc -b 192 -o steam.ogg --raw -