Getting Each h264 Frame

Timm Murray tmurray at wumpus-cave.net
Tue Jan 28 06:16:52 PST 2014


My app requires fetching each frame of an h264 stream, wrapping the frame
in custom headers, and then sending it over the network.

For testing, I'm using a raw .h264 file and trying to fetch each frame in a
fakesink.  On the command line, it's similar to this:

$ gst-launch-0.10 filesrc location=in.h264 ! h264parse ! filesink
location=out.h264

I would have expected out.h264 to be identical to in.h264.  And they are
the right size, but there are slight differences between them:

$ ls -l in.h264 out.h264
-rw-r--r-- 1 user group 100495 Jan 19 17:00 in.h264
-rw-r--r-- 1 user group 100495 Jan 28 08:00 out.h264
$ sha1sum in.h264 out.h264
2046b04ed23d3980d35c4819a97358113beb0f6c  in.h264
ef8233787e025dfc8aeb4b8f1a245014bb43d528  out.h264

Looking at them in a hex editor, in.h264 starts with 0x00000001, and
out.h264 starts with 0x0000000A.  There are a few other differences here
and there, too.  It's enough that mplayer doesn't detect the right filetype
and refuses to play in (in.h264 plays fine).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140128/b3e1b5a0/attachment.html>


More information about the gstreamer-devel mailing list