Neither one nor Many
Software engineering blog about my projects, geometry, visualization and music.
Click the play button to start stream. (Will only work if I have the script running on my raspberry pi though. )
# test chaining raspivid and ffmpeg
raspivid -t 5000 -w 960 -h 540 -fps 25 -b 500000 -vf -o - | ffmpeg -i - -vcodec copy -an -r 25 -f flv test.flv
# stream to tcp endpoint
raspivid -n -t 0 -w 1920 -h 1080 -fps 25 -b 2000000 -o - | ffmpeg -i - -vcodec copy -an -f flv -metadata streamName=video2 tcp://cppse.nl:6666
Port 6666 is the same with the sample that is delivered with crtmpserver (the flvplayback.lua sample).
#!/usr/bin/env python
import time
import RPi.GPIO as GPIO
# Use GPIO numbering
GPIO.setmode(GPIO.BCM)
# Set GPIO for camera LED
CAMLED = 5
# Set GPIO to output
GPIO.setup(CAMLED, GPIO.OUT, initial=False)
# Five iterations with half a second
# between on and off
#for i in range(5):
# GPIO.output(CAMLED,True) # On
# time.sleep(0.5)
# GPIO.output(CAMLED,False) # Off
# time.sleep(0.5)
GPIO.output(CAMLED,False) # Off
Think I got this script from here.
F Mount Lenses
2014-12-29 12:07:48