-
-
Save johnsie/8e3e6bf15bc433a12b0eeb73624794c6 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