Average bitrate, 2-pass - reuse data from first pass

Archive of historical feature requests.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
Sprinterdriver
Posts: 36
Joined: Wed Jun 05, 2013 9:43 pm

Average bitrate, 2-pass - reuse data from first pass

Post by Sprinterdriver »

Hi.

When running conversion of a file first time, we can say it takes one hour to complete. When the resulting file is finished I mayor may not be satisfied with the result (mainly because I sat the bitrate too low).
When running next time, where only output file name and bitrate is changed, HB still runs through two passes and the process takes another long hour to complete.

Therefore I have an idea. How about to store the data from first pass in the temp folder, so that when next time HB runs with exact same settings, it reuses data from last time, and consequently uses half time to complete the process?
mduell
Veteran User
Posts: 8205
Joined: Sat Apr 21, 2007 8:54 pm

Re: Average bitrate, 2-pass - reuse data from first pass

Post by mduell »

The better idea is to use constant quality encoding, which will vary the bitrate to hit your quality target. It gives the same compression efficiency as a 2 pass bitrate target in 1 pass; the "cost" is the output filesize is unpredictable.

Try it out at a few different quality settings, maybe RF 18/20/22 for DVD sources or RF 20/22/24 for Bluray sources to see what quality value makes you happy. Enjoy every encode being twice as fast and consistent quality.
Sprinterdriver
Posts: 36
Joined: Wed Jun 05, 2013 9:43 pm

Re: Average bitrate, 2-pass - reuse data from first pass

Post by Sprinterdriver »

Thanks.

Yes, I assumed having the idea about average bitrate is so much better is just a misunderstanding.

I did some test on a 1280x720 recording wher I do a quick turn with my hand, the hand fill about half of the frame size. It actually turns out that a output video encoded as 1800 kbps average bitrate (two pass) has substantial more visible artifacts compared to an output of a video encoded as RF=23. This observation despite that the average bitrate video have a file size of 66 MB and the RF23 video have a file size of 50 MB.

As I told, the only time I can see the difference is where I turn my hand (close to the camera) fast.

How can it be that a video encoded with RF23 looks better (my personal opinion) than average bitrate 1800 (other than that, every settings is equal), yet taking less space on the hard drive?
mduell
Veteran User
Posts: 8205
Joined: Sat Apr 21, 2007 8:54 pm

Re: Average bitrate, 2-pass - reuse data from first pass

Post by mduell »

If the CRF encode ends up about the same size as a 2pass ABR encode, it should be about the same quality.

Post both encoding logs so we can see if any other settings changed.
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: Average bitrate, 2-pass - reuse data from first pass

Post by Smithcraft »

Or because you are putting bits where they are being wasted as excess, and you are starving bits where they are needed all to have an average bit rate.

SC
Sprinterdriver
Posts: 36
Joined: Wed Jun 05, 2013 9:43 pm

Re: Average bitrate, 2-pass - reuse data from first pass

Post by Sprinterdriver »

Smithcraft wrote:Or because you are putting bits where they are being wasted as excess, and you are starving bits where they are needed all to have an average bit rate.

SC
HI. I always thaugt that the idea behind 2-pass average encoding is that the bits should be distributing in a way to avoid waste and starving. Should I expect starving and wasting of bits when encoding 2-pass average bitrate?

[edit]
Unfortunately I've deleted the video files encoded with lowest bitrate, and I have a bunch of log files and I cannot pick two for comparison. I can try to encode another time, but not now, since it takes time to complete.

Thanks.
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: Average bitrate, 2-pass - reuse data from first pass

Post by Smithcraft »

If bits are taken away in the first pass, they can't be restored in the second pass. Constant Quality may provide the same compression efficiency as two pass, but it's smarter at determining the bit rate based on the quality that you want it encode, than you are with guessing what the bit rate should be. If you guess too low, you've starved the bits for both whole encodes. If you guess too high, you've wasted bits for both encodes. If you pick a CQ that is good for you, you should never have to worry about bit rates.

SC
Sprinterdriver
Posts: 36
Joined: Wed Jun 05, 2013 9:43 pm

Re: Average bitrate, 2-pass - reuse data from first pass

Post by Sprinterdriver »

Ok, thanks. Then it's me having misunderstood the concept about 2-pass vbr, and what "2-pass" actually does.
I will not use vbr any more from what I've learn now.
mduell
Veteran User
Posts: 8205
Joined: Sat Apr 21, 2007 8:54 pm

Re: Average bitrate, 2-pass - reuse data from first pass

Post by mduell »

Smithcraft wrote:If bits are taken away in the first pass, they can't be restored in the second pass.
Sure it can; otherwise it would miss the target bitrate every time it added any bits anywhere.
Post Reply