VideoHelp Forum
+ Reply to Thread
Results 1 to 14 of 14
Thread
  1. i have more questions:

    -What does 2 pass encoding do?

    -and do i need HW acceleration?
    it says:
    -without acceleration
    -nvidea acc.
    -intel acc.

    -and what shall i put in Motion Estimation?
    Hexagonal Search, diamond search, uneven multi hexagonal, or exhaustive Search?

    -and do i need Chroma ME, Trellis, and Cabac?

    -Do i need keyframe boost?
    Quote Quote  
  2. 2-pass encoding is for when you are targeting a precise file size and using variable bit rate (VBR). For example, DVD's are limited to about 4 GB of video and a bitrate maximum of 9 Mb/s. However, if you do the math, 9 Mb/s only allows you to fit about an hour of video on a DVD. A typical movie is 90 minutes. So one strategy is to reduce the bitrate to about 6 Mb/s if using a constant bitrate (CBR). However, that means some scenes will be bitrate starved while others will have more than they need. High motion scenes need the full 9 Mb/s, but you have chopped yourself off at the knees by setting the bitrate to 6 Mb/s. So, one way around this is VBR which recognizes that some scenes don't need a full 9 Mb/s or even 6 Mb/s. 2-pass encoding is the algorithm used where the encoder goes through the video on the first pass to figure out which scenes it can be parsimonious with and which scenes need max bitrate and do all that while targeting an average bitrate (ABR) of 6 MB/s so it fits on your DVD. It is actually a very sophisticated optimization problem but surprisingly accurate when targeting precise file sizes. Nothing worse than spending hours on an encode only to find it doesn't fit on your DVD.

    Now, with all that said, unless I am targeting DVD delivery, I don't mess with 2-pass encoding because it takes too dang long. For things like web delivery, file size targets don't really exist, and it is much better to encode for a target CRF which balances perceived quality against a max bitrate.
    Quote Quote  
  3. thanks, if i make a video for youtube , how much bitrate shall i use ? I tried 600, but the video looked unclear. I used 20.000 and it was more clear
    Last edited by hello0; 27th Jan 2017 at 08:06.
    Quote Quote  
  4. YT will recompress your video and this recompression is beyond your control - from your perspective you can encode/compress video with crf (sane range of crf around 16 - 20), you can use some fast preset to spent less time on compression (however if your uplink is slow you may prefer better but slower compression).
    Quote Quote  
  5. in my settings there is CRF,

    it must be 16-20?

    there where it says Quality 100?

    https://postimg.org/image/qrq0eq5ql/
    Quote Quote  
  6. Originally Posted by hello0 View Post
    in my settings there is CRF,

    it must be 16-20?
    Nope - 16 - 20 seem to be reasonable but you can choose whatever you wish but anything lower than 16 is usually not perceivable especially after YT recompression (YT quality will be around crf=26 or higher).

    Originally Posted by hello0 View Post
    there where it says Quality 100?

    https://postimg.org/image/qrq0eq5ql/
    Quality = 100 mean lossless i.e. crf=0
    Quote Quote  
  7. Is it better to use CRF or just increase the Bitrate (ABR) for a better quality?
    Quote Quote  
  8. Only use ABR when you need realtime encoding -- live streaming, for example.

    2-pass VBR and CRF deliver the same quality when the bitrate is the same (assuming all other settings are the same too). With CRF you know what the quality will be but you don't know what the files size will be. With 2-pass VBR you know what the file size will be but you don't know what the quality will be. CRF has the advantage that it's faster since it works in one pass.

    Note that "quality" here is relative to the source. Encoding at a high quality setting will not turn a low quality source into a high quality video. But it will keep the quality from getting much worse.
    Quote Quote  
  9. i see. For me it is important, that my videos that i upload to YT, have a good quality on youtube
    Quote Quote  
  10. Originally Posted by jagabo View Post
    Only use ABR when you need realtime encoding -- live streaming, for example.
    I would not use ABR even for that, instead, CRF and limit buffers. I was deciding back then what to choose for internet streaming (not YouTube, so this is off topic, just reacting to above comment)
    say, --bitrate 2000 vs. whatever CRF and --vbv-bufsize 2000 --vbv-maxrate 2000
    if CRF is set to almost cut off peaks all the time , CRF 12 for example, comparing to ABR, speed is the same, peaks are the same, we get the same bitrate distribution as ABR, same average, but if there are scenes , like photos or other that would not take even CRF12 to the limit, there are savings as oppose to ABR. That is extreme though, we do not set CRF 12 usually or starving encoder all the time.
    So, more practical, CRF 18 for example, there are huge bitrate savings as a result. And if there is not that much peak cuts, as oppose to ABR then there is less of those slight over the limit bitrates as well.
    Quote Quote  
  11. I will second -crf 18 as the way to go when targeting YouTube, along with these options:
    -pix_fmt yuv420p --colorprim bt709 --transfer bt709 --colormatrix bt709
    Quote Quote  
  12. thanks for the answers.

    Do i need a second program for pix_fmt yuv420p --colorprim bt709 --transfer bt709 --colormatrix bt709?
    Quote Quote  
  13. Sorry, I seem to have posted a mishmash of ffmpeg options (-pix_fmt yuv420p) and x264 options (all the others)
    Anyway - what program are we talking about? I can't tell; your screenshot link is broken.
    Last edited by raffriff42; 28th Jan 2017 at 18:28.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!