Log in

View Full Version : HC & GOPs


EpheMeroN
4th July 2006, 05:41
I encoded an avi in HC v0.18 using the 'autogop' option enabled, and when authoring in MuxMan it reported an error stating that I exceeded the NTSC GOP Max of 36 with 38. What can cause this? Can applying 3:2 Pulldown make GOPs non-compliant (because the video was 23.976 so I had to apply pulldown to make it compliant)?

Here's the HC Log:

-----------------------------------------
| HCenc - MPEG2 encoder - rel. 0.18.0.0 |
-----------------------------------------

input: c:\video\new folder\booth\booth.av
output: c:\video\new folder\booth\booth.m2v

--------------------
| encoder settings |
--------------------

profile: BEST
frames: 0 106929
framerate: 23.98
aspect ratio: 16:9
bitrate Kb/s: 6500
max. bitrate Kb/s: 9100
pulldown: yes, 23.976 --> 29.97
closed gops: no
VBV check: yes
scene change det.: yes
interlaced: no
goplen,B-pic: AUTO
dc_precision: 10
scan method: ZIGZAG
bias: 15
chapter frames: 0
time code: 0 0 0 0
CPU: SSE2
matrix: MPEG

--------------------
| source stats |
--------------------

nr. of frames in source: 106930
width*height: 720*480
fps: 23.98
nr. of frames to encode: 106930
frames to encode: 0 - 106929

---------------------
| encoding - pass 1 |
---------------------

pass 1 encoding time: 3:49:31 (13771 s)
average fps: 7.8

--------------------------------
| encoding - intermediate pass |
--------------------------------

bitrate set to: 6500000 b/s
est. outfile length: 3538717 kB
intermediate encoding time: 1.5 s

---------------------
| encoding - pass 2 |
---------------------

pass 2 encoding time: 4:34:22 (16462 s)
average fps: 6.5

------------------
| encoding stats |
------------------

total encoding time: 8:23:57 (30237 s)

intra matrix used
8 16 19 22 26 27 29 34
16 16 22 24 27 29 34 37
19 22 26 27 29 34 34 38
22 22 26 27 29 34 37 40
22 26 27 29 32 35 40 48
26 27 29 32 35 40 48 58
26 27 29 34 38 46 56 69
27 29 35 38 46 56 69 83

non-intra matrix used
16 17 18 19 20 21 22 23
17 18 19 20 21 22 23 24
18 19 20 21 22 23 24 25
19 20 21 22 23 24 26 27
20 21 22 23 25 26 27 28
21 22 23 24 26 27 28 30
22 23 24 26 27 28 30 31
23 24 25 27 28 30 31 33

nr. of gops: 7461
nr. of frames: 106930
nr. of I-frames: 7461
nr. of P-frames: 30044
nr. of B-frames: 69425
average quant (non linear): 2.312
VBV underflows detected: 552
VBV underflows fixed: 552
minimum bitrate: 146
maximum bitrate: 9099
average bitrate: 6500


Here's the MuxMan Log:
MuxMan version 0.15P
Accepted video C:\Video\New Folder\booth\booth.m2v size = 3623528565
Accepted audio C:\Video\New Folder\booth\movie\audio.ac3
Opened sub 1 file C:\Video\New Folder\booth\movie\SubTitle-ID_en_0x20.sup.
Opened sub 2 file C:\Video\New Folder\booth\movie\SubTitle-ID_es_0x21.sup.
Opened script file C:\Documents and Settings\xxxxxxx\Desktop\booth.mxp
Accepted video C:\Video\New Folder\booth\booth.m2v size = 3623528565
Accepted audio C:\Video\New Folder\booth\movie\audio.ac3
Opened sub 1 file C:\Video\New Folder\booth\movie\SubTitle-ID_en_0x20.sup.
Opened sub 2 file C:\Video\New Folder\booth\movie\SubTitle-ID_es_0x21.sup.

10:19:54 Begin multiplex VTS01.
Title Segment List
Segment_1
Encoded stream 20 is script stream 1.
Encoded stream 21 is script stream 2.
Maximum audio duration 267296 fields.
Starting scene Segment_1_scn1 at 00:00:00:00
Starting scene Segment_1_scn2 at 00:02:47:00, requested for 00:02:46:20
Starting scene Segment_1_scn3 at 00:05:33:22, requested for 00:05:33:10
Starting scene Segment_1_scn4 at 00:08:20:07, requested for 00:08:20:00
SeqEnd at D7FAA871.
Bytes remaining in buffer = 0.
Bitrate - avg: 6884622, min: 413498 (lba 5876), max: 9767495 (lba 1141678).
Shortest GOP has 3 fields, longest GOP has 38 fields.
Fields: 267325, VOBU: 7207, Sectors: 1874056.
Largest GOP of 38 fields exceeds DVD specification of 36, resulting DVD is non-standard.

11:01:28 Begin multiplex VMG.
11:01:28 End multiplex.
1 oddities detected, resulting DVD is non-standard. Check log for details

dragongodz
4th July 2006, 05:50
Can applying 3:2 Pulldown make GOPs non-compliant (because the video was 23.976 so I had to apply pulldown to make it compliant)?
yes. though hank315 was meant to have put in some code so it wouldnt. it is possible there is a little bug where it may be failing. i would suggest manually setting GOP size for the moment, until hank315 can look at this.

EpheMeroN
4th July 2006, 06:12
Since NTSC max is 18, what should I lower it to? 17, 16?

Also, what does the # of B-frames do? Does it affect this GOP ordeal, or quality of the video?

Finally, checking the "closed GOPs", does that concern me in any way because I never check that option?

dragongodz
4th July 2006, 06:48
Since NTSC max is 18, what should I lower it to? 17, 16?
i cant remember offhand if it was 15 or under 15 was safe to use. it was talked about some time ago but since i live in a PAL country its not something i have had to really worry about or remember. :)
so you could try to search for it in this section or give 15 a try.

Also, what does the # of B-frames do? Does it affect this GOP ordeal, or quality of the video?
B frames effects on quality will be very dependant on the type of footage and what settings you are using, i.e bitrate etc. in general, and i mean very general before anyone tries to point to a clip where its otherwise, B frames are a good thing.

Finally, checking the "closed GOPs", does that concern me in any way because I never check that option?
only if you plan on editing the footage or are doing a dvd with angles should you need to worry about using closed GOP.

Abond
4th July 2006, 10:09
For NISC 29.97 no pulldowned video - 18 GOP max
For NTSC 23.976 progressive (that would be pulldowned afterwards) - 12 GOP max. In this case 15 GOP would yield the same error in muxman after the pulldown.

dragongodz
5th July 2006, 02:09
12 GOP max
thats not strictly true. i remember from the discussion before hank315 said they can be longer but there was certain limits etc. you would have to find the conversation to get it all. i do agree however that 12 is probably a good safe number.

Tropican
3rd August 2006, 16:02
thats not strictly true. i remember from the discussion before hank315 said they can be longer but there was certain limits etc. you would have to find the conversation to get it all. i do agree however that 12 is probably a good safe number.

Actually I think someone quoted this: http://forum.mainconcept.com/viewtopic.php?p=5891#5920

Usually HC and other encoders don't do 15-9-15 frame GOP patterns, so generally speaking problems resulting from this would be rare but could still occur, AFAIK.

hank315
3rd August 2006, 18:14
Yep, this has already been discussed before.

Seems there are two different opinions here, Muxman counts the displayed frames/fields (after pulldown) and Brent Beyeler counts the physical frames in the bitstream.
I'm not an authoring expert, maybe mpucoder could shed some light on this subject.

One thing is for sure, the VOBU display duration should be between 0.4 and 1.0 sec.
This limits the nr. of possible GOP combinations, for PAL a GOP combination of 15-9-15 after pulldown won't fit into a VOBU.
For NTSC a lot of GOP combinations aren't allowed, HC will not use any of these illegal combinations for PAL or NTSC so every GOP length <= 18 should be valid for pulldown.
Of course you will get the warnings from Muxman because it counts the displayed frames/fields.

Tropican
3rd August 2006, 20:36
Seems there are two different opinions here, Muxman counts the displayed frames/fields (after pulldown) and Brent Beyeler counts the physical frames in the bitstream.

How is it counted in the actual DVD-spec? Or is it completely up to the multiplexer?

dragongodz
4th August 2006, 07:22
How is it counted in the actual DVD-spec?
i dont think you will find many people here that actually have the specs, look at the price and i dont even know if they would sell them to the average person. even if they did havew them i believe there is a non-disclosure you have to sign aswell so you couldnt discuss it even if you did have them.

Seems there are two different opinions here, Muxman counts the displayed frames/fields (after pulldown) and Brent Beyeler counts the physical frames in the bitstream.
personally i would err on the side of caution and go with the actual displayed amount. this seems to hit bitrate aswell for example where for pulldown you need to set a smaller max bitrate or some dvd players and authoring programs do not like it, report higher than allowed max.

bigotti5
4th August 2006, 09:12
The GOP length restriction is based on displayed frames - not encoded frames.

Two max length GOPs (presentation period) has to fit within 1,2 seconds.

Two 18 frame encoded GOPs and pulldowned will display for more than 1,5 seconds

From Philips verifier manual


(ref. DVD-3 5.1.1)
A VOBU represents a presentation period of at least 0.4 seconds.
A VOBU except the last VOBU of a cell shall represent a presentation period of at most 1 second. The last VOBU of a cell shall represent a presentation period of at most 1.2 seconds.

Tropican
4th August 2006, 17:34
Two 18 frame encoded GOPs and pulldowned will display for more than 1,5 seconds

Weren't we talking about 15vs12 though? Or am I that confused right now?

bigotti5
4th August 2006, 18:19
Weren't we talking about 15vs12 though

two 15 frame GOPs come up to 38 frames after pulldown

Tropican
5th August 2006, 02:18
So this is the math, right?

15 x 1.25 (the pulldown) = 18.75 = 38 fields. (2 over the 36 NTSC standard)

Two 18 frame encoded GOPs and pulldowned will display for more than 1,5 seconds

Wouldn't it display for 1.3 seconds? (38/30) Its still not within DVD specs, but it can't be 1.5 unless things are being displayed at 24fps, which wouldn't occur even if you had a progressive scan player as pulldown flags should simply be ignored, right?

this seems to hit bitrate aswell for example where for pulldown you need to set a smaller max bitrate or some dvd players and authoring programs do not like it, report higher than allowed max.

This might seem like a silly question, but how much lower of a max bitrate?