Gregleto
24th October 2013, 19:05
So I’m trying to resolve a mystery related to GOP settings… specifically when it is reported as (M=x, N=x). Every once in a great while, for reasons I’ve NEVER been able to uncover, MediaInfo will report a value in a field called “Format settings, GOP”. It is almost never reported on our files, but recently I noticed an instance where it was reported on one of our files as M=1, N=120. Since I hate seeing aberrations, (especially those I can’t explain :confused:), I decided to dig a little deeper.
Based on my research, I believe that M represents the distance between two anchor frames (I or P)… or when B frames are used, the size of the BP groups. Please correct me if this is wrong.
Since this file is BASELINE profile it won’t have B frames, so M=1 makes perfect sense to me. However, my research indicates that the “N” value represents the GOP size (number of “I” and “P” frames in a GOP)… or in instances where B frames are used, the number of BP groups and I frames per GOP. Again, please correct me if this wrong as well.
If my previous assumptions are correct, here’s the “N” related mystery to me…
Since our Baseline profile file has no “B” frames, 120 seems like an especially long GOP size. In most other instances where I’ve seen these numbers reported (YouTube files and elsewhere), I’ve generally seen much smaller “N” numbers… more like M=1, N=33.
My puzzlement is compounded by the fact that our file has the keyint set at 120, so it seems like too much of a coincidence that our keyint is precisely the same number as MediaInfo is reporting at the GOP size… unless they are equivalent. But we have scenechange set at default (40), and there are definitely scene changes in this video, so that means we must be dropping IDR frames at scene changes.
All of this raises a couple of questions…
1. Does ANYONE understand what makes MediaInfo report the M and N values? There has to be a reason it does it for some files and not others.
2. Am I correct that the “N” value is supposed to represent GOP length?
3. What actually defines the length of a GOP in x264, and what relationship do IDR I frames and non-IDR I frames have on defining GOP length?
Sorry for the longwinded questions, but the seemingly inconsistent reporting of these M and N values have been bugging me for a while.
Thanks,
Gregleto
Based on my research, I believe that M represents the distance between two anchor frames (I or P)… or when B frames are used, the size of the BP groups. Please correct me if this is wrong.
Since this file is BASELINE profile it won’t have B frames, so M=1 makes perfect sense to me. However, my research indicates that the “N” value represents the GOP size (number of “I” and “P” frames in a GOP)… or in instances where B frames are used, the number of BP groups and I frames per GOP. Again, please correct me if this wrong as well.
If my previous assumptions are correct, here’s the “N” related mystery to me…
Since our Baseline profile file has no “B” frames, 120 seems like an especially long GOP size. In most other instances where I’ve seen these numbers reported (YouTube files and elsewhere), I’ve generally seen much smaller “N” numbers… more like M=1, N=33.
My puzzlement is compounded by the fact that our file has the keyint set at 120, so it seems like too much of a coincidence that our keyint is precisely the same number as MediaInfo is reporting at the GOP size… unless they are equivalent. But we have scenechange set at default (40), and there are definitely scene changes in this video, so that means we must be dropping IDR frames at scene changes.
All of this raises a couple of questions…
1. Does ANYONE understand what makes MediaInfo report the M and N values? There has to be a reason it does it for some files and not others.
2. Am I correct that the “N” value is supposed to represent GOP length?
3. What actually defines the length of a GOP in x264, and what relationship do IDR I frames and non-IDR I frames have on defining GOP length?
Sorry for the longwinded questions, but the seemingly inconsistent reporting of these M and N values have been bugging me for a while.
Thanks,
Gregleto