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
raspivid -t 0 -o - -b 2500000 --profile high --level 4.2 -md 4 -fps 25 -br 60 -fli 50hz -n | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16l e -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -f flv rtmp://[your RTMP server]:[port]/live/streamkey | |
#RASPIVID OPTIONS | |
#-t 0 | |
#run forever. change 0 to a time in milliseconds to only stream for a limited time. | |
#-o - | |
#output to stdout | |
#-b 2500000 | |
#bitrate in bits/s. Shouldn't need to go above 6mbps. | |
#--profile high --level 4.2 |
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
import multiprocessing as mp | |
def worker(num): | |
a = num | |
b=0 | |
#if a becomes smaller than the number we are currently testing, then it is a previously tested number, and so we can discard the test. | |
while a!=1 and a >= num: | |
if a%2==0: | |
a=(a/2) | |
else: |