Advertisement
MonoS

Usefull batch for LD

Aug 22nd, 2014
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. REM streaming batch to youtube [should also work for twitch, but twitch is shit, so i don't care] on windows [should also work on *nix with some changes]
  2.  
  3. start ffmpeg.exe -f dshow -r 5 -i video="screen-capture-recorder":audio="virtual-audio-capturer" -keyint_min 10 -g 25 -bufsize 300k -maxrate 300k -c:v libx264 -strict -2 -c:a aac -b:a 64k -b:v 300k -preset medium -tune zerolatency -pix_fmt yuv420p -r 5 -f flv "stream.flv"
  4.  
  5. timeout /t 15
  6.  
  7. ffmpeg.exe -r 5 -re -i "stream.flv" -c:a copy -c:v copy -f flv "rtmp://a.rtmp.youtube.com/live2/"
  8. del "stream.flv"
  9.  
  10. pause
  11.  
  12. REM you will need two software: http://sourceforge.net/projects/screencapturer/files/Setup%20Screen%20Capturer%20Recorder%20v0.12.7.exe/download and http://ffmpeg.zeranoe.com/builds/
  13. REM Install the fist one and then put the ffmepg.exe into the same folder of this batch
  14. REM the batch record audio and video, if you don't want the audio remove ":audio="virtual-audio-capturer"" and "-strict -2 -c:a aac -b:a 64k"
  15. REM As you can see there are 3 300k, that is the speed of your connection in kbps [kilo bit per seconds], if you have a faster connection crack this value up [all 3 with the same value] with something conservative [if you have a 1Mbps connection use 800-850, if you don't want audio use the 64kb from the audio into the video]
  16. REM the script record at 5 frame per second, if you want something more or less change the value of -r to something else [less than 3 or more than 30 are useless], also keyint_min should be twice that number and -g 5 times more [for example if you want 10 fps keyint_min should be 20 and -g 50]
  17. REM if you computer is unable to stream at a consistent speed change the -preset to something like [ultrafast, superfast, veryfast, faster, fast] or if your computer is very fast use something like [slow, slower, veryslow], i suggest you to also change the priority of the process in task manager
  18.  
  19. REM you will need the rtmp link for your live stream, you will find this into the live stream page of yt, is the first link in this image "http://abload.de/img/appunti021mj9i.png" so the 3rd line of the script should look like "... -f flv "rtmp://a.rtmp.youtube.com/live2/monos94-6969.w97x-t423-7xbk-5zhr""
  20.  
  21. REM i hope to have explained properly, but i'm not so good, so if you have question fell free to ask :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement