ffmpeg - 如何使用 libav ffmpeg 从 h264 视频中获取 sps 结构

标签 ffmpeg h.264 decoder libav

对于我的硬件解码器,我需要了解有关视频编解码器(如 h264)的其他编解码器规范?如何使用 libav ffmpeg 提取低级编解码器信息?

我需要的数据:https://www.ffmpeg.org/doxygen/2.7/structSPS.html

最佳答案

您可以查看流中的每个 NALU 以查找 SPS ( nalu[0] & 0x1F == 7 ),也可以查看 AVCodecContext.extradata 指向的 AVCC 数据并按此处所述解析它:

http://aviadr1.blogspot.com/2010/05/h264-extradata-partially-explained-for.html

关于ffmpeg - 如何使用 libav ffmpeg 从 h264 视频中获取 sps 结构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16226810/

相关文章:

Android ffmpeg 和硬件加速

c - 在 C 中使用 x264 和 AVCodec 编码 RGB 帧

iphone - 在 iOS 中将 h263 转换为 h264

python - 从 rtsp H.264 视频流中捕获单个图像

neural-network - 自编码器 : Is the decoder the mirrored version of the encoder?

java - netty 4 泄漏 : ByteBuf was GC'd before being released correctly

ffmpeg - 将图像序列转换为相反顺序的视频

audio - 如何使用 mkvmerge 和外部时间码强制 A/V 同步?

H264 @ 1fps 的 FFmpeg AVI 录制不起作用

java - 编码Base64找不到符号错误