Constant vs variable frame rate

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
jnyberg
Posts: 30
Joined: Sun Mar 22, 2009 2:01 pm

Constant vs variable frame rate

Post by jnyberg »

Hi,

I am ripping my blu-ray's (and some PAL dvd's) using the high profile preset. Playing them back on Plex Home Theater on my Samsung TV. My question is, the high preset has VFR checked as default; aren't blu-ray's encoded in 24p throughout, meaning that they are constant frame rate? Is there any reason for me not to choose CFR? Plex Home Theater has a function where it changes the display frame rate automatically based on the video source. I have noticed that for some blu-ray's i ripped using VFR, the automatic swtiching of frame rates in PHT keeps jumping back and forth from 24p to 60p which is quite annoying. I was thinking that choosing CFR in handbrake would solve this issue.

Thanks.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: Constant vs variable frame rate

Post by JohnAStebbins »

You should be safe using CFR for most BD sources.

The real problem sources that VFR helps most are NTSC DVD because the DVD spec has no real 24fps support. They use tricks like telecine to convert 24fps to 30fps. And often DVDs will be a mix of film or CGI animation (24fps) and video (30fps).

You will sometimes find PAL DVDs that are a transfer of an NTSC DVD that was already telecined. These are a nightmare and there is almost no way to make them play completely smooth. But most of the time 24fps sources will just be sped up a fraction to make them 25fps for PAL. So for PAL DVD, CFR will also be ok for many sources.
jnyberg
Posts: 30
Joined: Sun Mar 22, 2009 2:01 pm

Re: Constant vs variable frame rate

Post by jnyberg »

Thanks for the explanation. However, if I use same as source with vfr, shouldn't it then anyway have a constant frame rate throughout the file since the source video is constant? Why would handbrake output a variable frame rate if the source doesn't have it?
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: Constant vs variable frame rate

Post by JohnAStebbins »

"Variable framerate" isn't just a matter of whether every frame is equal distance from each other in time. There are flags in the elementary stream that tells a decoder to expect variable framerate. When you choose the VFR option in HandBrake, these flags get set, even when all frames have the same duration.

Also, in almost all sources (including BD), there are occasional discontinuities in the timestamps that can cause HandBrake to output a slightly short or long frame when in VFR mode. BDs are often composed of multiple clips and these discontinuities occur at clip transitions. DVDs can have discontinuities pretty much anywhere they like.
jnyberg
Posts: 30
Joined: Sun Mar 22, 2009 2:01 pm

Re: Constant vs variable frame rate

Post by jnyberg »

I see, so am I correct in saying that using VFR actually is more accurate than CFR, even with blu-ray sources that "officially" (or mainly) are 24p, since there are a few instances when the actual frame rate fluctuates?
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: Constant vs variable frame rate

Post by JohnAStebbins »

Yes. That is why it is the default mode in HandBrake.
jnyberg
Posts: 30
Joined: Sun Mar 22, 2009 2:01 pm

Re: Constant vs variable frame rate

Post by jnyberg »

Got it. Thanks!
kpflugshaupt
Novice
Posts: 63
Joined: Sat Feb 06, 2010 8:00 pm

Re: Constant vs variable frame rate

Post by kpflugshaupt »

[To the moderator(s)]

Can this be made into a persistent thread, maybe copied into a FAQ somewhere?
It's the best VFR/CFR explanation I've come across ever. Concise, clear, yet comprehensive.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: Constant vs variable frame rate

Post by JohnAStebbins »

Our wiki page could use some touch-ups. But VFR is already explained there https://trac.handbrake.fr/wiki/VariableFrameRate
Post Reply