RF 0 is lossy?

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
eidschun
Posts: 5
Joined: Wed Jun 03, 2020 6:34 am

RF 0 is lossy?

Post by eidschun »

I am running Handbrake 1.3.1 under Mac OS 10.14.6 with Profile set to "high", Level set to "auto" and Quality set to "Constant Quality: RF 0". Yet in transforming a anamorphic TIFF sequence in a .mov container to H.264/MP4, the result is clearly lossy. Isn't RF 0 supposed to be lossless?

(I am following up with Topaz Video Enhance AI, which recognizes the anamorphic flag of a .mp4 container but not of a .mov container.)

Thanks.
User avatar
Ritsuka
HandBrake Team
Posts: 1655
Joined: Fri Jan 12, 2007 11:29 am

Re: RF 0 is lossy?

Post by Ritsuka »

0 is lossless, but it's not rgb, it's 4:2:0 yuv. So if your source is rgb, it will be converted to 4:2:0 and some info will be lost.
eidschun
Posts: 5
Joined: Wed Jun 03, 2020 6:34 am

Re: RF 0 is lossy?

Post by eidschun »

Thanks for your reply, Ritsuka.

However, it looks as though the loss is due to more than just inaccuracies in the color space conversion, because the source video is 32 Mb in size (just 30 frames or so) and Handbrake's output is only 2 Mb in size, implying compression of 16:1. Does that seem like lossless compression?

Thanks.
Deleted User 13735

Re: RF 0 is lossy?

Post by Deleted User 13735 »

You are making a temporal encoding comparison based on a 1 second sample?
You are then using an outboard resize/resample algorithm and expecting the same results?
I'm not getting terribly excited over your attribution theories.

Believe Ritsuka. Don't use x264 for lossless conversion. It has no redemptive application as an intermediate codec, nor is it a delivery format, period.
Provide the required encode logs if you have further discussion based on actual quantitative testing. If you want a good lossless intraframe codec for your nonlinear editor, I'm a fan of UT.
Last edited by Deleted User 13735 on Wed Jun 03, 2020 4:46 pm, edited 1 time in total.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: RF 0 is lossy?

Post by mduell »

TIFF is uncompressed, so 16:1 isn't real surprising, especially after the colorspace conversion (which is a free ~2:1).
User avatar
Ritsuka
HandBrake Team
Posts: 1655
Joined: Fri Jan 12, 2007 11:29 am

Re: RF 0 is lossy?

Post by Ritsuka »

Some screenshots of the original and the converted video would help anyway.
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: RF 0 is lossy?

Post by rollin_eng »

And a log.
eidschun
Posts: 5
Joined: Wed Jun 03, 2020 6:34 am

Re: RF 0 is lossy?

Post by eidschun »

Thanks to everyone who has replied to my posts. Yes, I have screenshots but I can't figure out how to post them, or how to post any attachments for that matter. For one thing, there seems to be no button on the interface for adding an attachment. I'm new to this board as of yesterday. Do I need some kind of elevated member status in order to post images or attach other kinds of files? Of course, I have a log to share too.

Thanks.
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: RF 0 is lossy?

Post by rollin_eng »

Just post the log as text.
eidschun
Posts: 5
Joined: Wed Jun 03, 2020 6:34 am

Re: RF 0 is lossy?

Post by eidschun »

I will indeed post the log -- and the screenshots too, if someone can please tell me how -- but I would like to run the test again in ensuring that the settings result in minimum information loss. So, RF should be set to "0". But what should the Profile setting be? "high"? What about the Level setting? "auto"? Do the Profile and Level settings even matter when RF is set to "0"?

Thanks.
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: RF 0 is lossy?

Post by rollin_eng »

Open the log, select the text, copy the text then paste the text here.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: RF 0 is lossy?

Post by mduell »

If you already did what you've claimed, the log is stored on disk in the documented location.
eidschun
Posts: 5
Joined: Wed Jun 03, 2020 6:34 am

Re: RF 0 is lossy?

Post by eidschun »

Here is the encode log:

Code: Select all

HandBrake Activity Log for Session: 2020-06-03T05:22:11Z
Handbrake Version: 1.3.1 (2020010400)
Original.mp4
Preset: Test
[01:22:11] macgui: QueueCore scanning specifically for title: 1
[01:22:11] CPU: Intel(R) Core(TM) M-5Y71 CPU @ 1.20GHz
[01:22:11]  - Intel microarchitecture Broadwell
[01:22:11]  - logical processor count: 4
[01:22:11] hb_scan: path=/Users/eidschun/Desktop/Topaz Tests/TIFF Sequences/The Consultation/Original.mov, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /Users/eidschun/Desktop/Topaz Tests/TIFF Sequences/The Consultation/Original.mov
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2585: nav_get_title_list(/Users/eidschun/Desktop/Topaz Tests/TIFF Sequences/The Consultation/Original.mov/) failed
[01:22:11] 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
[01:22:11] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/eidschun/Desktop/Topaz Tests/TIFF Sequences/The Consultation/Original.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2020-06-03T05:14:13.000000Z
    com.apple.quicktime.player.movie.visual.brightness: 0.000000
    com.apple.quicktime.player.movie.visual.color: 1.000000
    com.apple.quicktime.player.movie.visual.tint: 0.000000
    com.apple.quicktime.player.movie.visual.contrast: 1.000000
    com.apple.quicktime.player.version: 7.6.6 (7.6.6)
    com.apple.quicktime.version: 7.7.3 (3040) 0x7738000 (Mac OS X, 10.14.6, 18G5033)
    encoder         : QuickTime 7.6.6
    encoder-eng     : QuickTime 7.6.6
    date            : 2020:05:01 03:02:37
    date-eng        : 2020:05:01 03:02:37
    host_computer   : Mac OS X 10.6.8
    host_computer-eng: Mac OS X 10.6.8
  Duration: 00:00:01.03, start: 0.000000, bitrate: 249222 kb/s
    Stream #0:0(eng): Video: tiff (tiff / 0x66666974), rgb24, 720x480 [SAR 1:1 DAR 3:2], 248960 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 2997 tbc (default)
    Metadata:
      creation_time   : 2020-06-03T05:14:13.000000Z
      handler_name    : Apple Video Media Handler
      encoder         : TIFF (Uncompressed)
[01:22:11] scan: decoding previews for title 1
[01:22:11] scan: 10 previews, 720x480, 30.000 fps, autocrop = 0/0/0/0, aspect 1.50:1, PAR 1:1
[01:22:11] libhb: scan thread found 1 valid title(s)
[01:22:11] macgui: QueueCore scan done
[01:22:11] Starting work at: Wed Jun  3 01:22:11 2020

[01:22:11] macgui: QueueCore started encoding Original.mp4
[01:22:11] 1 job(s) to process
[01:22:11] macgui: QueueCore with preset Test
[01:22:11] Starting Task: Encoding Pass
[01:22:11] Skipping crop/scale filter
[01:22:11] work: only 1 chapter, disabling chapter markers
[01:22:11] job configuration:
[01:22:11]  * source
[01:22:11]    + /Users/eidschun/Desktop/Topaz Tests/TIFF Sequences/The Consultation/Original.mov
[01:22:11]    + title 1, chapter(s) 1 to 1
[01:22:11]    + container: mov,mp4,m4a,3gp,3g2,mj2
[01:22:11]    + data rate: 249222 kbps
[01:22:11]  * destination
[01:22:11]    + /Users/eidschun/Desktop/Topaz Tests/TIFF Sequences/The Consultation/Original.mp4
[01:22:11]    + container: MPEG-4 (libavformat)
[01:22:11]      + optimized for HTTP streaming (fast start)
[01:22:11]  * video track
[01:22:11]    + decoder: tiff
[01:22:11]      + bitrate 248960 kbps
[01:22:11]    + filter
[01:22:11]      + Framerate Shaper (mode=1:rate=27000000/900900)
[01:22:11]        + frame rate: 30.000 fps -> constant 29.970 fps
[01:22:11]    + Output geometry
[01:22:11]      + storage dimensions: 720 x 480
[01:22:11]      + pixel aspect ratio: 32 : 27
[01:22:11]      + display dimensions: 853 x 480
[01:22:11]    + encoder: H.264 (libx264)
[01:22:11]      + preset:  placebo
[01:22:11]      + profile: high
[01:22:11]      + level:   4.0
[01:22:11]      + quality: 0.00 (RF)
[01:22:11]      + color profile: 6-1-6
[01:22:11] sync: expecting 30 video frames
[01:22:11] encx264: min-keyint: 30, keyint: 300
[01:22:11] encx264: encoding at constant RF 0.000000
[01:22:11] apply_h264_profile [warning]: lossless requires high444 profile, disabling
[01:22:11] encx264: unparsed options: level=4.0:ref=16:bframes=16:b-adapt=2:direct=auto:analyse=all:me=tesa:merange=24:subme=11:trellis=2:fast-pskip=0:vbv-bufsize=31250:vbv-maxrate=25000: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 4.0, 4:2:0, 8-bit
[01:22:11] sync: first pts video is 0
[01:22:11] sync: "Chapter 1" (1) at frame 1 time 0
[01:22:11] reader: done. 1 scr changes
[01:22:19] work: average encoding speed for job is 0.000000 fps
[01:22:19] vfr: 31 frames output, 0 dropped and 0 duped for CFR/PFR
[01:22:19] vfr: lost time: 0 (0 frames)
[01:22:19] vfr: gained time: 0 (0 frames) (0 not accounted for)
[01:22:19] tiff-decoder done: 31 frames, 0 decoder errors
[01:22:19] sync: got 31 frames, 30 expected
[01:22:19] sync: framerate min 29.999 fps, max 30.000 fps, avg 30.000 fps
x264 [info]: frame I:1     Avg QP:12.16  size: 55826
x264 [info]: frame P:6     Avg QP: 1.70  size:108907
x264 [info]: frame B:24    Avg QP: 5.05  size: 53550
x264 [info]: consecutive B-frames:  3.2%  0.0%  0.0% 38.7%  0.0% 58.1%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%
x264 [info]: mb I  I16..4:  4.1% 70.4% 25.5%
x264 [info]: mb P  I16..4:  3.7%  0.7% 12.9%  P16..4: 22.4% 23.5% 21.9% 11.0%  3.8%    skip: 0.0%
x264 [info]: mb B  I16..4:  0.3%  0.1%  2.5%  B16..8: 41.9% 22.4%  6.5%  direct:18.6%  skip: 7.7%  L0:34.9% L1:40.2% BI:24.8%
x264 [info]: 8x8 transform intra:27.8% inter:2.9%
x264 [info]: direct mvs  spatial:83.3% temporal:16.7%
x264 [info]: coded y,uvDC,uvAC intra: 98.8% 90.0% 87.4% inter: 77.0% 61.5% 61.0%
x264 [info]: i16 v,h,dc,p: 10% 10% 48% 32%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 20%  8%  8%  8%  9%  8% 11% 11%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 16% 28%  7%  6%  7%  6%  7%  7%
x264 [info]: i8c dc,h,v,p: 56% 21% 11% 12%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 57.0%  0.5% 12.0%  9.6%  4.7%  6.1%  2.8%  2.7%  1.3%  2.3%  0.2%  0.9%
x264 [info]: ref B L0: 93.8%  3.4%  1.1%  0.5%  0.4%  0.3%  0.3%  0.1%  0.2%  0.0%  0.0%
x264 [info]: ref B L1: 98.1%  1.9%
x264 [info]: kb/s:15425.59
[01:22:19] mux: track 0, 31 frames, 1994417 bytes, 14943.18 kbps, fifo 32
[01:22:19] Finished work at: Wed Jun  3 01:22:19 2020

[01:22:19] libhb: work result = 0
Last edited by Anonymous on Thu Jun 04, 2020 12:56 am, edited 1 time in total.
Reason: Logs in between [code][/code] blocks please
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: RF 0 is lossy?

Post by mduell »

Code: Select all

[01:22:11] apply_h264_profile [warning]: lossless requires high444 profile, disabling
Gotta pick lossless compatible options if you want lossless.
Post Reply