Same as Source and VFR results in widely different VFR

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
gminnick
Posts: 23
Joined: Thu May 07, 2009 7:49 pm

Same as Source and VFR results in widely different VFR

Post by gminnick »

Description of problem or question:

I am re-encoding all my tv shows using x265. I originally used Handbrake and x264 and the original source was DVD. Mediainfo shows some of my shows with a VFR range around 11.xxx to 29.970. While the min rate varies the max seems to always be 29.970. It has been 10 years so I do not remember my exact settings but it was using HB 0.9.4.

Using HB 1.3.3 I re-encoded a few episodes with x265 and Same as Source with VFR as the docs said it would be an exact copy with no framerate conversion. The results are files with min 9.xxx and max 78.xxx. Should the files not have the same? I thought maybe it was something with x265 but I re-encoded with x264 and same wide VFR range. In my research I have seen where some have said Mediainfo is not entirely accurate but seems to be more it saying something is VFR when it is CFR and the min and max are very close to each other. My min and max are very large. I am considering using PFR. A lot of my shows are Stargate SG-1 which I read does have VFR because of some scenes filmed by camera and other scenes are computer generated at a different FPS. So I did not want to use CFR.





HandBrake version (e.g., 1.0.0):
1.3.3



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



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

Code: Select all

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.19042.0
CPU: AMD Ryzen 7 3800X 8-Core Processor             
Ram: 32697 MB, 
GPU Information:
  NVIDIA GeForce RTX 2060 - 27.21.14.5671
Screen: 1920x1080
Temp Dir: 
Install Dir: C:\Program Files\HandBrake
Data Dir: 

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


# Starting Encode ...

[08:45:20] base preset: SG1-3
[08:45:20] hb_init: starting libhb thread
[08:45:20] Starting work at: Fri Mar 12 08:45:20 2021
[08:45:20] 1 job(s) to process
[08:45:20] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": "copy:aac",
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Name": "Stereo",
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "av_aac"
  },
  "Destination": {
    "ChapterList": [],
    "ChapterMarkers": false,
    "AlignAVStart": true,
    "File": "E:\\Encode\\Stargate Sg1-S01e03-The Enemy Withinx265.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "480",
          "width": "720"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "0"
        }
      }
    ]
  },
  "PAR": {
    "Num": 32,
    "Den": 27
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "E:\\SG1\\Stargate SG1-S01E03-The Enemy Within.mp4"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x265",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "fast",
    "Profile": "auto",
    "Quality": 20.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[08:45:20] CPU: AMD Ryzen 7 3800X 8-Core Processor
[08:45:20]  - logical processor count: 16
[08:45:20] Intel Quick Sync Video support: no
[08:45:20] hb_scan: path=E:\SG1\Stargate SG1-S01E03-The Enemy Within.mp4, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image E:\SG1\Stargate SG1-S01E03-The Enemy Within.mp4
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
src/libbluray/bluray.c:2585: nav_get_title_list(E:\SG1\Stargate SG1-S01E03-The Enemy Within.mp4\) failed
[08:45:20] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[08:45:20] dvd: not a dvd - trying as a stream/file instead
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001fa5a03ef40] Referenced QT chapter track not found
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\SG1\Stargate SG1-S01E03-The Enemy Within.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2010-01-06T13:41:15.000000Z
    encoder         : HandBrake 0.9.4 2009112300
  Duration: 00:44:12.97, start: 0.000000, bitrate: 1376 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 720x480 [SAR 32:27 DAR 16:9], 1243 kb/s, 23.86 fps, 120 tbr, 90k tbn, 47.95 tbc (default)
    Metadata:
      creation_time   : 2010-01-06T13:41:15.000000Z
      encoder         : JVT/AVC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      creation_time   : 2010-01-06T13:41:15.000000Z
      title           : Stereo
[08:45:20] scan: decoding previews for title 1
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001fa5a03fc00] Referenced QT chapter track not found
[08:45:20] scan: audio 0x1: aac, rate=48000Hz, bitrate=127942 English (AAC LC) (2.0 ch) (127 kbps)
[08:45:20] scan: 10 previews, 720x480, 23.863 fps, autocrop = 0/0/4/2, aspect 16:9, PAR 32:27
[08:45:20] scan: supported video decoders: avcodec qsv
[08:45:20] libhb: scan thread found 1 valid title(s)
[08:45:20] Starting Task: Encoding Pass
[08:45:20] Skipping vfr filter
[08:45:20] Skipping crop/scale filter
[08:45:20] job configuration:
[08:45:20]  * source
[08:45:20]    + E:\SG1\Stargate SG1-S01E03-The Enemy Within.mp4
[08:45:20]    + title 1, chapter(s) 1 to 1
[08:45:20]    + container: mov,mp4,m4a,3gp,3g2,mj2
[08:45:20]    + data rate: 1376 kbps
[08:45:20]  * destination
[08:45:20]    + E:\Encode\Stargate Sg1-S01e03-The Enemy Withinx265.mp4
[08:45:20]    + container: MPEG-4 (libavformat)
[08:45:20]      + align initial A/V stream timestamps
[08:45:20]  * video track
[08:45:20]    + decoder: h264
[08:45:20]      + bitrate 1243 kbps
[08:45:20]    + Output geometry
[08:45:20]      + storage dimensions: 720 x 480
[08:45:20]      + pixel aspect ratio: 32 : 27
[08:45:20]      + display dimensions: 853 x 480
[08:45:20]    + encoder: H.265 (libx265)
[08:45:20]      + preset:  fast
[08:45:20]      + profile: auto
[08:45:20]      + level:   auto
[08:45:20]      + quality: 20.00 (RF)
[08:45:20]      + color profile: 6-1-6
[08:45:20]  * audio track 1
[08:45:20]    + name: Stereo
[08:45:20]    + decoder: English (AAC LC) (2.0 ch) (127 kbps) (track 1, id 0x1)
[08:45:20]      + bitrate: 127 kbps, samplerate: 48000 Hz
[08:45:20]    + AAC Passthru
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001fa50291840] Referenced QT chapter track not found
[08:45:20] sync: expecting 63307 video frames
x265 [info]: HEVC encoder version 3.2.1+1-b5c86a64bbbe
x265 [info]: build info [Windows][GCC 9.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-3 (Main tier)
x265 [info]: Thread pool created using 16 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 4 / wpp(8 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 24 / 240 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 15 / 4 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-20.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 rskip signhide tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing deblock sao
[08:45:20] sync: first pts video is 0
[08:45:20] sync: Chapter 1 at frame 1 time 0
[08:45:20] sync: first pts audio 0x1 is 1920
[08:47:23] sync: video time went backwards 41 ms, dropped 1 frames. PTS 70145652
[08:47:27] sync: video time went backwards 41 ms, dropped 1 frames. PTS 72483460
[08:47:29] sync: video time went backwards 41 ms, dropped 1 frames. PTS 73381407
[08:52:04] reader: done. 1 scr changes
[08:52:04] work: average encoding speed for job is 156.654907 fps
[08:52:04] aac-decoder done: 124357 frames, 0 decoder errors
[08:52:04] h264-decoder done: 63305 frames, 0 decoder errors
[08:52:04] sync: got 63302 frames, 63307 expected
[08:52:04] sync: framerate min 9.605 fps, max 78.740 fps, avg 23.861 fps
x265 [info]: frame I:    673, Avg QP:19.02  kb/s: 4914.12
x265 [info]: frame P:  12713, Avg QP:20.20  kb/s: 1684.54
x265 [info]: frame B:  49916, Avg QP:24.96  kb/s: 300.86
x265 [info]: Weighted P-Frames: Y:2.7% UV:1.6%
x265 [info]: consecutive B-frames: 5.5% 0.9% 0.8% 1.0% 91.8%
encoded 63302 frames in 404.17s (156.62 fps), 627.79 kb/s, Avg QP:23.94
[08:52:04] mux: track 0, 63302 frames, 208423274 bytes, 628.49 kbps, fifo 4096
[08:52:04] mux: track 1, 124357 frames, 42428162 bytes, 127.94 kbps, fifo 8192
[08:52:04] Finished work at: Fri Mar 12 08:52:04 2021
[08:52:04] libhb: work result = 0

# Encode Completed ...


Deleted User 13735

Re: Same as Source and VFR results in widely different VFR

Post by Deleted User 13735 »

Variable frame rate is only a compression technique; there is no other advantage, and there is no independent variable for VFR among applications or source material, so yes, every treatment will be different. Very different.
You could pass your observation off a curiosity; if you will be editing in most NLEs, you will need to convert to Same as Source, Constant Frame Rate.
gminnick
Posts: 23
Joined: Thu May 07, 2009 7:49 pm

Re: Same as Source and VFR results in widely different VFR

Post by gminnick »

Thanks for the quick reply. I will not be editing. Strictly viewing. I just did not want to run into a device issue as I have never had any videos with a FR that high before I am going to test the file both using Plex on Roku and USB on Roku. But I think I may use PFR and cap it at 29.97 because all the TV Shows do not go above that.
Post Reply