Why does the handbrake log show VFR for DVDs?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
smu johnson
Posts: 5
Joined: Mon May 02, 2022 5:03 am

Why does the handbrake log show VFR for DVDs?

Post by smu johnson »

Description of problem or question:

Hi. I'm unsure as to why the Handbrake log is showing different min and max framerates for an x264 encode from a DVD source (like actual movie I bought, Terminator 3, chapter 11). Here are some relevant log lines:

[21:53:36] reader: end of chapter 11 (media 11) reached at media chapter 12
[21:53:36] reader: done. 1 scr changes
[21:53:36] 167.160019s: Film -> Video
[21:53:53] work: average encoding speed for job is 6.897019 fps
[21:53:53] comb detect: heavy 28 | light 103 | uncombed 3876 | total 4007
[21:53:53] decomb: deinterlaced 28 | blended 103 | unfiltered 3876 | total 4007
[21:53:53] vfr: 4007 frames output, 0 dropped and 0 duped for CFR/PFR
[21:53:53] vfr: lost time: 0 (0 frames)
[21:53:53] vfr: gained time: 0 (0 frames) (0 not accounted for)
[21:53:53] ac3-decoder done: 5222 frames, 0 decoder errors
[21:53:53] mpeg2video-decoder done: 4007 frames, 0 decoder errors
[21:53:53] sync: got 4007 frames, 4002 expected
[21:53:53] sync: framerate min 23.976 fps, max 29.970 fps, avg 23.978 fps

Can someone say definitively whether or not DVDs you buy from stores can have variable frame rates within the same title? This is very confusing to me as I assumed DVDs use CFR.

The reason I'm curious is because I don't know if I should be selecting VFR "Same as source" or CFR when doing encodes from DVDs. Even if I specify VFR in Handbrake, MediaInfo says the framerate is "Constant". To me neither of these two things make any sense.

Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS

Any idea what's going on? Thanks in advance.

Steps to reproduce the problem (If Applicable):

Buy Terminator 3 on DVD, and encode chapter 11.


HandBrake version (e.g., 1.0.0):

1.5.1


Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):

Windows 11 21H2


HandBrake Activity Log ***required*** (see How-to get an activity log)

HandBrake 1.5.1 (2022011000)
OS: Microsoft Windows NT 10.0.22000.0
CPU: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
Ram: 8051 MB,
GPU Information:
Intel(R) HD Graphics 520 - 20.19.15.4474
Screen: 1366x768
Temp Dir: C:\Users\sjohnson\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake\
Data Dir: C:\Users\sjohnson\AppData\Roaming\HandBrake

-------------------------------------------

# Starting Encode ...

[21:43:57] base preset: Super HQ 480p30 Surround (Modified)
[21:43:58] Remote Process started with Process ID: 3748 using port: 8037. Max Allowed Instances: 1
[21:43:58] Worker: Starting HandBrake Engine ...
[21:43:58] Worker: Starting Web Server on port 8037 ...
[21:43:59] Worker: Disconnected worker monitoring enabled!
[21:43:59] Compile-time hardening features are enabled
Cannot load nvEncodeAPI64.dll
Cannot load nvEncodeAPI64.dll
Cannot load nvEncodeAPI64.dll
Cannot load nvEncodeAPI64.dll
rting libhb thread
[21:43:59] Starting work at: Sun May 01 21:43:59 2022
[21:43:59] 1 job(s) to process
[21:43:59] json job:
{
"Audio": {
"AudioList": [
{
"DRC": 0,
"Encoder": "copy:ac3",
"Gain": 0,
"Mixdown": -1,
"NormalizeMixLevel": false,
"Samplerate": 0,
"Track": 0,
"DitherMethod": 0
}
],
"CopyMask": [
"copy:aac",
"copy:ac3",
"copy:dtshd",
"copy:dts",
"copy:eac3",
"copy:flac",
"copy:mp3",
"copy:truehd",
"copy:mp2"
],
"FallbackEncoder": "ac3"
},
"Destination": {
"ChapterList": [
{
"Name": "Chapter 1"
},
{
"Name": "Chapter 2"
},
{
"Name": "Chapter 3"
},
{
"Name": "Chapter 4"
},
{
"Name": "Chapter 5"
},
{
"Name": "Chapter 6"
},
{
"Name": "Chapter 7"
},
{
"Name": "Chapter 8"
},
{
"Name": "Chapter 9"
},
{
"Name": "Chapter 10"
},
{
"Name": "Chapter 11"
},
{
"Name": "Chapter 12"
},
{
"Name": "Chapter 13"
},
{
"Name": "Chapter 14"
},
{
"Name": "Chapter 15"
},
{
"Name": "Chapter 16"
},
{
"Name": "Chapter 17"
},
{
"Name": "Chapter 18"
},
{
"Name": "Chapter 19"
},
{
"Name": "Chapter 20"
},
{
"Name": "Chapter 21"
},
{
"Name": "Chapter 22"
},
{
"Name": "Chapter 23"
},
{
"Name": "Chapter 24"
},
{
"Name": "Chapter 25"
},
{
"Name": "Chapter 26"
},
{
"Name": "Chapter 27"
},
{
"Name": "Chapter 28"
},
{
"Name": "Chapter 29"
},
{
"Name": "Chapter 30"
},
{
"Name": "Chapter 31"
},
{
"Name": "Chapter 32"
},
{
"Name": "Chapter 33"
}
],
"ChapterMarkers": true,
"AlignAVStart": false,
"File": "C:\\Users\\sjohnson\\Videos\\Terminator 3 - Chap 11 CFR.mkv",
"Mp4Options": {
"IpodAtom": false,
"Mp4Optimize": false
},
"Mux": "av_mkv"
},
"Filters": {
"FilterList": [
{
"ID": 4,
"Settings": {
"mode": "7"
}
},
{
"ID": 3,
"Settings": {
"block-height": "16",
"block-thresh": "40",
"block-width": "16",
"filter-mode": "2",
"mode": "3",
"motion-thresh": "1",
"spatial-metric": "2",
"spatial-thresh": "1"
}
},
{
"ID": 13,
"Settings": {
"crop-bottom": "64",
"crop-left": "0",
"crop-right": "0",
"crop-top": "62",
"height": "354",
"width": "720"
}
},
{
"ID": 6,
"Settings": {
"mode": "1"
}
}
]
},
"PAR": {
"Num": 32,
"Den": 27
},
"Metadata": {},
"SequenceID": 0,
"Source": {
"Angle": 1,
"Range": {
"Type": "chapter",
"Start": 11,
"End": 11
},
"Title": 1,
"Path": "C:\\Users\\sjohnson\\Documents\\savetest\\MainMovie\\TERMINATOR_3"
},
"Subtitle": {
"Search": {
"Burn": false,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": []
},
"Video": {
"Encoder": "x264",
"Level": "auto",
"TwoPass": false,
"Turbo": false,
"ColorMatrixCode": 0,
"Options": "",
"Preset": "veryslow",
"Profile": "high",
"Quality": 16,
"QSV": {
"Decode": false
}
}
}
[21:43:59] CPU: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
[21:43:59] - Intel microarchitecture Skylake
[21:43:59] - logical processor count: 4
[21:43:59] Intel Quick Sync Video support: yes, gpu list: 0
[21:43:59] Intel Quick Sync Video integrated adapter with index 0
[21:43:59] - Intel Media SDK hardware: API 1.19 (minimum: 1.3)
[21:43:59] - Decode support: h264 hevc (8bit: yes, 10bit: no)
[21:43:59] - H.264 encoder: yes
[21:43:59] - preferred implementation: hardware (1) via D3D11
[21:43:59] - capabilities (hardware): breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[21:43:59] - H.265 encoder: no
[21:43:59] hb_scan: path=C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3, title_index=1
src/libbluray/disc/disc.c:437: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:437: error opening file BDMV\BACKUP\index.bdmv
src/libbluray/bluray.c:2646: nav_get_title_list(C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3\) failed
[21:43:59] bd: not a bd - trying as a stream/file instead
libdvdread: Could not open C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3 with libdvdcss.
libdvdread: Can't open C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3 for reading
libdvdread: Device C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3 inaccessible, CSS authentication not available.
libdvdnav:libdvdnav: Unable to open device file C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3.
vm: dvd_read_name failed
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 01 02 03 04 05 06 07 08
libdvdread: Could not open C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3 with libdvdcss.
libdvdread: Can't open C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3 for reading
libdvdread: Device C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3 inaccessible, CSS authentication not available.
[21:43:59] scan: DVD has 1 title(s)
[21:43:59] scan: scanning title 1
[21:43:59] scan: duration is 01:48:53 (6533767 ms)
[21:43:59] pgc_id: 1, pgn: 1: pgc: 0000021e7540d8f0
[21:43:59] scan: checking audio 1
[21:43:59] scan: id=0x80bd, lang=English (AC3), 3cc=eng ext=0
[21:43:59] scan: checking audio 2
[21:43:59] scan: id=0x81bd, lang=Francais (AC3), 3cc=fra ext=0
[21:43:59] scan: checking subtitle 1
[21:43:59] scan: id=0x20bd, lang=English (Wide Screen) [VOBSUB], 3cc=eng ext=0
[21:43:59] scan: id=0x21bd, lang=English (Letterbox) [VOBSUB], 3cc=eng ext=0
[21:43:59] scan: checking subtitle 2
[21:43:59] scan: id=0x22bd, lang=Francais (Wide Screen) [VOBSUB], 3cc=fra ext=0
[21:43:59] scan: id=0x23bd, lang=Francais (Letterbox) [VOBSUB], 3cc=fra ext=0
[21:43:59] scan: checking subtitle 3
[21:43:59] scan: id=0x24bd, lang=espaÏol (Wide Screen) [VOBSUB], 3cc=spa ext=0
[21:43:59] scan: id=0x25bd, lang=espaÏol (Letterbox) [VOBSUB], 3cc=spa ext=0
[21:43:59] scan: title 1 has 33 chapters
[21:43:59] scan: chap 1, 216833 ms
[21:43:59] scan: chap 2, 125700 ms
[21:43:59] scan: chap 3, 209567 ms
[21:43:59] scan: chap 4, 132133 ms
[21:43:59] scan: chap 5, 294266 ms
[21:43:59] scan: chap 6, 242667 ms
[21:43:59] scan: chap 7, 155400 ms
[21:43:59] scan: chap 8, 197767 ms
[21:43:59] scan: chap 9, 196767 ms
[21:43:59] scan: chap 10, 175367 ms
[21:43:59] scan: chap 11, 166934 ms
[21:43:59] scan: chap 12, 179767 ms
[21:43:59] scan: chap 13, 241500 ms
[21:43:59] scan: chap 14, 92667 ms
[21:43:59] scan: chap 15, 277967 ms
[21:43:59] scan: chap 16, 199967 ms
[21:43:59] scan: chap 17, 127233 ms
[21:43:59] scan: chap 18, 220000 ms
[21:43:59] scan: chap 19, 151567 ms
[21:43:59] scan: chap 20, 340367 ms
[21:43:59] scan: chap 21, 165033 ms
[21:43:59] scan: chap 22, 135667 ms
[21:43:59] scan: chap 23, 188600 ms
[21:43:59] scan: chap 24, 267700 ms
[21:43:59] scan: chap 25, 169333 ms
[21:43:59] scan: chap 26, 214533 ms
[21:43:59] scan: chap 27, 248333 ms
[21:43:59] scan: chap 28, 158600 ms
[21:43:59] scan: chap 29, 124900 ms
[21:43:59] scan: chap 30, 119033 ms
[21:43:59] scan: chap 31, 201767 ms
[21:43:59] scan: chap 32, 166300 ms
[21:43:59] scan: chap 33, 429533 ms
[21:43:59] scan: aspect = 16:9
[21:43:59] scan: decoding previews for title 1
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 01 02 03 04 05 06 07 08
[21:43:59] scan: title angle(s) 1
[21:44:00] scan: audio 0x81bd: ac3, rate=48000Hz, bitrate=448000 Francais (AC3) (5.1 ch) (448 kbps)
[21:44:00] scan: audio 0x80bd: ac3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch) (448 kbps)
[21:44:00] scan: 10 previews, 720x480, 23.976 fps, autocrop = 60/64/0/0, aspect 16:9, PAR 32:27, color profile: 6-1-6, chroma location: left
[21:44:00] libhb: scan thread found 1 valid title(s)
[21:44:00] Starting Task: Encoding Pass
[21:44:00] work: only 1 chapter, disabling chapter markers
[21:44:00] job configuration:
[21:44:00] * source
[21:44:00] + C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3
[21:44:00] + title 1, chapter(s) 11 to 11
[21:44:00] * destination
[21:44:00] + C:\Users\sjohnson\Videos\Terminator 3 - Chap 11 CFR.mkv
[21:44:00] + container: Matroska (libavformat)
[21:44:00] * video track
[21:44:00] + decoder: mpeg2video 8-bit (yuv420p)
[21:44:00] + bitrate 200 kbps
[21:44:00] + filters
[21:44:00] + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[21:44:00] + Decomb (mode=39)
[21:44:00] + Framerate Shaper (mode=1)
[21:44:00] + frame rate: 23.976 fps -> constant 23.976 fps
[21:44:00] + Crop and Scale (width=720:height=354:crop-top=62:crop-bottom=64:crop-left=0:crop-right=0)
[21:44:00] + source: 720 * 480, crop (62/64/0/0): 720 * 354, scale: 720 * 354
[21:44:00] + Output geometry
[21:44:00] + storage dimensions: 720 x 354
[21:44:00] + pixel aspect ratio: 32 : 27
[21:44:00] + display dimensions: 853 x 354
[21:44:00] + encoder: H.264 (libx264)
[21:44:00] + preset: veryslow
[21:44:00] + profile: high
[21:44:00] + level: auto
[21:44:00] + quality: 16.00 (RF)
[21:44:00] + color profile: 6-1-6
[21:44:00] + chroma location: left
[21:44:00] * audio track 1
[21:44:00] + decoder: English (AC3) (5.1 ch) (448 kbps) (track 1, id 0x80bd)
[21:44:00] + bitrate: 448 kbps, samplerate: 48000 Hz
[21:44:00] + AC3 Passthru
libdvdread: Could not open C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3 with libdvdcss.
libdvdread: Can't open C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3 for reading
libdvdread: Device C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3 inaccessible, CSS authentication not available.
llibdvdnav: Unable to open device file C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3.
ibdvdnav: vm: dvd_read_name failed
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 01 02 03 04 05 06 07 08
libdvdread: Could not open C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3 with libdvdcss.
libdvdread: Can't open C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3 for reading
libdvdread: Device C:\Users\sjohnson\Documents\savetest\MainMovie\TERMINATOR_3 inaccessible, CSS authentication not available.
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 01 02 03 04 05 06 07 08
[21:44:00] sync: expecting 4002 video frames
[21:44:00] encx264: min-keyint: 24, keyint: 240
[21:44:00] encx264: encoding at constant RF 16.000000
[21:44:00] encx264: unparsed options: ref=16:bframes=8:b-adapt=2:direct=auto:analyse=all:me=umh:merange=24:subme=10:trellis=2:rc-lookahead=60
x264 [info]: using SAR=32/27
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High, level 3.1, 4:2:0, 8-bit
[21:44:00] sync: first pts audio 0x80bd is 0
[21:44:00] sync: first pts video is 8382
[21:44:00] sync: "Chapter 11" (11) at frame 1 time 8382
[21:53:36] reader: end of chapter 11 (media 11) reached at media chapter 12
[21:53:36] reader: done. 1 scr changes
[21:53:36] 167.160019s: Film -> Video
[21:53:53] work: average encoding speed for job is 6.897019 fps
[21:53:53] comb detect: heavy 28 | light 103 | uncombed 3876 | total 4007
[21:53:53] decomb: deinterlaced 28 | blended 103 | unfiltered 3876 | total 4007
[21:53:53] vfr: 4007 frames output, 0 dropped and 0 duped for CFR/PFR
[21:53:53] vfr: lost time: 0 (0 frames)
[21:53:53] vfr: gained time: 0 (0 frames) (0 not accounted for)
[21:53:53] ac3-decoder done: 5222 frames, 0 decoder errors
[21:53:53] mpeg2video-decoder done: 4007 frames, 0 decoder errors
[21:53:53] sync: got 4007 frames, 4002 expected
[21:53:53] sync: framerate min 23.976 fps, max 29.970 fps, avg 23.978 fps
x264 [info]: frame I:38 Avg QP:15.19 size: 40556
x264 [info]: frame P:1233 Avg QP:18.92 size: 17550
x264 [info]: frame B:2736 Avg QP:20.20 size: 11541
x264 [info]: consecutive B-frames: 6.2% 8.9% 22.2% 34.1% 11.7% 15.7% 0.7% 0.2% 0.2%
x264 [info]: mb I I16..4: 2.6% 81.9% 15.5%
x264 [info]: mb P I16..4: 3.4% 42.4% 5.5% P16..4: 24.9% 15.2% 6.9% 0.3% 0.1% skip: 1.3%
x264 [info]: mb B I16..4: 0.5% 9.1% 1.5% B16..8: 38.2% 22.6% 5.4% direct:11.7% skip:11.0% L0:45.4% L1:36.8% BI:17.8%
x264 [info]: 8x8 transform intra:82.6% inter:76.3%
x264 [info]: direct mvs spatial:99.9% temporal:0.1%
x264 [info]: coded y,uvDC,uvAC intra: 87.8% 82.0% 46.7% inter: 56.9% 46.5% 6.5%
x264 [info]: i16 v,h,dc,p: 16% 24% 5% 56%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 16% 6% 8% 10% 11% 12% 10% 12%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 13% 3% 8% 12% 12% 12% 10% 11%
x264 [info]: i8c dc,h,v,p: 30% 32% 22% 16%
x264 [info]: Weighted P-Frames: Y:4.2% UV:3.3%
x264 [info]: ref P L0: 50.2% 12.8% 13.8% 6.2% 4.2% 3.1% 2.3% 1.5% 1.2% 1.0% 0.8% 0.7% 0.6% 0.6% 0.6% 0.5%
x264 [info]: ref B L0: 80.0% 9.3% 4.0% 1.9% 1.2% 0.9% 0.7% 0.5% 0.4% 0.3% 0.2% 0.2% 0.2% 0.1% 0.1%
x264 [info]: ref B L1: 97.0% 3.0%
x264 [info]: kb/s:2621.05
[21:53:53] mux: track 0, 4007 frames, 54754026 bytes, 2619.02 kbps, fifo 1024
[21:53:53] mux: track 1, 5222 frames, 9357603 bytes, 447.60 kbps, fifo 2048
[21:53:53] Finished work at: Sun May 01 21:53:53 2022
[21:53:53] libhb: work result = 0

# Job Completed!



Code: Select all

Please replace this text with the contents of your log file between the two code tags - OR -  provide a pastebin URL in place of these 3 lines.
If you are unable to do so, please state why so we can help you.
Deleted User 11865

Re: Why does the handbrake log show VFR for DVDs?

Post by Deleted User 11865 »

DVDs are CFR only if you apply pulldown flags (soft telecine), otherwise they can be VFR. Since pulldown flags are intended for playback on an interlaced display and otherwise introduce combing artifacts, HandBrake does not apply them.
tlindgren
Bright Spark User
Posts: 260
Joined: Sun May 03, 2009 2:14 pm

Re: Why does the handbrake log show VFR for DVDs?

Post by tlindgren »

smu johnson wrote: Mon May 02, 2022 5:14 amCan someone say definitively whether or not DVDs you buy from stores can have variable frame rates within the same title? This is very confusing to me as I assumed DVDs use CFR.
There's lots of DVDs where the frame-rate varies during a title, sometimes it flips back and forth a LOT during playback. I expect that MOST DVDs doesn't do this but it's definitely not uncommon on older DVDs or at least where the source is older.

Flipping between interlaced (59.94) and progressive (29.97) is somewhat common, and there's plenty of well known examples where a single title mix either progressive and film (23.976) or interlaced and film - they might be using different sources and/or the visual effects are done in a different framerate and if there's both VFX and "live" video one got converted to a different fps before the VFX was overlaid but only for the small parts where the VFX is played over!

There's even examples where it flips between all three of these, or for REAL fun some parts of the picture is interlaced but others are progressive or even hard-converted from film! (again, usually VFX, logos or other "special" feature are involved).

For PAL you don't need to worry about "film", but it can still flip between interlace (50) and progressive (25).

Since HB doesn't output interlaced I suspect some of these only affect how the video is handled rather than actually resulting in variable frame-rate output but anything that has both 59.94 (interlaced) or 29.97 (progressive) and 23.976 (film) do end up VFR unless the FPS is forced.

IIRC MediaInfo used to be infamous for getting the Frame Rate Mode and Frame Rate wrong, older versions always thought HB files was Variable rate and got the FPS wrong due to the "timebase" HB uses - even when you told HB to create a constant framerate file. This output looked a lot more sane than I remember from old MediaInfo versions...

IIRC HandBrake logs when the DVD frame-rate changes? (I've not converted DVDs in a long time, "scene"?) and I think the lack of messages and the "1 scr" message means that in this case the DVD was all the same framerate.

The fact that you apparently set it to output "constant 23.976 fps" and it had 0 duped and 0 dropped frames confirms that this 4007 frame (167 second) section you encoded was in fact CFR. There's a good chance the entire film is CFR considering the date and budget of T3 but IIRC with a DVD the only way to find out is by parsing the entire DVD stream - if so it'll only know when it's done.

If you have a broken older TV or something similar that you use for playback that can't handle VFR media you can of course force constant framerate and check for dup/drop stats, if both are zero it was in fact the right framerate and it was fully CFR. Fortunately those kind of crappy devices are getting really rare these days.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5722
Joined: Sat Feb 09, 2008 7:21 pm

Re: Why does the handbrake log show VFR for DVDs?

Post by JohnAStebbins »

Rodeo wrote: Mon May 02, 2022 9:19 am DVDs are CFR only if you apply pulldown flags (soft telecine), otherwise they can be VFR. Since pulldown flags are intended for playback on an interlaced display and otherwise introduce combing artifacts, HandBrake does not apply them.
Actually, HandBrake does apply the pulldown flags. But application of the pulldown flags actually creates VFR output. Non-application of the pulldown flags would result in "interlaced" CFR. Interlaced is in quotes here because this scenario is actually what is referred to as soft telecine as Rodeo noted above.

HandBrake's "VFR" filter (which is always enabled) adjusts timestamps so that soft and hard telecine VFR video gets converted to CFR. The uneven frame durations created by the telecine pulldown pattern are smoothed over.

There is an unrelated caveat to be aware of however. HandBrake uses a 90khz clock for all timestamps. Film framerates can not be evenly divided by this clock which results in a one clock tick jitter that some tools will flag as "VFR".

Another unrelated caveat is that DVDs are not truly CFR. The format allows for certain types of discontinuities in the video which occurs on the transition between VOB files. On this transition, the audio must be clocked out at a nice even pace or there would be a very noticeable audio glitch. Audio and video frames have different durations, so the audio and video frame boundaries never perfectly align on these transitions. Since it is more important to preserve the audio frame boundaries than the video, HandBrake will generate a shortened or extended video frame to maintain A/V sync when VFR mode is enabled. In CFR mode, HandBrake outputs all frames with the same duration (caviat the one clock tick above) and drops or duplicates frames if the discontinuities sum up to more than one video frame druation.
smu johnson
Posts: 5
Joined: Mon May 02, 2022 5:03 am

Re: Why does the handbrake log show VFR for DVDs?

Post by smu johnson »

Okay.. I will stick to doing "Same as Source", CFR, and checking the logs to make sure no duplicates or frames were removed or added, etc.

I saw some people in another forum (and maybe another program other than Handbrake) talking about doubling the frame rate if you are deinterlacing... is that bogus? I think "Same as source" might be best instead of doubling it, but I'm no expert.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5722
Joined: Sat Feb 09, 2008 7:21 pm

Re: Why does the handbrake log show VFR for DVDs?

Post by JohnAStebbins »

smu johnson wrote: Tue May 03, 2022 9:52 am Okay.. I will stick to doing "Same as Source", CFR, and checking the logs to make sure no duplicates or frames were removed or added, etc.

I saw some people in another forum (and maybe another program other than Handbrake) talking about doubling the frame rate if you are deinterlacing... is that bogus? I think "Same as source" might be best instead of doubling it, but I'm no expert.
With "Same as Source" CFR, I would expect drops/dups to be pretty rare, but when they occur they are necessary to preserve A/V sync.

The deinterlace filter has a preset called "Bob". Bob produces an output frame for every input field. So it doubles the framerate. Each interlaced frame is composed of 2 fields (each with half the vertical resolution of the frame) that are offset in time by 1/2 a frame period. The combing artifacts you see in interlaced video is due to this time difference between the fields. So bobbing essentially preserves the temporal resolution of an interlaced sequence.

This is a personal preference, but for interlaced sources I like to enable Interlace Detection with the Decomb deinterlacer and EEDI2 Bob preset and use "Same as Source" VFR. Interlace Detection will disable the deinterlacer for individual frames that have no combing artifacts (i.e. no/low motion sequences). This preserves the original spatial resolution of the video better for no/low motion sequences. Where combing is detected, EEDI2 Bob is used. EEDI2 a good high quality deinterlacer (but very slow). Bob preserves the temporal resolution by applying the filter to every field. "Same as Source" VFR allows the sequences that are not deinterlaced to be at the original framerate and the bobbed sequences to be at double the original framerate.
Post Reply