Skip to content

Instantly share code, notes, and snippets.

@Bioblaze
Forked from Enweave/stream.sh
Created June 26, 2020 05:23
Show Gist options
  • Save Bioblaze/8bad958633d44bb301afeb83c99b4466 to your computer and use it in GitHub Desktop.
Save Bioblaze/8bad958633d44bb301afeb83c99b4466 to your computer and use it in GitHub Desktop.
ffmpeg stream rtsp to youtube via rtmp
# your youtube name/key
KEY="1234-5678-9101-1121"
# your rtsp url
RTSP="rtsp://user:[email protected]:1234/cam/etc"
# youtube rtmp url
YTUBE="rtmp://a.rtmp.youtube.com/live2"
ffmpeg \
-f lavfi -i anullsrc -rtsp_transport tcp -i "${RTSP}" \
-tune zerolatency -vcodec libx264 -pix_fmt + -c:v copy -c:a aac -strict experimental \
-f flv "${YTUBE}/${KEY}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment