openh264 icon indicating copy to clipboard operation
openh264 copied to clipboard

extra data / SPS and PPS information

Open tino197 opened this issue 12 years ago • 3 comments

HI. Sorry for the beginner question. I need to send to decoder the "Extra Data" in avcC format. How can i extract this info from Encoder? If there is no such option then how do i extract the "Sequence parameter set" and the "Picture parameter set"

for writing the "Extra Data"

Thanks.

tino197 avatar Apr 27 '14 21:04 tino197

There is not an interface to extract the parameter set information. If you can run the encoder, you may set some breakpoints in WelsWriteSpsSyntax(), then you can print each of the members for information. Or if you can run the decoder, you may get the information similarly by in ParseSps().

huili2 avatar Apr 28 '14 01:04 huili2

1)I will try to put BP on WelsWriteSpsSyntax to get SPS. But what about the PPS? How can i get the PPS = "Picture parameter set" for writing the "Extra Data" ? 2) Is there an option to extract these 2 SPS/PPS from the encoder stream? I use the Console application code to write the encoded stream. Can i from these 2 in the stream itself - i.e like byte 10 to 100 in the stream for example ... 3)How can i extract the other field i need for the extra data which are: version profile compatibility level NAL units length size - 1

Thanks

tino197 avatar Apr 28 '14 10:04 tino197

  1. there's a similar func named "WelsWritePpsSyntax()" for PPS.
  2. you can open the encoded ".264" file with MS visual studio, and search 00 00 00 01 67 as the start of SPS, and 00 00 00 01 68 as the start of PPS. You can also try to use some bitstream analysis tools online to look into the bitstream. But they may not be free.
  3. you can modify the decoder with print information on ParseSps(), ParsePps() at specific place to get these information. Better way is to use tools mentioned above.

huili2 avatar Apr 29 '14 00:04 huili2