some questions about GOP

davinci_user999

New Member
im recording qp=0 (lossless) cpu:ultrafast on x264, and i have some questions about GOP.

lets say i recorded my videos with a certain GOP value. lets say 1 (keyint=1)
then i edit my video clips on a video editor to makes a video about something and upload to youtube;

1. if i set a GOP value to like 30 for my final export for my final edited video in the export settings (in my video editor), what happens?
will it collide with the original GOP1 setting? or is the original GOP value is now irrelevant and nothing collides with eachother and everything is fine like this is a pure GOP30 video now?
2. also wanna know the otherway around for the values, means if i record in a GOP value like 600 (which reduce the file size ofc for the raw recordings) and adding like GOP30 in the video export of the video editor , will it do any bad?

thanks.
 

koala

Active Member
If your video editor export is encoding the video itself, and not just cutting off start and end points at key frames without re-encoding, it creates a whole new video completely independent from the settings in the original video, so any GOP settings in the original video are completely independent from GOP settings in the export.
 

davinci_user999

New Member
thank you very much @koala

this raise another question about GOP,
which is,

in YouTube's "recommended" settings (which i mostly don't follow things like "recommended bit-rates" due to how bad they are) they say GOP should be half the FPS of the video (GOP30 for a 60FPS video),
BUT, since youtube gonna re-encode our videos anyway, ain't it gonna ignore the GOP we added for the upload?
(according to your answer, when re-encoded its a whole new video right?),
so, i guess we can consider YouTube's "recommended" GOP settings as pointless then?

means i can upload in whatever GOP i like and youtube gonna ignore that GOP and they gonna add their own GOP size for their youtube player and my uploaded GOP doesnt effect the quality? so is that means i can add like GOP600 to reduce my file size?

thanks again for answering :)
 

koala

Active Member
I don't know how relevant the recommended upload settings for Youtube actually are. Yes, they are recoding everything, so as long as you upload something that's possible to read by Youtube, it should be probably ok. The recommended settings are somewhat sane settings, so if you use these, some consistent quality is ensured. Some people tend to use incredibly stupid settings, then blame Youtube for not being able to process it. The recommendations are a way to ensure that something sane is being uploaded.

If you are curious about how Youtube's recoding is dealing with certain custom settings, just create a few test videos with arbitrary customized settings, then upload this and check how they turn out after Youtube processed them completely. If you keep those videos private and delete them afterwards, nobody except you will ever see them, even if subscribed to your channel.
 

davinci_user999

New Member
i did upload many many sample clips to youtube for weeks now to get to this point,
(like, started from HEVC 4:2:0: and ended up in x264 4:4:4: etc).

and i recently did some tests with GOP levels as well.
like uploading clips in a fixed cq level but with different GOP levels. etc.
didn't see a noticeable different with GOP levels so i wanted to confirm this to be safe.
so i asked about this as the previous question and got the answer from you :)

so when it comes to a size reduction that my internet can bear to upload, i guess i should focus more on keeping a high qp level than keeping a high GOP level in my final export :)

so, thanks again @koala , much appreciated :D
 

Tomasz Góral

Active Member
GOP - group of picture,
group start I frame.
YT suggest use 2-4 second if you use 60 fps, GOP is size is twice frame size, 60 * 2 sec = 120 frames.
Default GOP size is 10 sec., and some cameras use long GOP.

Frame type:
I - whole picture (like JPG), big size
P and B - only vectors and part of picture, small size

If you need low size stream use long GOP, but some services need I frame every X seconds, GOP forcing frame type I, frame type I some times occurs with scene detection (if screen change too much).
e.g. some codecs use 'All Intra' every frame is type I, bitrate for this is very high 100-400 Mb/s or more.

So:

if your stream is 30 FPS and size 6 Mb/s GOP every 60 frame, e.g. time 2 second, frame type 'I' use 2 Mb, for rest 59 frames you use 10 Mb, one frame got 0,169 Mb (on average)

If your stream is 30 FPS and size 6 Mb/s GOP every 120 frame, e.g. time 4 second, frame type 'I' use 2 Mb, for rest 119 frames you use 22 Mb, one frame got 0,184 Mb (on average)

As you see GOP every X second give more bits per frame.
 
Top