[FFmpeg-user] pict_type="I"

Mark Filipak markfilipak.imdb at gmail.com
Sat Jul 27 01:17:15 EEST 2024


On 17/07/2024 05.47, Oliver Fromme wrote:
-snip-
> Well, reading the [H.264] standard document itself is probably not a very
> good idea, unless you're already an expert and about to implement
> your own software from scratch.

Indeed. It's a decoder spec -- it specifies a so-called "HRD" (hypothetical reference decoder). It 
is prescriptive, not descriptive. But pretending there is anything more than so-called "access 
units" containing NAL-units and pretending that H.264 is anything like H.262 is not helpful.

> But there are heaps of secondary literature.  Just use the internet
> search engine of your choice -- it's actually difficult *not* to find
> useful information.
Well, if reading the specification is not fruitful, and there's lots of information on the Internet, 
where are those people getting their information, eh?

For example: AVC I- P- B-frames, I- P- B-pictures, and GOPs. There are no such things, yet I read 
about such things all the time. It's all nonsense. Who would I trust for good information on even 
harder topics, eh?

This regexp: [IPB][ -](picture|frame)|GOP|group_of_pictures
has a million hits in H.262. It has zero hits in H.264. AVC has been around for over 20 years. Are 
people just blind? Or are they kidding themselves? They are surely misleading other folks, aren't they?

> BTW, terms like "I-frame" are generic for video compression, not
> specific to H.264 or even MPEG.

Then why does H.262 define it?
"3.77 I-picture; intra-coded picture: A picture coded using information only from itself."

>  The standard itself might not call
> it like that, but the concept is there.

This is not a matter of opinion, Oliver. It's a matter of cold, hard words in H.262.

>   > I've taken my 40 second clip of a Criterion mastered video and am trying to parse it. The TS packets
>   > are 192 bytes.
> 
> TS packets are 188 bytes maximum.  It would have been helpful if you
> had included a hexdump of the first few packets of your file.

Here ya go: packets 0..4.

20 4D A0 0A 47 40 11 10 00 42 F0 25 00 01 C1 00 00 FF 01 FF 00 01 FC 80 14 48 12 01 06 46 46 6D 70 
65 67 09 53 65 72 76 69 63 65 30 31 77 7C 43 CA FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

14 BA 88 30 47 40 00 10 00 00 B0 0D 00 01 C1 00 00 00 01 E1 00 E8 F9 5E 7D FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

09 27 70 56 47 41 00 10 00 02 B0 23 00 01 C1 00 00 F0 11 F0 0C 05 04 48 44 4D 56 88 04 0F FF FC FC 
1B F0 11 F0 00 82 F1 00 F0 00 83 6C 89 19 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

3D 94 58 7B 47 50 11 30 07 50 00 07 F8 A3 7E 00 00 00 01 E0 00 00 80 C0 0A 31 00 3F FF E1 11 00 3F 
E2 8D 00 00 00 01 09 10 00 00 00 01 67 64 00 29 AC 1B 1A 50 1E 00 89 F9 70 11 00 00 03 03 E9 00 00 
BB 80 E2 60 00 04 69 26 00 00 72 70 E8 C4 B8 C4 C0 00 08 D2 4C 00 00 E4 E1 D1 89 70 F8 E1 85 2C 00 
00 00 01 68 EA 8D CE 20 13 43 43 C7 05 02 30 81 0E 61 11 91 00 9A 1A 1E 38 28 11 84 08 73 08 8C 42 
81 C8 70 22 10 0C 04 E1 22 09 10 2A 10 85 03 90 E0 44 20 18 09 C2 44 12 20 54 20 88 0B 42 02 44 0E 
17 14 30 59 48 28 50 B3 CC 28 50 91 2D 08 10 28 48 92 C8 20 42 12 56 88 21 1C B2

32 01 40 A1 47 10 11 11 19 17 21 8B 21 1A 34 D0 A0 C8 40 58 A1 C3 63 07 0D 29 06 0C 1A 79 86 0C 16 
24 A4 10 28 60 B1 65 90 50 A8 93 B4 61 04 12 E8 41 0E D1 88 E8 D8 89 9C 00 00 01 06 00 0A A1 D9 80 
00 02 1D 98 00 00 40 80 00 00 01 06 01 0C 00 00 03 02 09 08 00 CF EE 00 00 03 00 08 80 00 00 01 06 
06 01 C4 80 00 00 01 65 88 80 00 40 00 00 6B FF FA 7F F9 FF A8 FF 34 5B 60 10 3F FF FF 5F FF A5 1F 
7F C4 B8 86 DC 29 02 E9 B5 73 80 00 00 03 00 00 03 00 00 03 00 00 03 00 10 46 66 9A 00 00 03 00 00 
03 00 03 45 00 00 03 00 00 0A 64 00 00 03 00 00 2F E0 00 00 03 00 01 28 00 00 03

Those look like packets to me. You know, 0x47 is not a header, don't you? You know it is a sync-loss 
detector, don't you?

Packet 3 is the first one possessing a PES of any sort. It's video stream 0 (00 00 01 E0) (I think). 
It purports to contain slice 8 (00 00 01 09), slice 102 (00 00 00 01 67), and slice 103 (00 00 00 01 
68). But those can't be slices. They're way too small.

Packet 4 purports to contain slice 5, and slice 5, and slice 5 and slice 100...

If that's not enough, there's a single picture_start_code (00 00 01 00) about 35 seconds into a 40 
second video. The video's certainly not MPEG-2. It's not even remotely like MPEG-2.




More information about the ffmpeg-user mailing list