Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th March 2015, 23:56   #1  |  Link
NyaR
Registered User
 
Join Date: Nov 2012
Posts: 10
Closed & Unvariable GOP (keyint)

Hello comrades, I require a small clarification if you would be so kind as to assist.

The conundrum is as follows: I want to make a Closed GOP video per YouTube Advanced Encoding Settings. However in the x264 config I am presented with two choices: --keyint --min-keyint , there is also an option to set GOP Calculation to Fixed or FPS Based. My intention is to set the GOP to 30, unvariable. If I set Maximum and Minimum GOP size to 30 the command line outputs -keyint 30 --min-keyint 16, if I set 0/30 it makes --keyint infinite --min-keyint 1, 30/0 makes --keyint 30 --min-keyint 1

With that considered the question is as follows: how to make "Closed GOP. GOP of half the frame rate."?



NyaR is offline   Reply With Quote
Old 11th March 2015, 03:33   #2  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
They simply mean do not use --open-gop and set --keyint. Leave --min-keyint at default.
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 11th March 2015, 04:09   #3  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
I wuz gonna say the same, but you beat me to it:

Quote:
Originally Posted by NyaR View Post
With that considered the question is as follows: how to make "Closed GOP. GOP of half the frame rate."?
I'm gonna guess that "GOP of half the frame rate" here means GOPs should be one-half second in duration, at most. (Why they should want that, I don't know. Short GOP specs are normally for seek-ability, but since YouTube re-encodes the video anyway, this makes no sense to me). In the dialog in the screen shot, that would be set by selecting GOP calculation=FPS based, max GOP=12 (25/2 or one-half second).

There's no need to force any minimum GOP size IMHO. You want to allow x264 to start new GOPs at scene changes as it normally does. Since there is no "default" or "auto" minimum in MeGUI, I would set min GOP to 1.

EDIT I see you have set --tune-zerolatency; this does nothing for you as far as YouTube goes - it's for live video.

Last edited by raffriff42; 11th March 2015 at 04:29. Reason: zerolatency
raffriff42 is offline   Reply With Quote
Old 11th March 2015, 11:51   #4  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
Two cents from my side - min-keyint may be useful to brake scene detection (as such scenecut and pre-scenecut can be controlled separately).

AFAIR GOP size advised for H.264 is around 1 - 1.25 second

Quote:
For H.264/AVC or HEVC, the maximum time interval between successive RAP pictures shall be less than or equal to
1,28 seconds. This value accommodates variations either due to non-integer frame rates or GOP lengths that are a
power of 2 up to 32 frames for interlaced video, and up to 64 frames for progressive video. While the 1,28 seconds
value is derived for a GOP of 32 frames for 25 Hz, the corresponding value is 1,068 seconds for frame rates of
30 000/1 001 Hz. It is strongly recommended that the maximum time interval be less than or equal to 1,068 seconds for
frame rates of 30 Hz, 30 000/1 001 Hz, 60 Hz and 60 000/1 001Hz
Digital Video Broadcasting (DVB);
Specification for the use of Video and
Audio Coding in Broadcasting Applications
based on the MPEG-2 Transport Stream
DVB Document A157
March 2015
pandy is offline   Reply With Quote
Old 11th March 2015, 12:02   #5  |  Link
vivan
/人 ◕ ‿‿ ◕ 人\
 
Join Date: May 2011
Location: Russia
Posts: 643
Advised for DVB, because waiting while switching channels sucks.

For offline playback and with not terrible encoders there's no reason to waste that much bitrate on frequent keyframes.
vivan is offline   Reply With Quote
Old 11th March 2015, 13:11   #6  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
Quote:
Originally Posted by vivan View Post
Advised for DVB, because waiting while switching channels sucks.

For offline playback and with not terrible encoders there's no reason to waste that much bitrate on frequent keyframes.
Advised for broadcast (so i assume ATSC have similar guidance) - there is huge difference between PC playback and non PC playback - side to this usually request like OP are due some special functionality required from stream and quality of video is meaningless (for example channel switching measure need to be done in exactly static conditions to simplify setup and receive repeatable results) - when special functionality is required from stream then there is no wasted bits - this is how i understand question.

btw in headends without statistical multiplexing (i.e. most of stream based headends) adaptivity may be not optimal as it is not controllable and frequently lead to mux overload - usually fixed GOP & CBR can provide better results in such environment as less stuffing may be reserved to accommodate VBR (average video quantizer will be lower) - for adaptive headend you need to have reencoders...

Last edited by pandy; 11th March 2015 at 13:15.
pandy is offline   Reply With Quote
Old 11th March 2015, 19:24   #7  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
Quote:
Originally Posted by pandy View Post
Advised for broadcast (so i assume ATSC have similar guidance) - there is huge difference between PC playback and non PC playback - side to this usually request like OP are due some special functionality required from stream and quality of video is meaningless (for example channel switching measure need to be done in exactly static conditions to simplify setup and receive repeatable results) - when special functionality is required from stream then there is no wasted bits - this is how i understand question.
This isn't such a use case, this is for uploading to YouTube.
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 16th March 2015, 11:31   #8  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
Quote:
Originally Posted by Asmodian View Post
This isn't such a use case, this is for uploading to YouTube.
Then whole topic is irrelevant as YT will reencode video anyway.
pandy is offline   Reply With Quote
Old 19th March 2015, 20:51   #9  |  Link
kieranrk
Registered User
 
Join Date: Jun 2009
Location: London, United Kingdom
Posts: 707
Quote:
Originally Posted by pandy View Post
Then whole topic is irrelevant as YT will reencode video anyway.
The reason Youtube suggests closed gop is to aid their slicing algorithm I assume.
kieranrk is offline   Reply With Quote
Reply

Tags
gop, keyint, youtube


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:28.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.