Advertisement
kayo77

RTSP2YT

Nov 2nd, 2018
416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.37 KB | None | 0 0
  1. #! /bin/bash
  2. YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
  3. SOURCE="rtsp://ip.ip.ip.ip"
  4. KEY="xxxx-xxxx-xxxx-xxxx"
  5. x=1;
  6. until [ $x -ge 10 ]; do
  7. ffmpeg \
  8.     -ar 44100 -ac 2 -f s16le -i /dev/zero -acodec libfdk_aac \
  9.     -i "$SOURCE" \
  10.     -vcodec copy \
  11.     -bufsize 20480k -pix_fmt yuv420p -g 50 \
  12.      -map 0:a -map 1:v \
  13.     -f flv "$YOUTUBE_URL/$KEY"
  14. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement