Skip to content

Instantly share code, notes, and snippets.

View nihanthd's full-sized avatar
🏠
Working from home

Nihanth Dara nihanthd

🏠
Working from home
  • Hulu
  • Los Angeles
View GitHub Profile
@max-mapper
max-mapper / readme.md
Last active May 21, 2022 11:02
ffmpeg youtube live event rtmp stream from raspberry pi with raspi camera (raspivid)
  1. compile ffmpeg for arm https://github.com/fiorix/ffmpeg-arm
  2. create youtube 'live event'. get rtmp url + session id
  3. run this:
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

@mickelsonm
mickelsonm / main.go
Last active February 3, 2024 18:48 — forked from manishtpatel/main.go
Golang AES Encryption/Decryption example. See running example: http://play.golang.org/p/5G-IUlYqQV
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
"errors"
"io"
"log"