v4l2-ctl --list-devices
mmal service 16.1 (platform:bcm2835-v4l2):
/dev/video0
HD Pro Webcam C920 (usb-3f980000.usb-1.2):
/dev/video1
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import sys | |
| import argparse | |
| if len(sys.argv) < 3: | |
| print(""" | |
| Usage: | |
| python getlightsource.py "b0 origin 2.113770 1.062783 1.846117 matrix 0.738652 -0.146207 0.658040 0.033019 0.982870 0.181316 -0.673277 -0.112202 0.730827" "b1 origin -2.054813 1.115880 -1.950253 matrix -0.653711 0.083806 -0.752089 0.046773 0.996423 0.070377 0.755297 0.010829 -0.655293" | |
| """) |
| $ echo "2.113770 1.062783 1.846117"|xargs -n 1|sed 's/[0-9]$/f,/' | |
| 2.11377f, | |
| 1.06278f, | |
| 1.84611f, |
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
| #include <cstdlib> | |
| #include <iostream> | |
| #include <sstream> | |
| #include <string> | |
| #include <RF24/RF24.h> | |
| #include <unistd.h> | |
| using namespace std; | |
| // | |
| // Hardware configuration |
| #include <SPI.h> | |
| #include "RF24.h" | |
| /************* USER Configuration *****************************/ | |
| // Hardware configuration | |
| RF24 radio(9, 10); // Set up nRF24L01 radio on SPI bus plus pins 7 & 8 | |
| /***************************************************************/ | |
| const uint64_t pipes[2] = { 0xABCDABCD71LL, 0x544d52687CLL }; // Radio pipe addresses for the 2 nodes to communicate. |
| #include <cstdlib> | |
| #include <iostream> | |
| #include <sstream> | |
| #include <string> | |
| #include <RF24/RF24.h> | |
| #include <unistd.h> | |
| using namespace std; | |
| // | |
| // Hardware configuration |
| #include <SPI.h> | |
| #include "RF24.h" | |
| /************* USER Configuration *****************************/ | |
| // Hardware configuration | |
| RF24 radio(9, 10); // Set up nRF24L01 radio on SPI bus plus pins 7 & 8 | |
| /***************************************************************/ | |
| const uint64_t pipes[2] = { 0xABCDABCD71LL, 0x544d52687CLL }; // Radio pipe addresses for the 2 nodes to communicate. |
| #import <UIKit/UIKit.h> | |
| @interface UILabel (ContentSize) | |
| - (CGSize)contentSize; | |
| @end |