To be safe, always 2 Pass render?

Rich Parry wrote on 3/30/2013, 12:07 AM
This video snippet was created using a 1 pass render in Sony VP12 (486). This render setting gives severe pixelation. When the same video is rendered using 2 pass render, there is no pixelation.

https://vimeo.com/62977628

MainConcept .mp4 codec was used for render of this1080P HD video. I haven't tried the Sony .mp4 codec, so not sure if it would do any better.

I was aware that a 2 pass render is "smarter" and gives better results, but didn't expect such unacceptable results for a 1 pass render. I am aware of the additional render time required for a 2 pass render, but that is a small price to pay for better quality.

I'm starting to think that I should just play it safe and render all my projects with 2 pass enabled, comment?

Thanks in advance,
Rich

CPU Intel i9-13900K Raptor Lake

Heat Sink Noctua  NH-D15 chromas, Black

MB ASUS ProArt Z790 Creator WiFi

OS Drive Samsung 990 PRO  NVME M.2 SSD 1TB

Data Drive Samsung 870 EVO SATA 4TB

Backup Drive Samsung 870 EVO SATA 4TB

RAM Corsair Vengeance DDR5 64GB

GPU ASUS NVDIA GeForce GTX 1080 Ti

Case Fractal Torrent Black E-ATX

PSU Corsair HX1000i 80 Plus Platinum

OS MicroSoft Windows 11 Pro

Rich in San Diego, CA

Comments

John_Cline wrote on 3/30/2013, 12:38 AM
What bit rate did you use for the render?
videoITguy wrote on 3/30/2013, 1:40 AM
Suffice it to say , when it comes to low-priced encoders that you are using 2 pass or VBR style rendering has very little to do with quality outcomes. Just get over the concept, it does not apply to your situation.

Render quality at this level, has the most to do with your source, and your final chosen output bit rate, nothing else.
Grazie wrote on 3/30/2013, 3:30 AM
Why would I choose to do 2-Pass?

Cheers

Grazie
deusx wrote on 3/30/2013, 5:57 AM
>>>>>Just get over the concept, it does not apply to your situation.<<<<

How does it not apply to his situation when he clearly sees a huge difference?

Same footage rendered at ( presumably ) same bit rate, the only difference being 2 pass and 1 pass encode.
Grazie wrote on 3/30/2013, 6:10 AM
+ 1 deusx

And again, and innocently asking here, why would I do 2 pass?

G

PeterDuke wrote on 3/30/2013, 6:23 AM
"I haven't tried the Sony .mp4 codec, so not sure if it would do any better."

The Sony AVC encoder only gives you the option of fixed bit rate, single pass.

You have nothing to lose from two pass rendering except double encoding time. If that is not a problem, then go for it. You should get better quality, even if nobody can see it.

TeetimeNC wrote on 3/30/2013, 6:27 AM
I only do a two pass when there is a need for a given quality in the smallest possible file size. The first pass analyzes the video, the second pass actually does the rendering and maximizes the quality:size ratio by lowering the bit rate for less intense sections and raising it for the more intense sections. So variable bit rate should increase quality for a given file size.

/jerry
farss wrote on 3/30/2013, 6:43 AM
"Why would I choose to do 2-Pass?"

The obvious; To get a better result.

Perhaps you meant "When should I choose to do 2-Pass?" ?

If so then there's no simple answer.
2-Pass should never yield a worse outcome than 1-pass however it takes more time.
Depending on the content and bandwidth contraint it may yield no visible advantage, the answer becomes subjective. If you think 1-pass looks unacceptable then try 2-Pass.
Alternatively if you don't care that much about how long the encoding process takes always use 2-Pass.

The above I think only applies well to simple codecs such as mpeg-2, with H.264 there's fiurther complications and tradesoffs. If that wasn't bad enough, H.265 is just around the corner.

Bob.
Grazie wrote on 3/30/2013, 6:50 AM
Bob, you really take the cookie!!! I'm asking "why", and apart from stating the bleeding obvious you come all "when should I .... " give me a break ....

G
ushere wrote on 3/30/2013, 8:03 AM
+1 jerry
musicvid10 wrote on 3/30/2013, 9:44 AM
CRF in x264 (Handbrake) is as fast as single pass, and better results than 2-pass VBR in Mainconcept. Motion prediction is better, as is motion detail, with no hard cap on the peak bitrate. If using two pass, one must make sensible choices for min, avg, and max bitrates. The default minimum bitrate in Vegas MC is ridiculously low.

If there is no or little motion (talking head or slideshow for instance), there is no need for 2-pass. Interframe compression (VBR) is really at its best In this situation; CBR would be big time overkill.
Former user wrote on 3/30/2013, 10:02 AM
Fro my understanding of 1 pass vs 2 pass, you will normally get better quality in 2 pass, but in longer programs, the quality diffence will be more apparent.

1 pass is similar to doing it on the fly, it does not anticipate what is coming up in the video, 2 pass analyzes the whole video, thus allowing for motion prediction and reaching a closer average bitrate. Sometimes resulting in a smaller overall file with better quality encoding.

As to "why" you would do it, in order to get a better overall quality encoding. As videoITguy points out, with short videos and with the prosumer quality encoders that are included with programs like Vegas and Premiere, the overall quality may not be discernable. But I have found less artifacting on transitions when I use 2 pass.

Dave T2
Peter Riding wrote on 3/30/2013, 10:03 AM
If there is no or little motion (talking head for instance), there is no need for 2-pass.

For my MP4 1920x1080 files I default to 2-pass. This is because most of my shows include a number of stills and recognisable detail such as brickwork and roof tiles are noticeably better with 2-pass than with 1-pass even though said detail is usually in the background rather than being the actual subject. Can take 9x the show time to render but hey :- ( Just run it overnight.

For DVD I default to CBR 8,000 (and do separate audio). This is to get a faster render time but of course results in a larger size than might otherwise be the case with VBR 2-pass.

I use dual layer discs if needs be. Most of my shows are 1 to 2 hours. The VBR MP4s are at 14 high :10 average with the longer ones coming in at around 8Gb.

Pete
musicvid10 wrote on 3/30/2013, 10:30 AM
Stationary detail (slideshow w/o fades, pan/zooms or dissolves) "should" not be affected by either 1-pass or 2-pass, given a healthy target bitrate and decent luminance levels. Paradoxically, that target will never be met except at I-frames. 250 Kbps ABR is not an uncommon outcome in this scenario.

"

Keeping in mind that smart min, avg, max bitrate choices are the most important consideration, here is my conservative, oversimple chart using motion vs. detail as the axes.



The problem with using 8 Mbps CBR on a DVD with adequate space, is that one is robbed of an additional 1.5 Mbps headroom during motion bursts. An ultra high quality DVD could be done at 6 min, 8 avg, 9.5 max Mbps 2-pass, and retain all the headroom and playability on most hardware. File size would be theoretically the same as 8 Mbps CBR.

I still highly recommend CRF in Handbrake for rendering MP4/AVC. Jerry ran some low bitrate tests here:
http://www.jazzythedog.com/testing/DNxHD/HD-Guide.aspx#LBR
~ and here ~
http://www.jazzythedog.com/testing/LowBitRate.htm


Laurence wrote on 3/30/2013, 12:01 PM
Another vote here for the constant quality mode in Handbrake. Extremely high quality at relatively tiny bitrates, done in a quick single pass. It has been ages since I've used anything else.
larry-peter wrote on 3/30/2013, 12:59 PM
Grazie, without getting too philosophical, I'm not sure I can answer why YOU would choose 2 pass, but here's why I choose 2 pass on mpeg2 encoding:

I'm not sure how Vegas estimates motion on a 1-pass VBR encode - maybe preview RAM settings, which opens up a big can of worms given the current state of Vegas - but it's not good. I keep an old, cranky DVD player just to QC for older players and many times I will see playback stutter on a 1-pass VBR encode if I use a high max bitrate. I don't see this on 2-pass encoding, plus dissolves and transitions look much better. Not having used Handbrake, can't comment on that, but I may give it a try.

My mp4 encodes are almost all for broadcast and stations ask for high bitrate CBR, so I almost never use VBR on mp4s.

Larry
Rich Parry wrote on 3/30/2013, 3:56 PM
Thanks to all that replied. I should have mentioned that my render settings with MainConcept .mp4 codec are 1920x1080P 29.97 fps, VBR with Maximum bit rate 20Mbps and Average bit rate 10 Mbps.

Someone in the thread nailed the cause of my pixelation, it is during a “fade-in”. The video is a simple slideshow of images, but when a fade-in is added I am essentially adding animation so it is more like a video and that is when I noticed the horrible pixelation. If I remove the “fade-in” there is no pixelation.

Thought I would confirm that a 1 pass vs. a 2 pass render results in just about exactly twice the render time. Also found the filesize of 2 pass render file about 4% smaller (653MB vs. 633MB). The bit rate for the 2 pass render was about 3% smaller (10.3 Mbps vs. 10.0). So the only downside of a 2 pass render is render time.

Judging from everyone’s excellent responses, I going to play it safe and do 2 pass renders most of the time and revert to 1 pass renders for draft versions. My videos are usually 3-4 minutes in realtime, so render times aren’t a big issue (about 15 minutes).

Thanks to all,
Rich in San Diego

CPU Intel i9-13900K Raptor Lake

Heat Sink Noctua  NH-D15 chromas, Black

MB ASUS ProArt Z790 Creator WiFi

OS Drive Samsung 990 PRO  NVME M.2 SSD 1TB

Data Drive Samsung 870 EVO SATA 4TB

Backup Drive Samsung 870 EVO SATA 4TB

RAM Corsair Vengeance DDR5 64GB

GPU ASUS NVDIA GeForce GTX 1080 Ti

Case Fractal Torrent Black E-ATX

PSU Corsair HX1000i 80 Plus Platinum

OS MicroSoft Windows 11 Pro

Rich in San Diego, CA

Chienworks wrote on 3/30/2013, 4:09 PM
I think Jerry's the only one so far who has touched on the real reason.

Higher bitrate is always better than lower bitrate. This concept FAR outweighs 1 pass vs. 2 pass by millions of light years.

The problem comes though when your output medium isn't big enough to support the high bitrate that you might want to use, so you have to sacrifice and use a lower bitrate. But, maybe not all of the material needs the full bitrate, so some bits can be "stolen" from those parts and given to the parts that would suffer more. This is the concept of variable bit rate.

Now, with 1 pass encoding, the encoder has to guess as each section comes up whether it's a piece that can easily suffer a lower bitrate or needs more to keep it solid. And since these are guesses on the fly the encoder might get it wrong and end up using too many or too few here and there and result in a suboptimal encode. The process is also hampered by the fact that the encoder must also come as close as possible to the desired bitrate so it has to make the calculations very conservatively which means that even at best, it's probably not done as well as it could have.

2 pass encoding lets the encoder pre-determine where these sections are and then calculate the optimal amount of bit-sloshing from one place to another first, THEN does the encode with all this wonderful foreknowledge about how much can be stolen from where and given to other places while still maintaining optimal quality.

So, we have three situations:

A - material fits at desired constant bitrate, so VBR isn't needed, and there's no reason for 2 passes.
B - material doesn't fit so VBR is needed, but we're chincy on time so we wimp out with 1 pass.
C - material doesn't fit so VBR is needed, and we want optimal quality so we use 2 passes.

As far as i can see, the ONLY benefit in situation B is saving time, at the expense of having worse output than we could have had. About the only time this should be considered is on extremely tight deadlines, such as preparing clips for the news which goes on in 20 minutes. And in this situation chances are you're making short clips that don't need VBR anyway, so stick with A.

If you really need VBR, then you probably should be 2-pass encoding.
Peter Riding wrote on 3/30/2013, 4:18 PM
The problem with using 8 Mbps CBR on a DVD with adequate space, is that one is robbed of an additional 1.5 Mbps headroom during motion bursts. An ultra high quality DVD could be done at 6 min, 8 avg, 9.5 max Mbps 2-pass, and retain all the headroom and playability on most hardware. File size would be theoretically the same as 8 Mbps CBR.

Point taken, and interesting as I am largely self-taught so solid technical explanations are very welcome. Thanks. In this scenario I steer clear of the maximum DVD spec. bit rate because all my work is commercial ( I don't do personal work at all ) and I don't want to risk hardware playing issues for the sake of - as it were - a few extra bits.

Just looked at a show which is rendering now. It comprises 7 nested sub-projects 3 of which are entirely stills totaling 127 PNGs. All have transitions so that might explain why I certainly do see a difference between 1 and 2 pass in some "static" detail.

Pete
musicvid10 wrote on 3/31/2013, 11:28 AM
"All have transitions so that might explain why I certainly do see a difference between 1 and 2 pass in some "static" detail."

That is certainly the result of min bitrate that is too low. Mainconcept MPEG-2 has control over this, and I never go below 2,000,000. As I said, the default is ridiculous. Mainconcept AVC, otoh, still has no definable min bitrate afaik, so one must live with what one gets, even if it means raising the avg bitrate to inoptimal levels.

Another reason to use Handbrake. Even in CRF mode, the min- and max- vbv levels can be set via the command line, tailoring the output to your quality, delivery, and playability requirements. The oft-quoted rule of compression is:
"Size, Quality, Speed. Pick two."

Rich Parry wrote on 4/2/2013, 7:33 PM
Thanks again to all that replied, may I ask for a little more insight?

My videos are non-commercial, they are mostly documentaries about trips to National Parks where I shoot video of landscapes and wildlife with my Canon 5DM2. I also do a lot of time lapse work, clouds and astrophotography.

I render for Vimeo and archive the files to give to my children when I am gone, I'm thinking they would like to see where I have been and what I enjoyed doing. I create .MP4 files that they may display on their computers or perhaps on their personal HDTV someday.

I have selected VBR 10Mbps Avg and 20Mbps Max for all of my rendering. I think that is a good compromise for "non-commercial" video. Does 10Mbps seem reasonable given my intended use for now and the future?

Thanks,
Rich in San Diego

CPU Intel i9-13900K Raptor Lake

Heat Sink Noctua  NH-D15 chromas, Black

MB ASUS ProArt Z790 Creator WiFi

OS Drive Samsung 990 PRO  NVME M.2 SSD 1TB

Data Drive Samsung 870 EVO SATA 4TB

Backup Drive Samsung 870 EVO SATA 4TB

RAM Corsair Vengeance DDR5 64GB

GPU ASUS NVDIA GeForce GTX 1080 Ti

Case Fractal Torrent Black E-ATX

PSU Corsair HX1000i 80 Plus Platinum

OS MicroSoft Windows 11 Pro

Rich in San Diego, CA

musicvid10 wrote on 4/2/2013, 7:47 PM
Your bitrates are fine for Vimeo, perhaps a little generous.
The problem of not having minimum bitrate control often shows up after reprocessing by Vimeo or Youtube. If you're using Mainconcept, be sure to check "progressive download" to improve processing time.

You'll find more pointers here. Suggest you compare both the "Good" and "Better" methods and see if the extra effort is worth it for your Vimeo uploads.

https://vimeo.com/24640614