GOP, B Frames and Codec Threads - What Do They Mean?


#1

When I am trying to export a project, I don’t use the presets because none of them work for me. All I want to is to export the project with the same quality as the file I was working on and none of those presets seem to do that.

Now, the options of GOP, B Frames and Codec Threads are under the codec tab in the export menu and I frankly have no idea what they mean.

Can someone please explain in layman terms what they mean so that I have an idea of what to select in those options? Additionally, what does the “Fixed” option in the GOP part do?

Thanks!


#2

What file type and encoding is the source file?
What is the intended destination for the final export?


#3

What file type and encoding is the source file?

Well, it depends on the file as I am speaking in general not about one specific project.

But the topic is about asking for a layman’s explanation for what GOP, B Frames and Codec Threads are that are found under the codec tab in the export menu.


#4

This page explains GOP, I and B frames pretty well. Click on the blue link.
https://vanillavideo.com/blog/2012/a-quick-intro-to-i-frames-and-gop-in-video-codecs

Codec threads refers to the capabilities of some modern codecs to process video in multiple threads for greater efficiency. If you have a four-core CPU then you may have the ability to use four threads. Some processors have so-called hyper-threading or virtual processors so that four cores can support four additional threads for eight total. Virtual processors are not twice as efficient as “real” processors, nevertheless, they do often improve efficiency. If you are a serious video hobbyist you will look for more cores/threads capability in your next PC. Anything to cut down wait time for encoding!

-=Ken=-


#5

One year later, and I have the same question…

The last poster shared a link the explains GOP and B frames, but only in the most basic way. No description of what typical settings should be or how changing the settings effects the outcome. Does anyone out there have a better explanation?


#6

#7

FYI - I have been googling, and youtubing and all the info I can find is a vague description of what it is, not specifically how it works with regards to exporting in shotcut. But thanks for getting your jollies off here.


#8

There is no easy answer to your question.
There are no typical settings with video recording or editing.
The above link that @kenj69 has posted is a really excellent general explanation.
If you don’t understand the terms, then do as @Steve_Ledger suggested by googling the terms, not just what’s in the title, but all of the terms listed in Ken’s link.

To give you an example. If you’re going to post to YouTube, they clearly define how they expect their videos to be prepared and specifically tell you exactly what you need. https://support.google.com/youtube/answer/1722171?hl=en Click on “Video codec: H.264” This only defines what one platform requires for video. But Shotcut is not just used for YouTube.

You’re probably not going to find a lot of information that you may understand online. You’ll have to dig through forums specifically for video editing to get your answers. There are college courses to online webinars.

There are somewhat standardized presets with Shotcut, but it gives you the flexibility to change these values if you see fit.

This is a support forum for the Shotcut, not video editing.


#9

Take it easy buddy, I’m no troll - do some research. I help many folks here. I was just suggesting to you that you could look at google, the info you require is easy to come by.
Using LMGTFY was just a bit of fun, lighten up :slight_smile:


#10

If you’re dealing with the H.264 codec, here is a book that fully covers the codec. But there are so many other codecs out there. It was wrote in 2010, yes 8 years old. But look at the used prices. May seem a bit pricey, but theres a reason for it. Accurate and reliable information.


#11

“This is a support forum for the Shotcut, not video editing.”

I’m not asking anyone how to edit. I’m asking for more information on an export setting that is within the shotcut program. Is that inappropriate?


#12

Nope, it isn’t. But your attitude to persons responding in good faith is.
We’re all friendly’s here. Chin up :wink:


#13

I didn’t give any attitude until my first, politely asked question was answered with LMGTFY.

PS. it was google that led me to this forum post in the first place.


#14

OK, so are you a Shotcut editor user who is asking about GOP, B Frames etc to help you understand the Shotcut software and encoding settings for your projects?


#15

@moonthink, Steve answered the original poster first - and with the appropriate questions. What do you have for digital assets and what do you want to do with them? Unless you ask the basic questions first people can only guess what you are having a problem with. Most people don’t need to fuss with GOP, I/P frames and so on. We use presets which are appropriate for 90 percent of projects. Truth is, if you don’t know what those adjustments are for then you shouldn’t be messing with them - the presets will do the job. Once you are experienced with digital encoding then you can experiment with the tweaks to see if you can actually make improvements over the presets. I know what those tweaks are but never use them because I prefer to keep things real simple. And I find the presets are good enough.

-=Ken=-


#16

I’m interested in knowing this too. The default GOP setting is 125 and number of B frames is 3 I think. If we increase or decrease these numbers what will happen to the video quality?


#17

This is the beauty of digital editing. Time to experiment. Just open one of your source video files in Shotcut. You don’t have to edit. Go to your Export tab. Click on Codec. Then go through the various Export Default settings. Just because one export default setting is actually set to a value doesn’t mean it’s the best setting for your project or computer. Do tests on various settings to see what you like. View your export on various media players before uploading to any website.
export preset youtube


#18

I think the honest answer is that nobody here knows. At least, that’s what I’m getting from the replies so far (google it, buy a book, just experiment).

If I find out anything of use, I’ll post it here – maybe it can be useful for someone else with the question.

So far, all I’ve been able to find out that might be relevant to some people, is that youtube recommends a (closed, whatever that means, maybe the checkbox for fixed?) GOP of half the frame rate (so 12 for 24fps, 15 for 30fps, 30 for 60 fps). But I’ve also seen settings in presets ranging from 1 to 120. B frames seem to be directly related to the GOP rate, but again I haven’t found anything useful online so far.

I’m assuming here, but I think people would have 2 main specific times for wanting to know GOP/B frame settings. One is youtube/vimeo, the other is trying to get highest quality close to lossless, for archival or master copy. People who don’t seem to know the answer can tell you to look it up, use the presets, or just experiment. But video editing is already such a time consuming process – by the time you’re ready for export, you want to be done messing around.

Hopefully someone will share their experience or possibly even a useful layman’s explanation.


#19

The honest answer is that it depends on your goals. GOP size and number of B frames are codec parameters that allow you to trade off quality, size, decode complexity and seek-ability of the file. Your original post said that you want it to be the same as your source file. So you would need to find out how your current file is encoded and then configure the Shotcut export to match.

In “laymen’s terms”, larger GOP and more B frames will increase the video quality for the same bitrate (or provide the same quality at a lower bitrate). But the file will be harder to decode and seeking to specific frames will be more difficult.

Fixed GOP means that frames in one GOP will not depend on frames from another GOP. This will reduce quality by a tiny amount in trade for the ability to split the file at GOP boundaries (as is done in some streaming applications).


#20

Well that’s the most useful info I’ve seen so far here.

My original post said…? I think you have me confused with someone else, I was just piggybacking. Though, that begs the question, how do you find out the gop/b frames in the source material? I don’t see anywhere where that information can be seen. I can find file name, basic codec (h264), resolution, bitrate, etc. but I don’t know how to read that info other than properties.

“In “laymen’s terms”, larger GOP and more B frames will increase the video quality for the same bitrate (or provide the same quality at a lower bitrate). But the file will be harder to decode and seeking to specific frames will be more difficult.”

That is helpful, thanks. So then a lower GOP rate would mean lower quality but faster decoding and seeking? B frames seem harder for me to understand than the GOP, tbh.