Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8151425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:23:07+00:00 2026-06-06T15:23:07+00:00

Some historic background: I’m currently working with Wowza and attempting to decode the AMFPackets

  • 0

Some historic background: I’m currently working with Wowza and attempting to decode the AMFPackets that come from the IMediaStream. The video packets will have a 5-byte header and the first packet is the codec configuration.

So far in my inspecting the codec configuration matches the ISO/IEC 14496-15 AVCDecoderConfigurationRecord layout. However, I’m having trouble decoding the SPS and PPS units.

The codec config packet including the 5-byte header:

17 00 00 00 00 01 4D 00 15 03 01 00 2F 67 4D 40 15 96 52 02 83 F6 02
A1 00 00 03 00 01 00 00 03 00 28 E0 60 03 0D 40 00 49 3E 7F 18 E3 03
00 18 6A 00 02 49 F3 F8 C7 0E D0 B1 68 90 01 00 04 68 EB 73 52

Flash/Wowza-specific first is the header:

17 00 00 00 00

  • 17 = 10111 = H.264 K frame
  • 00 = 0 = codec config packet
  • 000000 = 0 = start time 0

Next is the AVCDecoderConfigurationRecord (hex = decimal):

  • configurationVersion: 01 = 1
  • AVCProfileIndication: 4D = 77 (Main)
  • profile_compatibility: 00 = 0
  • AVCLevelIndication: 15 = 21 (2.1)
  • 6 bits reserved + lengthSizeMinusOne: 03 = 00000011 = 3 (4 bytes)
  • 3 bits reserved + numOfSequenceParameterSets: 01 = 0001 = 1
  • sequenceParameterSetLength: 002F = (47 bytes)
  • (SPS record 47 bytes long)
  • numOfPictureParameterSets: 01 = 1
  • pictureParameterSetLength: 0004 = (4 bytes)
  • (PPS record 4 bytes long)
  • (end)

SPS record (47 bytes):

67 4D 40 15 96 52 02 83 F6 02 A1 00 00 03 00 01 00 00 03 00 28 E0 60
03 0D 40 00 49 3E 7F 18 E3 03 00 18 6A 00 02 49 F3 F8 C7 0E D0 B1 68
90

Assuming this is a NAL unit containing SPS type:
(Using ITU-T H.264 06/2011 7.3.1 NAL unit syntax)

  • First byte: 67 = 1100111
  • forbidden_zero_bit: 1 (Oops, forbidden 0 bit set to 1?)
  • nal_ref_idc: 2
  • nal_unit_type: 0111 = 7 (SPS)

Assuming the SPS payload follow:
(Using ITU-T H.264 06/2011 7.3.2.1.1 Sequence parameter set data syntax)

  • profile_idc: 4D = 77 (Main, matches)
  • constraints + 2 bits reserved (equal to 0): 40 = 1000000 (Looks fine)
  • level_idc: 15 (2.1, matches)

Assuming this is only a SPS:
(Using ITU-T H.264 06/2011 7.3.2.1.1 Sequence parameter set data syntax)

  • profile_idc: 67 = 103 (I think this should be 77 like AVCProfileIndication?)
  • constraints + 2 bits reserved (equal to 0): 4D = 1001101 (Uh oh, reserved bit set?)
  • level_idc: 77 (Shouldn’t this be 21 like AVCLevelIndication?)

It looks like it’s the former NAL unit header + SPS record, and I doubt it’s bad data because every captured config packet is the same, but what throws me off is why is the forbidden 0 bit set to 1?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:23:09+00:00Added an answer on June 6, 2026 at 3:23 pm

    I found the problem… too much staring at 1’s and 0’s and you’ll miss one (pun intended).

    67 4D 40 15…

    Assuming this is a NAL unit containing SPS type: (Using ITU-T H.264 06/2011 7.3.1 NAL unit syntax)

    First byte: 67 = 1100111

    This is wrong because 1100111 is only 7-bits. I did the conversion using MS Calculator and it stripped the leading 0. The correct binary is 01100111, and there’s the forbidden zero bit.

    Thanks to those who attempted to solve this question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Some background info: I am currently writing a bootloader in protected mode while learning
Some fancy websites show an error dialog when it is detected that an untrained
Some one asked about How to connect to SQL server database from JavaScript? and
Some APIs only support output to files. e.g. a library that converts a BMP
Some background: I've created a Swing application which uses the Substance LaF (Thanks again,
I need some help on using this pre-historic application: hyperterminal. I need to send
I'm having some trouble getting an object to follow a path that is drawn
I am currently designing a dashboard feed that functions similar to the facebook feed.
Some time I ago I was working on a major refactoring of an old
Some time ago I've been thinking about how to hide from default page of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.