For a while, I used an ftp connection to download videos from my geovision camera (used in home surveillance system). But due to often power outages in place where I live, I had constantly repeating problems with an sd card which was used as an intermediary between camera and linux-powered station.
It made me to look for other solutions. I switched to RTSP protocol and now it works flawless. If you're a geovision camera owner and building your own recording station, you might find that draft helpful.
First of all, you have to enable RTSP server in your camera's panel. Then you can for example use VLC to check if it works properly. In my case proper address of stream was:
rtsp://192.168.1.73:8554/CH001.sdp
I used cron to execute script with such line every 10 minutes:
avconv -i rtsp://192.168.1.73:8554/CH001.sdp -c copy -t 610 /mnt/videos/$(date "+%d-%m-%Y-%H:%M:%S").mp4
610 is for time here (610 seconds). Extra 10 seconds are just in case, sometimes first 3-5 seconds are broken. I also configured nginx to
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
doddns | |
This script was made for using a Digital Ocean's droplet as a ddns service. | |
[!] Remember to put your credentials below. | |
[!] Script needs requests library. To install it use pip: pip install requests. | |
Before you'll start, check if it works properly with your config. Simply run it: | |
python doddns.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set root='(hd0,1)' | |
linux /boot/vmlinuz-linux root=/dev/sda1 | |
initrd /boot/initramfs-linux.img | |
boot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find /home/vmail/*/*/.Junk/cur/* -mtime +14 -exec rm {} \; |
dll and lib files from mingw:
rename libraryname.so
to libraryname.dll
lib /machine:i386 /def:libraryname.def
#Arch Linux on Raspberry Pi: RPi as xbmc station#
Let's start from creating xbmc user:
useradd -m -s /bin/bash xbmc
Install necessary packages:
pacman -Syu xorg xorg-xinit xbmc slim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Sample usage: | |
python ytwebm.py https://www.youtube.com/watch?v=dQw4w9WgXcQ -s 01:45 -l 5 | |
This will create webm file from youtube video from 01:45 to 01:50 | |
''' | |
import youtube_dl, subprocess, os, argparse | |
class Downloader: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
url = request.route_url('home', _query={'login': 'invalid'}) | |
return HTTPFound(location=url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python3.3 -m venv app-env | |
cd app-env/ | |
source bin/activate | |
curl -O http://python-distribute.org/distribute_setup.py | |
python distribute_setup.py | |
bin/easy_install pyramid | |
bin/pcreate -s alchemy app | |
cd app | |
python setup.py develop | |
cd .. |
NewerOlder