[Libav-user] Parsing H264 SPS and PPS nal unit types
syed MUTIUR rahman
syedmutiurrehman at gmail.com
Fri Jul 31 07:12:30 CEST 2015
Hi to all
Is there any material or book to understand the whole ffmpeg library code.
On Thu, Jul 30, 2015 at 12:50 PM, Ivan Roubíček <Ivan.Roubicek at zld.cz>
wrote:
> [image: Boxbe] <https://www.boxbe.com/overview> This list is about using
> libavcodec, libavformat, libavutil, libavdevice and libavfilter. (
> libav-user at ffmpeg.org) is not on your Guest List
> <https://www.boxbe.com/approved-list?tc_serial=22138450442&tc_rand=447008047&utm_source=stf&utm_medium=email&utm_campaign=ANNO_MWTP&utm_content=001&token=vkoF%2FG4Y2lxxgarRbeTerrPtoFLWZonPCXvh0PfyoENN51w9i9bSGJWWAHFfPlKT&key=kP1O327jOOgGVyNTV7nxijWN5U%2BqiP9ieZdw1tcrfNM%3D>
> | Approve sender
> <https://www.boxbe.com/anno?tc_serial=22138450442&tc_rand=447008047&utm_source=stf&utm_medium=email&utm_campaign=ANNO_MWTP&utm_content=001&token=vkoF%2FG4Y2lxxgarRbeTerrPtoFLWZonPCXvh0PfyoENN51w9i9bSGJWWAHFfPlKT&key=kP1O327jOOgGVyNTV7nxijWN5U%2BqiP9ieZdw1tcrfNM%3D>
> | Approve domain
> <https://www.boxbe.com/anno?tc_serial=22138450442&tc_rand=447008047&utm_source=stf&utm_medium=email&utm_campaign=ANNO_MWTP&utm_content=001&dom&token=vkoF%2FG4Y2lxxgarRbeTerrPtoFLWZonPCXvh0PfyoENN51w9i9bSGJWWAHFfPlKT&key=kP1O327jOOgGVyNTV7nxijWN5U%2BqiP9ieZdw1tcrfNM%3D>
>
> Hello guys,
>
> what would be the correct way to parse H264 SPS nad PPS so I can get
> width, height, etc.
>
>
>
> I’m trying something like this but it does nothing
>
>
>
> AVCodecParserContext *parser = av_parser_init(AV_CODEC_ID_H264);
>
>
>
> AVCodec *pCodec = avcodec_find_decoder(AV_CODEC_ID_H264);
>
> AVCodecContext *pCodecCtx = avcodec_alloc_context3(pCodec);
>
>
>
> pCodecCtx = avcodec_alloc_context3(pCodec);
>
>
>
> uint8_t* poutbuf = nullptr;
>
> int poutbuf_size = 0;
>
>
>
> int len = av_parser_parse2(parser, pCodecCtx, &poutbuf, &poutbuf_size,
> pSps, sps_size, 0, 0, 0);
>
>
>
> Best regards Ivan
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
>
--
syed mutiur rahman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20150731/e28b322a/attachment.html>
More information about the Libav-user
mailing list