thisisthepastebinuse

WebM guide for retards

Jan 18th, 2016
6,516
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.83 KB | None | 0 0
  1. This is a small guide for making WebMs. Table of contents:
  2.  
  3. 1. Recording software
  4. 2. WebM for Retards
  5. 3. ffmpeg (single pass)
  6. 4. ffmpeg 2 pass
  7. 5. Additional documentation for ffmpeg
  8. 6. GUIs for ffmpeg
  9. 7. Downloading YouTube videos
  10. 8. Tips and some advice
  11.  
  12. ═════════════════════
  13. 1. Recording software
  14. ═════════════════════
  15.  
  16. I recommend using Open Broadcaster Software https://obsproject.com/ or Shadowplay http://www.geforce.com/geforce-experience/shadowplay
  17. For OBS, go to Settings > Encoding and check the option "Nvidia NVENC". It will use both the CPU and the GPU when encoding videos, which is better than the default option, which only uses the CPU.
  18. Other alternatives are Fraps or Dxtory.
  19.  
  20. Read the "Tips and some advice" section for info on how to record footage without wasting your PC's resources.
  21.  
  22. ═══════════════════
  23. 2. WebM for Retards
  24. ═══════════════════
  25.  
  26. You can download WebM for retards from here: https://gitgud.io/nixx/WebMConverter
  27.  
  28. Tutorial*: http://puu.sh/mZMLs/ca56fadeae.webm
  29.  
  30. That method is one of the best if you want a good quality WebM. It's a 2 pass, variable bitrate encoding method.
  31. I highly recommend playing around with ffmpeg and learning what the basic parameters do. The default way the developer intends you to use WebM for Retards gives you horseshit WebMs, but if you use it as a simple GUI for FFmpeg, like the tutorial shows you, you can get good quality WebMs.
  32.  
  33. * The new version of WebM for Retards already has the -b:v parameter, so you don't need to add it yourself, just modify the one that's already there.
  34.  
  35. ═══════════════════════
  36. 3. ffmpeg (single pass)
  37. ═══════════════════════
  38.  
  39. Download any ffmpeg static build from http://ffmpeg.zeranoe.com/builds/
  40. Decompress it wherever you want
  41. Put the mp4 file you want to convert to WebM in the bin folder and rename it "input.mp4"
  42. Shift + right click anywhere in that folder and click on "Open command window here"
  43. Paste this command with the parameters you want:
  44.  
  45. ffmpeg -i input.mp4 -ss START -to END -c:v libvpx -qmin 0 -qmax 30 -vf "scale=-1:480" -threads 4 -an -y output.webm
  46.  
  47. <-ss> and <-to> are the start and end points of your WebM. If you want a WebM from the second 37 of a video to the minute 6, 39 seconds and 123 milliseconds, use <-ss 37 -to 6:39.123>. If you don't want to trim your video, remove the <-ss> and <-to> parameters. You can use only <-ss> if you want to start encoding from a certain part of your video and you want it to encode everything until the end of it or if you're using the <-fs> parameter, which is explained below.
  48.  
  49. <-qmax> determines the quality of your image. Its values can go from 0 to 63. Lower values mean better image quality. Play with this value if your file sizes are too big or if your WebM looks bad.
  50. Forget about <-qmin>. In fact, you can remove it if you want. <-qmax> determines how shitty the shittiest image quality will be and <-qmin> determines how good the best quality image will be. However, ffmpeg is like a normal human being and will go for <-qmax> so it can work less and give you shittier results.
  51.  
  52. <-vf "scale=-1:480"> resizes your video stream. -1:480 means that it resizes your video to 480 vertical pixels and automatically calculates the horizontal pixels it needs in order to preserve the original aspect ratio of the video. Delete this parameter if you don't want to resize your video.
  53. Do us all a favor and DON'T post 1080p WebMs unless you know what you're doing. 720p and 480p are more than enough for most things.
  54.  
  55. <-fs> is not included, but you can add it if you want. <-fs 3M> will limit your webm weight to 3 MB, which is 4chan's limit. It will start encoding from the point defined by <-ss>, and it will stop when it reaches 3 MB. It doesn't make much sense to use this parameter if you're using <-to>, which is why I almost never use it.
  56.  
  57. ════════════════
  58. 4. ffmpeg 2 pass
  59. ════════════════
  60.  
  61. This is the method you'll want to use for most of your WebMs since it's the one that gives you the best quality WebMs. I'm going to assume that you know what all the parameters from the single pass section do and that you have already downloaded ffmpeg.
  62.  
  63. Use these 2 commands with the proper parameters. Paste the second one after the first one is finished.
  64.  
  65. ffmpeg -i input.mp4 -ss START -to END -c:v libvpx -threads 3 -quality good -cpu-used 0 -lag-in-frames 16 -auto-alt-ref 1 -qcomp 1 -b:v 1000K -an -sn -y -f webm -pass 1 NUL
  66. ffmpeg -i input.mp4 -ss START -to END -c:v libvpx -threads 3 -quality good -cpu-used 0 -lag-in-frames 16 -auto-alt-ref 1 -qcomp 1 -b:v 1000K -an -sn -y -f webm -pass 2 output.webm
  67.  
  68. The numerical values themselves need to be adjusted for each webm. Both commands need to be identical except for their last parameters. You can easily predict what bitrate you're going to need in order to get a file of a certain filesize with this formula: FileSize*8/Time
  69. FileSize is in KB and time is in seconds. If I want a 3000 kB WebM which is 15 seconds long, its target bitrate would be 3000*8/15 = 1600 kB. So the parameter we would have to use would be <-b:v 1600K>.
  70. /g/entoomen should use </dev/null> instead of <NUL>.
  71.  
  72. ══════════════════════════════════════
  73. 5. Additional documentation for ffmpeg
  74. ══════════════════════════════════════
  75.  
  76. http://wiki.webmproject.org/ffmpeg
  77. https://trac.ffmpeg.org/wiki/Encode/VP8
  78. https://www.ffmpeg.org/ffmpeg.html
  79. https://www.ffmpeg.org/ffmpeg-codecs.html#libvpx
  80. https://www.webmproject.org/docs/encoder-parameters/
  81. https://wiki.installgentoo.com/index.php/WebM
  82.  
  83. A guide made by an anon for /wsg/:
  84. http://i.imgur.com/5o2yTYc.png
  85. http://4chandata.org/wsg/WebM-Academy-a810990
  86.  
  87. ══════════════════
  88. 6. GUIs for ffmpeg
  89. ══════════════════
  90.  
  91. http://pastebin.com/NXzfdja7
  92. The only thing you'll need if you only want to make basic WebMs for 4chan. Will get updated regularly.
  93.  
  94. XMedia Recode - http://www.xmedia-recode.de/en/index.html
  95.  
  96. FFmpegYAG - https://sourceforge.net/projects/ffmpegyag/
  97.  
  98. Avanti - http://www.avanti.arrozcru.org/
  99.  
  100. http://puu.sh/n4xeJ/22706df742.ods
  101. It's a spreadsheet in .ods format. Open it with LibreOffice and input your parameters in the blue cells. Excel has some errors so I don't recommend using it.
  102.  
  103. ═════════════════════════════
  104. 7. Downloading YouTube videos
  105. ═════════════════════════════
  106.  
  107. If you want to download YouTube videos, I recommend using youtube-dl: https://rg3.github.io/youtube-dl/
  108.  
  109. Download that and extract it wherever you want
  110. Open your command prompt (Windows+R and then type cmd and press enter)
  111. Paste these 2 commands:
  112. cd C:\folder\path\where\youtube-dl.exe\is\located
  113. youtube-dl.exe https://www.youtube.com/ThisIsTheLinkToTheVideoYouWantToDownload
  114.  
  115. And that's it. The program will start downloading the YouTube video. From here on you can trim it, resize it, etc.
  116.  
  117. There are also other alternatives, like
  118. http://en.savefrom.net/
  119.  
  120. ═══════════════════════
  121. 8. Tips and some advice
  122. ═══════════════════════
  123.  
  124. - Bitrate is more important than resolution for a video's quality. Don't upscale your videos, increase the bitrate instead.
  125. - Summarize your content as much as you can. No need to make 2 min WebMs if you can show what you wanted in 10 seconds or less.
  126. - Don't post WebMs that are above 720p unless you know what you're doing. 720p and 480p are more than enough for most things.
  127. - Don't record in 1080p only to downscale it later. Record your screen in 720p or less.
  128. - Don't record at more than 30 fps unless you want to show how good your game looks at higher framerates.
  129. - The more the camera moves, the bigger the file size you're going to get. When recording, try to minimize unnecessary camera movements.
  130. - The more general movement there is on a video, the bigger the file size you're going to get. Even if your camera is standing still, if there are lots of things happening on your screen, the file size is going to increase.
  131. - If the quality is not good enough, lower the resolution. A 720p at 500 kbps video is going to look worse than a 480p at 500 kbps video, even when you upscale the 480p video to 720p.
  132.  
  133. 4chan WebM limits
  134. /wsg/ and /gif/: 4096 KB, 300 seconds (5 min), 2048x2048 pixels, sound allowed
  135. other boards: 3072 KB, 120 seconds (2 min), 2048x2048 pixels, no sound allowed
Add Comment
Please, Sign In to add comment