2014-01-25

Bash script for Livestreamer to record twitch stream by schedule

 Install livesreamer from:

http://livestreamer.tanuki.se/en/latest/

Very very thankful for this tool, I search for something like this sense I hooked on StarCraft II!

To use script, just edit configuration part...  It's pretty self explanatory.
In my time zone, all GSL battles going when I'm at work.
This script allows me to record all and watch it when I come back home after work! :) 

I use livesreamer, not only for recording. Sorry, but Twitch page is lagging and I don't need other stuff, only video. And the best experience, in sense of avoiding video lagging or some sort of interrupts, is to stream to file and then watch it!
Also you can start streaming to file and watch from the file right away. Perhaps you should wait 10 or 15 seconds, this way player not going to catch the end of the file!


^^^^^^^^^^^^^^^^^^^^^^^^^^
#! /bin/bash
STREAM_URL="http://www.twitch.tv/gsl"
STREAM_QUALITY="best"
STREAMS_DUMP_DIR="/media/xbmc/Streams/"
STREAM_FILE_NAME="gsl_code_s_"

#                        month day year hour minutes
START_TIMESTAMP=$(date -d '10/04/2014 11:45' +%s)
END_TIMESTAMP=$(date -d '10/04/2014 19:00' +%s)
KILL_TIMESTAMP=$(date -d '10/04/2014 19:01' +%s)

^^^^^^^^^^^^^^^^^^^^^^^^^^

Bash version1




Bash version 2


It runs as a daemon. Just drop a simple text file to "shed" directory.
Text file should look like this:

^^^^^^^^^^^^^^^^^^^^^^^^^^
# twitch link
URL=http://www.twitch.tv/nathanias
#    Year Month Day
DATE=2014.12.23
#    Hours minutes
TIME=07.45
^^^^^^^^^^^^^^^^^^^^^^^^^^


Also set global configurations before start ("bash.conf"):


^^^^^^^^^^^^^^^^^^^^^^^^^^
# stream quality
QUALITY=best
# directory where steams will be saved
DIR=/media/8b58Volume830GiB/Streams/
# stream offline timeout to consider that stream is ended.
# at least one stream file should be created 
# in minutes
OFFLINE_TIMEOUT=20
^^^^^^^^^^^^^^^^^^^^^^^^^^




Extract archive and open terminal in "livestreamer-deamon" directory

$ ./livestreamer-deamon start


I run this on Raspberry-Pi. I can leave it online 24for7 it consumes ~5W of power and make no noise! It's environment friendly and wife approved! :)))

I added this to /etc/rc.local

^^^^^^^^^^^^^^^^^^^^^^^^^^
# livestreamer-deamon
cd /home/pi/wcs/
su pi /home/pi/wcs/livestreamer-deamon.bash start >> /dev/null 2>> /dev/null &
^^^^^^^^^^^^^^^^^^^^^^^^^^



 

Bash version 3


^^^^^^^^^^^^^^^^^^^^^^^^^^
# twitch link
URL=http://www.twitch.tv/nathanias
#    Year Month Day
DATE=2015.04.04
#    Hours minutes
TIME=19.34

#    Continue for ? days and record everything...
DAYS=3
#    log file
LOG=
^^^^^^^^^^^^^^^^^^^^^^^^^^
If days set to zero it will work as before.


Download :

livestreamer-bash


Enjoy!



2014-01-24

Facebook account cannot be deleted




It take me 30 minutes to find whare I can "delete" my facebook account. It says something about the site it self... It's not because of lack of my browsing skills :)
I did that couple years a go. Sense then I never ever even open facebook page, I'm not even talk about trying to log in.
Despite that from time to time they sending me this spam: 




You cloud think that someone else maybe  trying to hack may account , bud it's deleted and also this mail goes as "no replay", and there are no link that you can tell them "I did not try to login! Lave me alone!". So definitely not the case!

Once you try, they will be annoying as TV commercials or sellers that goes to your house, talk a lot, and don't mater what you say, thay know "you need their product"!

It is nice share some stuff on web, bud not the facebook way!