Reputation: 25
I'm trying to check if a NAL unit is valid. I found that the video packets have PID 256 and are encoded in H.264/AVC. I filtered the packets that have PUSI as true and apparently they all start a NAL unit. Example of a packet:
00 00 00 01 E0 00 00 80 C0 0A 31 00 43
C9 25 11 00 43 58 A5 7B 40 8D 5D 35 6C 78 F9 25 45 CB CC 18 AC 6F AE 7C
64 84 0E A2 C0 E5 AA BD 7C 6F 3D 3E 55 6D 24 20 DD 73 12 CF C5 73 6D 33
16 36 8A CB 2F 16 35 F7 D1 CC 7D 80 7B 77 6F EB 25 13 80 51 60 5D 88 98
51 5B C9 C5 C1 96 83 8C 04 A3 DA B5 ED 37 FA 6E 3A 6E 5D 36 00 1E 28 0F
47 56 05 2B B9 B9 2F 38 1D 17 B5 12 91 45 2C 79 3D AE 31 D7 DF EC 28 B4
18 52 9E BD F0 78 16 A9 6E E3 F9 90 66 EC 80 7A 12 BC 0F 23 AE 45 C1 64
AB B9 F0 00 00 00 00 00 01 09 F0 00 00 00 01 41 9A 23 6C 43
So, 0xE0 would be the NAL Unit Header, which would be 11100000
in binary. But it would result in banned_zero_bit/forbidden_zero_bit equal to 1 (true), which would indicate an error or that the packet is not compliant with the standard. Should I ignore the packet or should I analyze the other points to see if the packet might still be partially valid? After all, all packets that contain PUSI as true have 0x0E as the NAL Unit Header. However, the video plays normally in video players, that is, the video is not corrupted. What action should I take?
edit
I discovered that what I was analyzing was not the start of a NAL unit, but rather of a PES Packet, and the value 0xE0 corresponds to the stream ID
Upvotes: 1
Views: 60