#Unix Toolbox
##Unix Toolbox revision 14.4
Error reports and comments are m
#Unix Toolbox
##Unix Toolbox revision 14.4
raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<SESSION>
you can tweak -b and -fps to your liking. the settings above work well for 1080p. by not specifying width or height we get the full 1920x1080 resolution from the raspi camera
| # -*- coding: utf-8 -*- | |
| """ | |
| Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic | |
| Made available under GNU GENERAL PUBLIC LICENSE | |
| # Modified Python I2C library for Raspberry Pi | |
| # as found on http://www.recantha.co.uk/blog/?p=4849 | |
| # Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library | |
| # added bits and pieces from various sources | |
| # By DenisFromHR (Denis Pleic) |
Just wanted a quick start guide for myself so that I wouldn't have to keep rooting through Google to remember all this stuff. Hopefully it helps other people.
If you had other ideas or suggestions please leave a comment.
The first time I bought a Pi I was enormously frustrated with myself because I didn't own all of this stuff. Kept having to order things off of Amazon and wait to get started... very irritating. This is all good stuff to have laying around anyway:
| #! /usr/bin/python | |
| # Dispatch - synchronize two folders | |
| import os | |
| import filecmp | |
| import shutil | |
| from stat import * | |
| class Dispatch: | |
| ''' This class represents a synchronization object ''' |
rbackup is a lightweight, rsync-powered backup utility that creates time-stamped backups.
It can save backups to your local filesystem (probably an attached USB device) or to a remote host.
Backups are saved in time-stamped directories. Backups are cheap on storage, because hard-links are used for files that haven't changed between backups.
| import logging | |
| import socket | |
| log = logging.getLogger('udp_server') | |
| def udp_server(host='127.0.0.1', port=1234): | |
| s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
| s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) |