Closed jedai47 closed 10 months ago
You can do this with the record.sh
script in the tools
directory. You can give it multiple usernames and it will start recording when any of them go live. Note that it won't start recording already in-progress streams, only streams that start after the script was launched.
Alternately, it's really easy to just write a script that does this, something like
#!/bin/bash
USERNAME="${1}"
while :
do
FILENAME="${USERNAME}_$(date -u '+%Y_%m_%d_%H_%M_%S_(%Z)').ts"
twitchpipe --archive "${USERNAME}" > "${FILENAME}"
# Remove file if empty
if [[ ! -s "${FILENAME}" ]]
then
rm "${FILENAME}"
fi
sleep 60
done
Currently if i try to record the stream but it is offline i get the following: 'could not extract playlist: stream is offline' what about adding an option for the application to wait till the stream go live (checks every minute for exemple) and then proceed. thanks for the wonderful tool btw