Skip to content

Instantly share code, notes, and snippets.

@ZigFisher
Last active January 10, 2019 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZigFisher/a19d189bc0ac318039a397c5b6669a80 to your computer and use it in GitHub Desktop.
Save ZigFisher/a19d189bc0ac318039a397c5b6669a80 to your computer and use it in GitHub Desktop.
#/bin/sh
#
# Stream RTSP to YouTube
#INPUT="rtsp://172.17.32.103:554/av0_1"
INPUT="rtsp://172.28.159.102/user=admin&password=bzz&channel=1&stream=0.sdp?real_stream"
TOKEN="dk5m-8qej-8ebf-9q58"
ffmpeg -f lavfi \
-i anullsrc \
-rtsp_transport tcp \
-i ${INPUT} \
-tune zerolatency \
-vcodec mpeg4 \
-pix_fmt + \
-c:v copy \
-c:a aac -strict -2 \
-r 15 -g 30 \
-f flv rtmp://a.rtmp.youtube.com/live2/${TOKEN}
# -c:a copy \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment