View Single Post
Old 2nd June 2020, 15:08   #11  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
I did not understand it either, now I think I do.
Let's say you have keyint set to 50 frames. If you set gop-lookahead to eg. 25 frames, then x265 will look those 25 further ahead to see if it may be better to set an IDR frame somewhere there. It may decide that best IDR place will be eg. 10 frames after those 50, so you will end up with 60 frames GOP.
If you do the same, but set gop-lookahead=0 at those 10 frames pass 50 frames x265 will most likely set I frame (not an IDR). This will properly respect 50 frames maximum GOP.
With gop-lookahead your longest GOP is keyint+gop-lookahead.
I may be wrong
No idea how it's different than setting keyint=75

Quote:
--gop-lookahead <integer>
Number of frames for GOP boundary decision lookahead. If a scenecut frame is found within this from the gop boundary set by –keyint, the GOP will be extented until such a point, otherwise the GOP will be terminated as set by –keyint. Default 0.

Range of values: Between 0 and (–rc-lookahead - mini-GOP length)

It is recommended to have –gop-lookahaed less than –min-keyint as scenecuts beyond –min-keyint are already being coded as keyframes.

Last edited by kolak; 2nd June 2020 at 15:14.
kolak is offline   Reply With Quote