Filter tabs and Video Encoder options

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
stof77
Posts: 5
Joined: Mon Mar 04, 2019 11:04 am

Filter tabs and Video Encoder options

Post by stof77 » Thu Mar 07, 2019 4:28 pm

Description of problem or question:
Hi there, I'm a bit of a newbie about Handbrake and have a basic question :
what is the difference if any, between the denoise/tune options choosing "film" in the filters tab

and choosing "film" in the tune option in encoder from video tab,

Edit : activity log below, first is with Encoder tune film option and second without



Steps to reproduce the problem (If Applicable):




HandBrake version (e.g., 1.0.0):

1.2.2


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




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

Code: Select all


[14:21:50]    + container: Matroska (libavformat)
[14:21:50]  * video track
[14:21:50]    + decoder: h264
[14:21:50]      + bitrate 200 kbps
[14:21:50]    + filters
[14:21:50]      + 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)
[14:21:50]      + Decomb (mode=39)
[14:21:50]      + Framerate Shaper (mode=1:rate=27000000/1126125)
[14:21:50]        + frame rate: 23.976 fps -> constant 23.976 fps
[14:21:50]      + Denoise (nlmeans) (y-strength=3:y-origin-tune=0.9:y-patch-size=7:y-range=3:y-frame-count=2:y-prefilter=0:cb-strength=4:cb-origin-tune=0.9:cb-patch-size=7:cb-range=3:cb-frame-count=2:cb-prefilter=0)
[14:21:50]      + Crop and Scale (width=1920:height=820:crop-top=130:crop-bottom=130:crop-left=0:crop-right=0)
[14:21:50]        + source: 1920 * 1080, crop (130/130/0/0): 1920 * 820, scale: 1920 * 820
[14:21:50]    + Output geometry
[14:21:50]      + storage dimensions: 1920 x 820
[14:21:50]      + pixel aspect ratio: 1 : 1
[14:21:50]      + display dimensions: 1920 x 820
[14:21:50]    + encoder: H.264 (libx264)
[14:21:50]      + preset:  veryslow
[14:21:50]      + tune:    film
[14:21:50]      + options: ref=5:bframes=5
[14:21:50]      + profile: high
[14:21:50]      + level:   4.0
[14:21:50]      + quality: 18.00 (RF)
[14:21:50]      + color profile: 1-1-1
[14:21:50]  * subtitle track 1, Francais [PGS] (track 0, id 0x1200, Picture) -> Passthrough
[14:21:50]  * subtitle track 2, Francais [PGS] (track 1, id 0x1201, Picture) -> Passthrough, Default
[14:21:50]  * audio track 1
[14:21:50]    + decoder: 中文 (DTS) (5.1 ch) (track 1, id 0x711100)
[14:21:50]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[14:21:50]    + DTS Passthru
[14:21:50] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[14:21:50] sync: expecting 152536 video frames
[14:21:50] encx264: min-keyint: 24, keyint: 240
[14:21:50] encx264: encoding at constant RF 18.000000
[14:21:50] encx264: unparsed options: ref=5:bframes=5:level=4.0:b-adapt=2:direct=auto:deblock=-1,-1:analyse=all:me=umh:merange=24:subme=10:trellis=2:psy-rd=1,0.15:vbv-bufsize=31250:vbv-maxrate=25000:rc-lookahead=60
x264 [info]: using SAR=1/1
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
[14:21:51] sync: first pts video is 0
[14:21:51] sync: first pts audio 0x711100 is 0
[14:27:20] sync: first pts subtitle 0x1201 is 10349088
[14:27:23] sync: first pts subtitle 0x1200 is 10394133

[10:08:52]    + container: Matroska (libavformat)
[10:08:52]  * video track
[10:08:52]    + decoder: h264
[10:08:52]      + bitrate 200 kbps
[10:08:52]    + filters
[10:08:52]      + 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)
[10:08:52]      + Decomb (mode=39)
[10:08:52]      + Framerate Shaper (mode=1:rate=27000000/1126125)
[10:08:52]        + frame rate: 23.976 fps -> constant 23.976 fps
[10:08:52]      + Denoise (nlmeans) (y-strength=3:y-origin-tune=0.9:y-patch-size=7:y-range=3:y-frame-count=2:y-prefilter=0:cb-strength=4:cb-origin-tune=0.9:cb-patch-size=7:cb-range=3:cb-frame-count=2:cb-prefilter=0)
[10:08:52]      + Crop and Scale (width=1918:height=818:crop-top=130:crop-bottom=132:crop-left=2:crop-right=0)
[10:08:52]        + source: 1920 * 1080, crop (130/132/2/0): 1918 * 818, scale: 1918 * 818
[10:08:52]    + Output geometry
[10:08:52]      + storage dimensions: 1918 x 818
[10:08:52]      + pixel aspect ratio: 1 : 1
[10:08:52]      + display dimensions: 1918 x 818
[10:08:52]    + encoder: H.264 (libx264)
[10:08:52]      + preset:  veryslow
[10:08:52]      + options: ref=5:bframes=5
[10:08:52]      + profile: high
[10:08:52]      + level:   4.0
[10:08:52]      + quality: 18.00 (RF)
[10:08:52]      + color profile: 1-1-1
[10:08:52]  * subtitle track 1, Francais [SRT] (track 0, id 0xff, Text) -> Passthrough, offset: 0, charset: ISO-8859-1
[10:08:52]  * audio track 1
[10:08:52]    + decoder: Francais (DTS) (5.1 ch) (track 1, id 0x711100)
[10:08:52]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[10:08:52]    + DTS Passthru
[10:08:52] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[10:08:52] sync: expecting 153497 video frames
[10:08:52] encx264: min-keyint: 24, keyint: 240
[10:08:52] encx264: encoding at constant RF 18.000000
[10:08:52] encx264: unparsed options: ref=5:bframes=5:level=4.0:b-adapt=2:direct=auto:analyse=all:me=umh:merange=24:subme=10:trellis=2:vbv-bufsize=31250:vbv-maxrate=25000:rc-lookahead=60
x264 [info]: using SAR=1/1
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
[10:08:52] sync: first pts video is 0
[10:08:52] sync: first pts audio 0x711100 is 0
[10:13:38] sync: first pts subtitle 0xff is 8949600
[15:58:11] hb_ts_stream_decode - eof
[15:58:11] reader: done. 1 scr changes
[15:58:26] work: average encoding speed for job is 7.678192 fps
[15:58:26] comb detect: heavy 703 | light 3123 | uncombed 157167 | total 160993
[15:58:26] decomb: deinterlaced 703 | blended 3123 | unfiltered 157167 | total 160993
[15:58:26] vfr: 160993 frames output, 0 dropped and 0 duped for CFR/PFR
[15:58:26] vfr: lost time: 0 (0 frames)
[15:58:26] vfr: gained time: 0 (0 frames) (0 not accounted for)
[15:58:26] stream: 160993 good frames, 0 errors (0%)
[15:58:26] dca-decoder done: 629508 frames, 0 decoder errors
[15:58:26] h264-decoder done: 160993 frames, 0 decoder errors
[15:58:26] sync: got 160993 frames, 153497 expected
[15:58:26] sync: framerate min 23.981 fps, max 23.981 fps, avg 23.976 fps
x264 [info]: frame I:1003  Avg QP:15.02  size:129074
x264 [info]: frame P:35609 Avg QP:17.68  size: 49372
x264 [info]: frame B:124381 Avg QP:19.61  size: 20022
x264 [info]: consecutive B-frames:  1.5%  2.4%  8.6% 23.2% 19.4% 44.9%
x264 [info]: mb I  I16..4:  6.7% 83.3% 10.1%
x264 [info]: mb P  I16..4:  3.3% 18.6%  1.5%  P16..4: 46.0% 14.9%  6.6%  0.1%  0.0%    skip: 8.9%
x264 [info]: mb B  I16..4:  0.2%  1.8%  0.1%  B16..8: 41.5%  9.1%  1.5%  direct: 9.0%  skip:36.7%  L0:45.9% L1:47.1% BI: 7.0%
x264 [info]: 8x8 transform intra:80.9% inter:67.7%
x264 [info]: direct mvs  spatial:99.5% temporal:0.5%
x264 [info]: coded y,uvDC,uvAC intra: 75.5% 61.2% 16.4% inter: 26.1% 19.3% 0.3%
x264 [info]: i16 v,h,dc,p: 23% 15%  9% 52%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12%  8%  7%  9% 13% 13% 13% 12% 13%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17%  7%  6%  9% 14% 13% 13% 10% 12%
x264 [info]: i8c dc,h,v,p: 32% 32% 21% 15%
x264 [info]: Weighted P-Frames: Y:1.8% UV:1.1%
x264 [info]: ref P L0: 50.3%  7.4% 22.4% 10.7%  9.2%  0.1%  0.0%
x264 [info]: ref B L0: 82.8% 11.2%  4.4%  1.5%
x264 [info]: ref B L1: 97.0%  3.0%
x264 [info]: kb/s:5215.93
[15:58:26] mux: track 0, 160993 frames, 4377915841 bytes, 5215.85 kbps, fifo 2048
[15:58:26] mux: track 1, 629508 frames, 1266570164 bytes, 1508.99 kbps, fifo 8192
[15:58:26] mux: track 2, 1027 frames, 54906 bytes, 0.07 kbps, fifo 16
[15:58:26] libhb: work result = 0

Last edited by stof77 on Sat Mar 09, 2019 4:56 pm, edited 1 time in total.

mduell
Veteran User
Posts: 6623
Joined: Sat Apr 21, 2007 8:54 pm

Re: Filter tabs and Video Encoder options

Post by mduell » Thu Mar 07, 2019 5:30 pm

The denoise filter tune film is for removing the grain associated with film sources.

The encoder tune film is for efficiently preserving the film look.

stof77
Posts: 5
Joined: Mon Mar 04, 2019 11:04 am

Re: Filter tabs and Video Encoder options

Post by stof77 » Fri Mar 08, 2019 9:04 am

Ok thanks for clarifying things.

stof77
Posts: 5
Joined: Mon Mar 04, 2019 11:04 am

Re: Filter tabs and Video Encoder options

Post by stof77 » Sat Mar 09, 2019 4:34 pm

One more question though about the encoder tune film option,

is it known to lead to bigger file size ?
because it seems to be the case with a movie I'm encoding (right know at 50%), I should end up with a 8.5 Go file, while with another movie of about the same original file size I ended up with 5.6 Go (with the same settings except for the encoder tune film).
Last edited by stof77 on Sat Mar 09, 2019 4:36 pm, edited 1 time in total.

rollin_eng
Veteran User
Posts: 3143
Joined: Wed May 04, 2011 11:06 pm

Re: Filter tabs and Video Encoder options

Post by rollin_eng » Sat Mar 09, 2019 4:36 pm

Could you please post your HB logs, instructions can be found here:

https://handbrake.fr/docs/en/latest/hel ... y-log.html

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

Re: Filter tabs and Video Encoder options

Post by JohnAStebbins » Sat Mar 09, 2019 4:48 pm

Any change in settings or source video can lead to
  • Larger or smaller file size
  • Lower or higher quality
  • Slower or faster encoding time
When doing comparisons, you need to change only one thing at a time. If you are changing a setting, use the same video source for your comparisons. The film tune could result in larger files for some sources and smaller files for others because it makes the assumption that your source has certain attributes common in film sources. If your source doesn't fit the model the encoder is assuming, the encode may not turn out as well as other tune settings could.

stof77
Posts: 5
Joined: Mon Mar 04, 2019 11:04 am

Re: Filter tabs and Video Encoder options

Post by stof77 » Sat Mar 09, 2019 5:00 pm

Thanks for your answer, I just added the activity logs above,

@John, I'm afraid I don't really understand what you mean by "...because it makes the assumption that your source has certain attributes common in film sources"

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

Re: Filter tabs and Video Encoder options

Post by JohnAStebbins » Sat Mar 09, 2019 5:17 pm

The film tune is designed to work best with "film" sources. I quote "film" because it kind of begs the question, how does the encoder define what a film source is? The encoder makes some assumption about what the video "looks like". E.g. animation, and camcorder video have different characteristics than film and looks different in various ways. If the source video doesn't conform to the assumptions the encoder has made about what the video "looks like" it won't encode as efficiently. A lack of encoder efficiency results in larger files, lower quality, or both.

stof77
Posts: 5
Joined: Mon Mar 04, 2019 11:04 am

Re: Filter tabs and Video Encoder options

Post by stof77 » Mon Mar 11, 2019 9:39 am

Ok, got it, thanks again, I see how reactive are members of this forum, that's great.

Post Reply