[FFmpeg-devel] [BOUNTY] Generate H264 headers

Andrey Utkin andrey.utkin at corp.bluecherry.net
Sat Jul 18 02:13:51 CEST 2015


I'm working on Linux kernel driver for multimedia grabber and H264
encoder based on Techwell/Intersil 5864 chip. Of course it will be
open and pushed into upstream kernel repo.

The device produces H264 encoded data, but it lacks any headers. The
reference driver generates headers and glues frames together in code,
but I failed both reverse-engineering and porting that code. The code
of reference driver is overwhelmingly complicated, and I have no
knowledge how H264 bitstream is formed, that's why my attempts failed.

I have reached very limited success in forging bitstream, making
"frankenstein" files with headers cutted out from other files. This is
my best result:
https://s3.amazonaws.com/uploads.hipchat.com/13776/658891/zFizsxXjZTIdbsm/h264.png

So at this point I am confident that the hardware encodes frames
adequately and doesn't give garbage. But forming of correct stream is
still the task which I'm not able to complete in reasonable time. So I
want some H264 expert to help me to make up some brief code to handle
the limited set of cases, or consult me and point to exact places of
documentation which would help me to progress quickly (reading through
and comprehending entire H264 spec or x264 source is not an option in
available timeframe).

The code will work on kernel side, so no libraries.
The video source is analog camera (NTSC or PAL), so available
dimensions are D1 and CIF variants for these video standards.
Frame rate is from 1 FPS up to video standard's limit (30 or 24 FPS).

This archive contains 64 header-less compressed frames produced by the
device, some more helpful files and explanation how I've got my
results.
http://lizard.bluecherry.net/~autkin/tw5864_h264_forming_bounty.tar.gz
http://lizard.bluecherry.net/~autkin/tw5864_h264_forming_bounty/README
- this is a README included in this archive.

So I hope with above files it will be easier to check your ideas
quickly. If you need any other information, I'm ready to provide it.

My sad updates about this ongoing driver project, and different info
about the device itself, are here: https://lkml.org/lkml/2015/6/2/761


I will pay for any substantial help. Speed of our progressing is the
most important thing now - we're out of schedule with this product and
also I am going to get out of Internet in two weeks, for 3 weeks.

I hope to hear from anybody interested soon.

-- 
Bluecherry developer.


More information about the ffmpeg-devel mailing list