Is it true that there is no big gain of using more than 5 reference frames?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Is it true that there is no big gain of using more than 5 reference frames?

Post by Filmriss »

I read that more than 5 reference frames adds only minimal quality (maybe even not perceivable), but comes at a big increase of complexity, which can be challening for old hardware when decoding.
Unfortunately, 16 will break playback on a lot of hardware devices (and possibly some software players). (posted in 2012) source https://mattgadient.com/2012/06/25/a-ru ... ngs-0-9-6/
Reference Frames: 6
Normally, I’d go much higher here. However if you go too high, both hardware and *some* software players can choke. Unfortunately, reference frames are subject to diminishing returns. According to a document at mplayerhq.hu , while going from a setting of 1 to 2 would improve the signal-to-noise by 0.15dB, going from 6 to 12 would typically improve the signal-to-noise ratio by only 0.02dB but result in a 15-20% longer encoding time. Really high diminishing returns for something you probably won’t notice, and something that might cause issues if you ever try to play your video in a hardware player. That said, go crazy if you want and try 16. Just make sure your video plays fine afterwards. (posted 2009) https://mattgadient.com/2009/09/12/the- ... handbrake/
4-5 reference frames are recommend for general encoding. Higher values will only add to encoding time and decoding complexity, with little to no gain in quality.

in 2013, source https://stackoverflow.com/questions/166 ... ing-libavc
etc.

BUT! Now there is Profiles and Levels. If I understand correctly only level 5.1 and 5.2 allow 16 ref frames. So choosing, e.g. Main@4, 4 to 9 depending on the resolution should be the barrier anyway. https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels

Is it possible that 16 ref frames will be used, allthough the level only suggests e.g. 4?
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by BradleyS »

The encoder presets and tunes affect how many refs and bframes are used. The Super HQ presets limit these to 5 since the encoder preset and tune can easily overshoot, say when choosing animation tune.
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by Filmriss »

Thank you.

Which of the given presets are considered "Super High Quality presets" in Handbrake or which are not, if these are less?

When I choose the "Normal"-preset of the given ones built in Handbrake and choose RF21.75 and then select "tune: none" and Main@3.2 it still uses 12 ref frames for a source file that comes with a resolution lower than 1080 and I a bitrate about 3Mbps, if I am correct. So what would I have to change?
I mean other than ticking the "use advanced options panel" box and manually set ref frames to 4. I tried and this works. Would that be the right solution?

Here is the log of what I tried, before just using advanced options panel:

Code: Select all

[16:09:01] macgui: Handbrake Version: 0.10.5 x86_64 (2016021100)
[16:09:01] hb_init: starting libhb thread
[16:09:01] hb_init: starting libhb thread
[16:09:05] macgui: hbInstances path to this instance: /Applications/Videosoftware/Handbrake/HandBrake.app
[16:09:05] macgui: hbInstance found instance pidnum: 276 at path: /Applications/Videosoftware/Handbrake/HandBrake.app
[16:09:05] macgui: hbInstance MATCH FOUND, our pidnum is: 276
[16:09:05] macgui: Pid for this instance: 276
[16:09:05] macgui: HBQueueController : My Pidnum is 276
[16:10:51] macgui: trying to open video_ts folder (parent directory chosen)
[16:10:51] macgui: scanning titles with a duration of 10 seconds or more
[16:10:51] CPU: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
[16:10:51]  - Intel microarchitecture Ivy Bridge
[16:10:51]  - logical processor count: 4
[16:10:51] OpenCL device #1: Intel HD Graphics 4000
[16:10:51]  - OpenCL version: 1.2 
[16:10:51]  - driver version: 1.2(Jan 11 2016 18:59:21)
[16:10:51]  - device type:    GPU
[16:10:51]  - supported:      no
[16:10:51] hb_scan: path=/Users/myname/Desktop/Stick Caillou Kopie/e auf deutsch ts ps/152 Kopie.ts, title_index=0
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /Users/myname/Desktop/Stick Caillou Kopie/e auf deutsch ts ps/152 Kopie.ts/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /Users/myname/Desktop/Stick Caillou Kopie/e auf deutsch ts ps/152 Kopie.ts/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(/Users/myname/Desktop/Stick Caillou Kopie/e auf deutsch ts ps/152 Kopie.ts) failed
[16:10:51] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.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
[16:10:51] dvd: not a dvd - trying as a stream/file instead
[16:10:51] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[16:10:51] Found the following PIDS
[16:10:51]     Video PIDS : 
[16:10:51]       0x100 type MPEG2 (0x2) (PCR)
[16:10:51]     Audio PIDS : 
[16:10:51]       0x101 type MPEG1 (0x3)
[16:10:51]     Subtitle PIDS : 
[16:10:51]     Other PIDS : 
[16:10:51] stream id 0x101 (type 0x3 substream 0x0) audio 0x101
[16:10:52] scan: decoding previews for title 1
[16:10:52] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[16:10:53] scan: audio 0x101: mp2, rate=48000Hz, bitrate=200000 Unknown (MPEG) (2.0 ch)
[16:10:53] stream: 13 good frames, 0 errors (0%)
[16:10:53] scan: 10 previews, 720x576, 25.000 fps, autocrop = 2/2/0/0, aspect 16:9, PAR 64:45
[16:10:53] libhb: scan thread found 1 valid title(s)
[16:10:53] macgui: ScanDone state received from fHandle
[16:10:53] macgui: showNewScan: This is a new source item scan
[16:13:10] macgui: Rip: Pending queue count is 0
[16:13:10] macgui: getNextPendingQueueIndex next pending encode index is:0
[16:13:10] macgui: scanning specifically for title: 1
[16:13:10] CPU: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
[16:13:10]  - Intel microarchitecture Ivy Bridge
[16:13:10]  - logical processor count: 4
[16:13:10] OpenCL device #1: Intel HD Graphics 4000
[16:13:10]  - OpenCL version: 1.2 
[16:13:10]  - driver version: 1.2(Jan 11 2016 18:59:21)
[16:13:10]  - device type:    GPU
[16:13:10]  - supported:      no
[16:13:10] hb_scan: path=/Users/myname/Desktop/Stick Caillou Kopie/e auf deutsch ts ps/152 Kopie.ts, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /Users/myname/Desktop/Stick Caillou Kopie/e auf deutsch ts ps/152 Kopie.ts/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /Users/myname/Desktop/Stick Caillou Kopie/e auf deutsch ts ps/152 Kopie.ts/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(/Users/myname/Desktop/Stick Caillou Kopie/e auf deutsch ts ps/152 Kopie.ts) failed
[16:13:10] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.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
[16:13:10] dvd: not a dvd - trying as a stream/file instead
[16:13:10] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[16:13:10] Found the following PIDS
[16:13:10]     Video PIDS : 
[16:13:10]       0x100 type MPEG2 (0x2) (PCR)
[16:13:10]     Audio PIDS : 
[16:13:10]       0x101 type MPEG1 (0x3)
[16:13:10]     Subtitle PIDS : 
[16:13:10]     Other PIDS : 
[16:13:10] stream id 0x101 (type 0x3 substream 0x0) audio 0x101
[16:13:10] scan: decoding previews for title 1
[16:13:10] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[16:13:10] scan: audio 0x101: mp2, rate=48000Hz, bitrate=200000 Unknown (MPEG) (2.0 ch)
[16:13:10] stream: 13 good frames, 0 errors (0%)
[16:13:10] scan: 10 previews, 720x576, 25.000 fps, autocrop = 2/2/0/0, aspect 16:9, PAR 64:45
[16:13:10] libhb: scan thread found 1 valid title(s)
[16:13:10] macgui: ScanDone state received from fQueueEncodeLibhb
[16:13:10] macgui: Preset: Custom
[16:13:10] macgui: processNewQueueEncode number of passes expected is: 1
[16:13:10] macgui: Start / Stop set to seconds…
[16:13:10] macgui: prepareJob exiting
[16:13:10] 1 job(s) to process
[16:13:10] starting job
[16:13:10] yadif thread started for segment 0
[16:13:10] yadif thread started for segment 1
[16:13:10] yadif thread started for segment 2
[16:13:10] yadif thread started for segment 3
[16:13:10] decomb filter thread started for segment 0
[16:13:10] decomb filter thread started for segment 1
[16:13:10] decomb filter thread started for segment 2
[16:13:10] decomb filter thread started for segment 3
[16:13:10] decomb check thread started for segment 0
[16:13:10] decomb check thread started for segment 1
[16:13:10] decomb check thread started for segment 2
[16:13:10] decomb check thread started for segment 3
[16:13:10] mask filter thread started for segment 0
[16:13:10] mask filter thread started for segment 1
[16:13:10] mask filter thread started for segment 2
[16:13:10] mask filter thread started for segment 3
[16:13:10] mask erode thread started for segment 0
[16:13:10] mask erode thread started for segment 1
[16:13:10] mask erode thread started for segment 2
[16:13:10] mask erode thread started for segment 3
[16:13:10] mask dilate thread started for segment 0
[16:13:10] mask dilate thread started for segment 1
[16:13:10] mask dilate thread started for segment 2
[16:13:10] mask dilate thread started for segment 3
[16:13:10] sync: expecting 1525 video frames
[16:13:10] work: only 1 chapter, disabling chapter markers
[16:13:10] job configuration:
[16:13:10]  * source
[16:13:10]    + /Users/myname/Desktop/Stick Caillou Kopie/e auf deutsch ts ps/152 Kopie.ts
[16:13:10]    + title 1, start 00:00:0.00 stop 00:01:0.00
[16:13:10]  * destination
[16:13:10]    + /Users/myname/Desktop/Caillou ibook320/152 Kopie.mp4
[16:13:10]    + container: MPEG-4 (libavformat)
[16:13:10]  * video track
[16:13:10]    + decoder: mpeg2video
[16:13:10]      + bitrate 15000 kbps
[16:13:10]    + filters
[16:13:10]      + Decomb (default settings)
[16:13:10]      + Framerate Shaper (0:27000000:1080000)
[16:13:10]        + frame rate: same as source (around 25.000 fps)
[16:13:10]      + Crop and Scale (720:576:0:0:0:0)
[16:13:10]        + source: 720 * 576, crop (0/0/0/0): 720 * 576, scale: 720 * 576
[16:13:10]    + loose anamorphic
[16:13:10]      + storage dimensions: 720 * 576, mod 2
[16:13:10]      + pixel aspect ratio: 64 / 45
[16:13:10]      + display dimensions: 1024 * 576
[16:13:10]    + encoder: H.264 (libx264)
[16:13:10]      + preset:  veryslow
[16:13:10]      + profile: main
[16:13:10]      + level:   3.2
[16:13:10]      + quality: 21.75 (RF)
[16:13:10]  * audio track 1
[16:13:10]    + decoder: Unknown (MPEG) (2.0 ch) (track 1, id 0x101)
[16:13:10]      + bitrate: 200 kbps, samplerate: 48000 Hz
[16:13:10]    + mixdown: Stereo
[16:13:10]    + encoder: AAC (Apple AudioToolbox)
[16:13:10]      + bitrate: 160 kbps, samplerate: 48000 Hz
[16:13:10] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[16:13:10] reader: first SCR 180 id 0x100 DTS 360
[16:13:10] encx264: encoding at constant RF 21.750000
[16:13:10] encx264: unparsed options: level=3.2:ref=12:bframes=8:b-adapt=2:direct=auto:analyse=all:8x8dct=0:me=umh:merange=24:subme=10:trellis=2:vbv-bufsize=20000:vbv-maxrate=20000:rc-lookahead=60
[16:13:10] mpeg2video: "Chapter 1" (1) at frame 0 time 25200
x264 [info]: using SAR=64/45
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile Main, level 3.2
[16:13:10] sync: first pts is 25200
[16:13:10] sync: adding 666 ms of silence to audio 0x101  start 59940, next 0
[16:13:11] macgui: Queue reloaded
[16:14:24] sync: reached pts 5400000, exiting early
[16:14:30] work: average encoding speed for job is 20.350897 fps
[16:14:30] reader: done. 1 scr changes
[16:14:30] sync: got 1500 frames, 1525 expected
[16:14:30] decomb: deinterlaced 272 | blended 168 | unfiltered 1059 | total 1499
[16:14:30] render: lost time: 0 (0 frames)
[16:14:30] render: gained time: 0 (0 frames) (0 not accounted for)
[16:14:30] mpeg2video-decoder done: 3789 frames, 0 decoder errors, 0 drops
x264 [info]: frame I:20    Avg QP:17.74  size: 41480
x264 [info]: frame P:405   Avg QP:21.88  size:  9650
x264 [info]: frame B:1074  Avg QP:29.20  size:  1865
x264 [info]: consecutive B-frames:  5.3%  5.9% 20.8% 21.9% 11.3% 26.0%  2.8%  4.8%  1.2%
x264 [info]: mb I  I16..4: 54.4%  0.0% 45.6%
x264 [info]: mb P  I16..4: 10.5%  0.0%  4.1%  P16..4: 22.8%  6.9%  6.2%  0.6%  0.2%    skip:48.6%
x264 [info]: mb B  I16..4:  1.4%  0.0%  0.2%  B16..8: 22.2%  3.0%  0.9%  direct: 2.1%  skip:70.3%  L0:43.0% L1:47.1% BI: 9.9%
x264 [info]: direct mvs  spatial:99.7% temporal:0.3%
x264 [info]: coded y,uvDC,uvAC intra: 29.8% 39.6% 24.3% inter: 5.7% 9.1% 4.6%
x264 [info]: i16 v,h,dc,p: 54% 32%  6%  8%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 14% 19%  7%  9%  8%  9%  8% 10%
x264 [info]: i8c dc,h,v,p: 51% 26% 17%  6%
x264 [info]: Weighted P-Frames: Y:7.7% UV:6.7%
x264 [info]: ref P L0: 58.6%  8.7% 15.1%  4.2%  3.2%  2.3%  2.0%  1.6%  1.2%  1.0%  0.9%  0.8%  0.4%  0.0%
x264 [info]: ref B L0: 75.4% 12.1%  4.4%  2.1%  1.5%  1.2%  1.1%  0.8%  0.7%  0.5%  0.2%
x264 [info]: ref B L1: 90.8%  9.2%
x264 [info]: kb/s:899.34
[16:14:30] mp2-decoder done: 0 frames, 0 decoder errors, 0 drops
[16:14:30] mux: track 0, 1499 frames, 6739677 bytes, 898.02 kbps, fifo 2048
[16:14:30] mux: track 1, 2814 frames, 1250670 bytes, 166.64 kbps, fifo 4096
[16:14:30] stream: 3818 good frames, 0 errors (0%)
[16:14:30] libhb: work result = 0
[16:14:31] macgui: incrementQueueItemDone there are no more pending encodes
[16:14:34] macgui: Queue reloaded
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by rollin_eng »

Upgrade to 1.0.7
nhyone
Bright Spark User
Posts: 252
Joined: Fri Jul 24, 2015 4:13 am

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by nhyone »

Let's see what the log tells us.

Code: Select all

x264 [info]: ref P L0: 58.6%  8.7% 15.1%  4.2%  3.2%  2.3%  2.0%  1.6%  1.2%  1.0%  0.9%  0.8%  0.4%  0.0%
x264 [info]: ref B L0: 75.4% 12.1%  4.4%  2.1%  1.5%  1.2%  1.1%  0.8%  0.7%  0.5%  0.2%
These two lines tell you how many ref P and B frames are used. For the P line, ignore the last two numbers (there are always two more).

x264 uses 3 ref frames 82.4% of the time. And it drops off sharply after that. This is typical.

You have to ask if it is worth setting a high ref frame, spending the extra encoding time, but x264 rarely use it, and risking hardware decoding issues?
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by Filmriss »

Thank you @nhyone.

So this tells me how many ref frames have been used (I can use an app called mediainfo for that, too) and to what extend (in percentages).

But can I only restrict the number of ref frames used by using the advanced panel or are there other ways in Handbrake?
You have to ask if it is worth setting a high ref frame, spending the extra encoding time, but x264 rarely use it, and risking hardware decoding issues?
Since encoding time isn't an issue for me, I will go with what the devices can handle (of course not pushing it to the very limit).
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by BradleyS »

With HandBrake 1.0.x and the nightly you can add to the additional options box:

Code: Select all

ref=5:bframes=5
Separate options with colons. The official presets already use sane values, assuming you're not making encoder changes.
nhyone
Bright Spark User
Posts: 252
Joined: Fri Jul 24, 2015 4:13 am

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by nhyone »

The histogram is useful if you are trying to find a sane ref-frame and b-frame to use across the board.

I looked at my past logs and settled on ref=3 and bframes=5 for live-action encodes; +1 for animation. (They used to be slightly higher, but I've lowered them a couple of times and finally settled on these.)

x264 does not use that many consecutive B-frames either -- it falls off sharply after 6.

From your log:

Code: Select all

x264 [info]: consecutive B-frames:  5.3%  5.9% 20.8% 21.9% 11.3% 26.0%  2.8%  4.8%  1.2%
Starting from 0. Again, this is typical.

It is okay to set the frames as high as the spec allows, but there is very little value -- they are so rarely used. This is my opinion, of course. :D
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by BradleyS »

The reason we limit refs and bframes to 5 (for the Super HQ presets that would otherwise use more, especially with animation) is compatibility. Certain other settings can add one ref or bframe, so this is as high as we can go, especially with certain Apple devices.
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by Filmriss »

BradleyS wrote: Thu Jul 06, 2017 12:57 am The reason we limit refs and bframes to 5 (for the Super HQ presets that would otherwise use more, especially with animation) is compatibility. Certain other settings can add one ref or bframe, so this is as high as we can go, especially with certain Apple devices.
This is the reason why I tried to lower the ref frames from 16 to 4.

The reason why I started the thread was, because I saw that the profiles/levels in the wikipedia article say that it limits ref frames as well, but it didn't in Handbrake, when I chose Main 3.0 for example.

I now change the setting in the advanced box and leave the rest of the values as they come from the "normal" preset (well, ok I alter RF, but that's it).

I tried adding something in the white box in Handbrake, but that didn't have an effect, while the advanced setting did limit the ref frames in the resulting video.

If I now update t version 1.0.7 of Handbrake, do I still have the advanced options? I saw screenshots of version 1.0.7 and it was missing the advanced panel.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by Woodstock »

The advanced panel CAN be accessed (disabled by default), but the functionality it had can be obtained by adding options on the Video tab.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by mduell »

BradleyS wrote: Thu Jul 06, 2017 12:57 amThe reason we limit refs and bframes to 5 (for the Super HQ presets that would otherwise use more, especially with animation) is compatibility. Certain other settings can add one ref or bframe, so this is as high as we can go, especially with certain Apple devices.
Aren't level limits the right way to do this?
Deleted User 11865

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by Deleted User 11865 »

Except they don't work. Some levels will allow up to 16 refs for low resolutions, and some (unfortunately numerous) broken devices will not be able to play the output.
Deleted User 11865

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by Deleted User 11865 »

Ideally x264 would have settings such as ref-max and bframe-max, but it doesn't.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by BradleyS »

Rodeo wrote: Sun Aug 13, 2017 11:49 pm Ideally x264 would have settings such as ref-max and bframe-max, but it doesn't.
This.
nhyone
Bright Spark User
Posts: 252
Joined: Fri Jul 24, 2015 4:13 am

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by nhyone »

What would be the difference between ref and ref-max, and bframe and bframe-max?

Doesn't the former already set the max to use?
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by BradleyS »

ref and bframes set the actual number to use, not a maximum or limit. Ideally there would be "up to" keys that allow capping the values without altering them if less than the maximum.
nhyone
Bright Spark User
Posts: 252
Joined: Fri Jul 24, 2015 4:13 am

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by nhyone »

Handbrake can always check the advanced settings and cap the limit. :D

From what I googled, only ref is limited by levels, bframes is not. And for the typical level 4.1, the two most common ref limits is 9 for 720p and 4 for 1080p.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by BradleyS »

> Handbrake can always check the advanced settings and cap the limit.

True, but we're not going to do that. Too much complexity for little gain, and it makes it harder to determine the behavior of the existing controls when there's magic under the hood... for one encoder.

> And for the typical level 4.1, the two most common ref limits is 9 for 720p and 4 for 1080p.

We limit to level 4.0 for 1080p30 for better compatibility with devices that claim level 4.1 support but impose bit rate and other limitations. And many devices (mostly Apple) are known to support no more than 5 refs and bframes.
Deleted User 11865

Re: Is it true that there is no big gain of using more than 5 reference frames?

Post by Deleted User 11865 »

nhyone wrote: Wed Aug 16, 2017 10:22 am Handbrake can always check the advanced settings and cap the limit. :D

From what I googled, only ref is limited by levels, bframes is not. And for the typical level 4.1, the two most common ref limits is 9 for 720p and 4 for 1080p.
Yep, and if you encode 720p at level 4.1 (or 4.0, makes no difference in terms of macroblocks in the DPB) with 9 ref frames, some devices won't play it back properly or at all. While this is a bug of said devices, it's common enough that we "need" to force a maximum of 5 :(
Post Reply