Last active
December 16, 2023 20:48
-
-
Save kyob/3f98082b243472a0b1b5da8897035a52 to your computer and use it in GitHub Desktop.
Stream video from IP camera to youtube via ffmpeg
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
#!/bin/bash | |
RTSP_URL="rtsp://login:password@[ip]:554/cam/realmonitor?channel=1&subtype=1" | |
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" | |
YOUTUBE_KEY="put your key" | |
screen -d -m ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -i ${RTSP_URL} -tune zerolatency -vcodec libx264 -pix_fmt + -c:v copy -c:a mp3 -strict experimental -f flv ${YOUTUBE_URL}/${YOUTUBE_KEY} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment