[FFmpeg-user] Extract Header Data For Hardware Decoder

Piyush Verma piyush.pv at gmail.com
Sat Aug 18 14:52:00 CEST 2012

Hello Friends,

I was trying to use ffmpeg as container format parser and use hardware
codec of embedded board.

The problem is embedded decoder must need to pass header data which
hardware used to initialise it's system.

I believe FFmpeg also search for header data in file to initialise it's

Is there any way to get that header data from ffmpeg to pass to hardware
decoder ?

Here is some use case.

I use libavformat to parse a raw h264 file this file provided with demo
board and they have them own parser for h264 raw.

FFmpeg first packet size is 11733. which includes header togather.

Where demo parser first packet size is 21 and second packet size is 11712
where 21 + 11712 = 11733.

If I pass all together hardware decoder is not working. Besides not all
file first frame would be header data & different codec have different size.

It would be great if there would be a api to get header data with size.

Waiting for some information.

Thanks & Regards

Piyush Verma

More information about the ffmpeg-user mailing list