Kiiro_Yakumo

bashrc ffmpeg command 2

Oct 20th, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. streaming() {
  2. INRES="640x480" # input resolution
  3. OUTRES="640x480"
  4. FPS="30" # target FPS
  5. QUAL="fast" # one of the many FFMPEG preset
  6. #STREAM_KEY="$1"
  7. STREAM_KEY="live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  8. #URL="rtmp://live.justin.tv/app/$STREAM_KEY" #flashver=FMLE/3.0\20(compatible;\20FMSc/1.0)"
  9. URL="rtmp://live.twitch.tv/app/$STREAM_KEY" #flashver=FMLE/3.0\20(compatible;\20FMSc/1.0)"
  10.  
  11. ffmpeg -f v4l2 -s "$INRES" -r "$FPS" -i /dev/video0 \
  12. -f alsa -ac 2 -i hw:2 -vcodec libx264 -crf 30 -preset "$QUAL" -s "640x480" \
  13. -acodec libmp3lame -ab 128k -ar 44100 -threads 0 \
  14. -f flv "$URL"
  15. }
Advertisement
Add Comment
Please, Sign In to add comment