How get sps struct from h264 video with libav ffmpeg
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
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
链接地址: http://www.djcxy.com/p/67552.html