View Full Version : x265: --no-open-gop ?
Forteen88
18th August 2018, 14:18
x265 --help
Slice decision options:
--[no-]open-gop Enable open-GOP, allows I slices to be non-IDR. Default enabled
I wonder, when should I set --no-open-gop ?
I'm mostly doing x265 CRF18 main10 preset-slower encodes, Blu-ray compatibility is not important to me, but GPU hardware-decoding is very important.
Thanks in advance.
FranceBB
18th August 2018, 16:06
I encode for Broadcast and all my files are closed GOP, ref2 and with keyint 1-24 for obvious reasons.
If you encode files for computers, bluray players or broadcast specs compatibility is not mandatory, so you can use Open GOP and a longer keyint, but I would personally stick with ref 4 and keyint 240 (max).
GPU generally support a certain level for decoding and it seems that it's generally level 5.1, so, as long as your specs are within that level, you are gonna be fine.
Forteen88
18th August 2018, 16:37
If you encode files for computers, bluray players or broadcast specs compatibility is not mandatory, so you can use Open GOP and a longer keyint, but I would personally stick with ref 4 and keyint 240 (max).Thanks again. But why not use --keyint fps*20 (fps=24 usually)? I've read someone here at doom9 writing that it saves like 1% bitrate, if I recall correctly. I don't need to change positions so much while playing a video (especially when I'm watching movies).
EDIT: @FranceBB, max-keyint = 10 x fps of video seems to be something I should set it to, since as you say, "people usually like < 10 second skips".
FranceBB
18th August 2018, 20:16
I assumed that you were dealing with 23.976fps contents, that's why I said 240 max, with the min-keyint = fps of video ('cause you generally don't want more than one I-frame in a second of video).
Increasing the keyint to fps x 20 saves a bit of space compared to min-keyint 1 keyint 24, that's true, but not so much compared to min-keyint 24 keyint 240.
Besides, max-keyint = 10 x fps of video is based on tolerance; I mean, you could gain some compression by having a max-keyint of 20 x fps of video, but I don't think it's worth it and I never tried to encode with higher keyint.
After all, keyint is selected to accommodate target restrictions or to keep seek intervals sane (even though you don't need seekability for your contents, people usually like < 10 second skips, that's why they set keyint=10*fps).
In other words, as far as I'm concerned, the minimum keyint interval should be equal to FPS, the maximum keyint interval should be equal to FPS x 10, nothing more, but you are free to make some tests and see which keyint is better for your needs. ;)
sneaker_ger
18th August 2018, 23:35
I would disable open GOP if:
- I plan on doing any (lossless) editing. Open GOP is a nightmare for that. Tools like mkvtoolnix don't handle it correctly.
- I encode for mp4. Some muxer/demuxers/players don't really like it.
So basically closed GOP is a bit safer/hasslefree, open gop can improve compression/quality a bit, especially if the keyint is low. Last time I looked x265 disables open gop for Blu-Ray. So I guess x265's open GOP isn't Blu-Ray compatible although Blu-Ray should support (specific variants of) open GOP.
Blue_MiSfit
19th August 2018, 04:13
No open GOP if you're doing ABR streaming (e.g. HLS / DASH), because players switch bitrates at IDR boundaries, so you'll end up with broken references.
MeteorRain
27th August 2018, 23:27
I use a fairly high max-keyint (sometimes 360, equals 15 or 12 seconds) and most of the time IDR is at scene cut, making open-gop not that useful. Sacrificing a bit efficiency in exchange for better compatibility is my way to go.
benwaggoner
28th August 2018, 18:12
I use a fairly high max-keyint (sometimes 360, equals 15 or 12 seconds) and most of the time IDR is at scene cut, making open-gop not that useful. Sacrificing a bit efficiency in exchange for better compatibility is my way to go.
Open GOP is definitely more useful with shorter GOPs. It was invaluable for DVD and HD DVD, which had a 0.6 second max GOP duration (14 frames @ 24p!). If your max GOP duration is shorter than typical shot duration, that's where Open GOP is most useful, as it reduces keyframe strobing by providing inter-GOP B-frames to blend changes.
When having to use fixed closed GOPs, the relatively new --radl feature can help a bit.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.