Encoding Options w/ RF0

Discuss encoding for devices and presets.
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
DKqwerty
Posts: 13
Joined: Wed May 29, 2019 5:02 pm

Encoding Options w/ RF0

Post by DKqwerty »

Description of problem or question:

Do encoding options really affect anything if quality is RF0? I mean, lossless is lossless right? If my intention is to hand off the resultant video to another program for additional processing and I don't care about encoding efficiency (read: size), should I just run at Ultrafast and be done with it as quickly as possible? Or is there a downside to that?

(BTW, I did search for this, but the terms in the search generate hundreds of useless results.)

Steps to reproduce the problem (If Applicable):

N/A


HandBrake version (e.g., 1.0.0):

1.3.1 x64


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

Win10Pro x64


HandBrake Activity Log

Code: Select all

HandBrake 1.3.1 (2020010400)
OS: Microsoft Windows NT 10.0.19041.0
CPU: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz
Ram: 8169 MB, 
GPU Information:
  NVIDIA GeForce GTX 460M - 23.21.13.8857
Screen: 1920x1080
Temp Dir: C:\Users\David\AppData\Local\Temp\
Install Dir: X:\Installers\HandBrake-1.3.1-x86_64-Win_GUI
Data Dir: C:\Users\David\AppData\Roaming\HandBrake

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


# Starting Encode ...

[04:27:09] base preset: Phish [480] (Modified)
[16:27:09] hb_init: starting libhb thread
[16:27:09] Starting work at: Mon Jul 20 16:27:09 2020
[16:27:09] 1 job(s) to process
[16:27:09] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": -1,
        "DRC": 0.0,
        "Encoder": "flac16",
        "Gain": 0.0,
        "Mixdown": 4,
        "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"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "N:\\Music\\Phish.vid\\orig\\ph1995-06-19 [full, deint, crop].mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "116",
          "crop-right": "116",
          "crop-top": "0",
          "height": "480",
          "width": "622"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "0"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "N:\\Music\\Phish.vid\\orig\\ph1995-06-19 [full, interlaced].mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x264",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "rc-lookahead=60:merange=64",
    "Preset": "medium",
    "Profile": "auto",
    "Quality": 0.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[16:27:09] CPU: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz
[16:27:09]  - Intel microarchitecture Sandy Bridge
[16:27:09]  - logical processor count: 8
[16:27:09] Intel Quick Sync Video support: no
[16:27:09] hb_scan: path=N:\Music\Phish.vid\orig\ph1995-06-19 [full, interlaced].mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image N:\Music\Phish.vid\orig\ph1995-06-19 [full, interlaced].mkv
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(N:\Music\Phish.vid\orig\ph1995-06-19 [full, interlaced].mkv\) failed
[16:27:09] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
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
[16:27:09] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'N:\Music\Phish.vid\orig\ph1995-06-19 [full, interlaced].mkv':
  Metadata:
    encoder         : libebml v1.3.9 + libmatroska v1.5.2
    creation_time   : 2020-06-18T04:39:30.000000Z
  Duration: 03:18:04.98, start: -0.007000, bitrate: 629 kb/s
    Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709, progressive), 854x480 [SAR 1:1 DAR 427:240], 29.97 fps, 29.97 tbr, 1k tbn, 60 tbc (default)
    Metadata:
      BPS-eng         : 516729
      DURATION-eng    : 03:18:04.965000000
      NUMBER_OF_FRAMES-eng: 356193
      NUMBER_OF_BYTES-eng: 767664026
      _STATISTICS_WRITING_APP-eng: mkvmerge v41.0.0 ('Smarra') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-06-18 04:39:30
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      BPS-eng         : 110299
      DURATION-eng    : 03:18:04.978000000
      NUMBER_OF_FRAMES-eng: 594249
      NUMBER_OF_BYTES-eng: 163863000
      _STATISTICS_WRITING_APP-eng: mkvmerge v41.0.0 ('Smarra') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-06-18 04:39:30
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[16:27:09] scan: decoding previews for title 1
[16:27:09] scan: audio 0x1: opus, rate=48000Hz, bitrate=1 English (Opus) (2.0 ch)
[16:27:09] scan: 10 previews, 854x480, 29.970 fps, autocrop = 0/0/114/116, aspect 16:9, PAR 1:1
[16:27:09] scan: supported video decoders: avcodec qsv
[16:27:09] libhb: scan thread found 1 valid title(s)
[16:27:09] Starting Task: Encoding Pass
[16:27:09] Skipping vfr filter
[16:27:09] work: compression level not specified, track 1 setting compression level 5.00
[16:27:09] work: only 1 chapter, disabling chapter markers
[16:27:09] job configuration:
[16:27:09]  * source
[16:27:09]    + N:\Music\Phish.vid\orig\ph1995-06-19 [full, interlaced].mkv
[16:27:09]    + title 1, chapter(s) 1 to 1
[16:27:09]    + container: matroska,webm
[16:27:09]    + data rate: 629 kbps
[16:27:09]  * destination
[16:27:09]    + N:\Music\Phish.vid\orig\ph1995-06-19 [full, deint, crop].mkv
[16:27:09]    + container: Matroska (libavformat)
[16:27:09]  * video track
[16:27:09]    + decoder: h264
[16:27:09]    + filters
[16:27:09]      + Decomb (mode=7)
[16:27:09]      + Crop and Scale (width=622:height=480:crop-top=0:crop-bottom=0:crop-left=116:crop-right=116)
[16:27:09]        + source: 854 * 480, crop (0/0/116/116): 622 * 480, scale: 622 * 480
[16:27:09]    + Output geometry
[16:27:09]      + storage dimensions: 622 x 480
[16:27:09]      + pixel aspect ratio: 1 : 1
[16:27:09]      + display dimensions: 622 x 480
[16:27:09]    + encoder: H.264 (libx264)
[16:27:09]      + preset:  medium
[16:27:09]      + options: rc-lookahead=60:merange=64
[16:27:09]      + profile: auto
[16:27:09]      + level:   auto
[16:27:09]      + quality: 0.00 (RF)
[16:27:09]      + color profile: 1-1-1
[16:27:09]  * audio track 1
[16:27:09]    + decoder: English (Opus) (2.0 ch) (track 1, id 0x1)
[16:27:09]      + samplerate: 48000 Hz
[16:27:09]    + mixdown: Stereo
[16:27:09]    + dither: none
[16:27:09]    + encoder: FLAC 16-bit (libavcodec)
[16:27:09]      + samplerate: 48000 Hz
[16:27:09]      + compression level: 5.00
[16:27:09] sync: expecting 356193 video frames
[16:27:09] encx264: min-keyint: 30, keyint: 300
[16:27:09] encx264: encoding at constant RF 0.000000
[16:27:09] encx264: unparsed options: rc-lookahead=60:merange=64
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile High 4:4:4 Predictive, level 3.0, 4:2:0, 8-bit
[16:27:09] sync: first pts video is 0
[16:27:09] sync: "Chapter 1" (1) at frame 1 time 0
[16:27:09] sync: first pts audio 0x1 is 540

User avatar
Rodeo
HandBrake Team
Posts: 12626
Joined: Tue Mar 03, 2009 8:55 pm

Re: Encoding Options w/ RF0

Post by Rodeo »

They don't affect quality, but may impact compression efficiency. Also, RF 0 is lossless with an 8-bit build of x264; with a 10-bit build you'd have to use a QP of zero instead (may not even be possible with HandBrake). Not sure how x265 behaves in that regard.
musicvid
Veteran User
Posts: 3769
Joined: Sat Jun 27, 2009 1:19 am

Re: Encoding Options w/ RF0

Post by musicvid »

For digital intermediates, especially for handoff, it is preferable to go with an intraframe encoder. Even a cheap NLE will support UT, Magic YUV, ProRes 422, DNxHR, etc., which all have better SNR, and handle better than 4:2:0 interframe (less System load), besides the obvious superior rendering times.
Even though size is not an issue for you, UT 4:2:2 is 99% smaller than uncompressed.
DKqwerty
Posts: 13
Joined: Wed May 29, 2019 5:02 pm

Re: Encoding Options w/ RF0

Post by DKqwerty »

Forgive my ignorance, but wouldn't I want to encode an intermediary at yuv444p? Again, size is of zero issue here.
musicvid
Veteran User
Posts: 3769
Joined: Sat Jun 27, 2009 1:19 am

Re: Encoding Options w/ RF0

Post by musicvid »

Handbrake won't give you true Hi444PP. You can still get All-Intra 4:2:0, I believe. But even then, what downstream app do you have that will open thsee files? Rather than try to recall the details of my tests, which are probably a decade old, I encourage you to run your own and share your results. Be sure to include generational loss tests, which are the true benchmark of any digital intermediate.

It's also important to know about your source when choosing an intermediate, if you'll care to post your MediaInfo readout.
Post Reply