Reputation: 678
For my HW decoder I need know additional codec specification about video codec like h264? How I can extract low level codec info with libav ffmpeg?
The data that I need: https://www.ffmpeg.org/doxygen/2.7/structSPS.html
Upvotes: 1
Views: 2672
Reputation: 31100
You can either look at each NALU in the stream looking for an SPS ( nalu[0] & 0x1F == 7 ) or you can take a look at the AVCC data pointed to by AVCodecContext.extradata and parse it as described here:
http://aviadr1.blogspot.com/2010/05/h264-extradata-partially-explained-for.html
Upvotes: 1