Skip to content

Instantly share code, notes, and snippets.

View auyongcheemeng's full-sized avatar

Chee Meng Au Yong auyongcheemeng

View GitHub Profile
@auyongcheemeng
auyongcheemeng / ffmpeg-stream-from-raspivid.md
Last active April 8, 2018 11:35 — forked from max-mapper/readme.md
ffmpeg youtube live event rtmp stream from raspberry pi with raspi camera (raspivid)
  1. apt-get install ffmpeg - it is now available on raspbian repos (last checked April 2018)
  2. create youtube 'live event'. get rtmp url + session id
  3. run this:
raspivid -o - -t 0 -vf -hf -w 1280 -h 720 -fps 30 -b 3000000 -cfx 128:128 -drc high | 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>

custom additions:
-cfx 128:128: for grayscale video

@auyongcheemeng
auyongcheemeng / cloudflare-update-record.sh
Last active January 17, 2018 01:59 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash
#!/bin/bash
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(dig +short myip.opendns.com @208.67.222.222)