Getting Each h264 Frame

Chuck Crisler ccrisler at mutualink.net
Tue Jan 28 06:31:48 PST 2014


You need some detailed logging. If you are using linux, export
GST_DEBUG=h264parse:4 (or 5). You might also need logging for
filesrc/filesink. That would be:
export GST_DEBUG=filesrc:4,filesink:4,h264parse:4 Refer to the
documentation for GstInfo for more logging info.

The 0x00000001 is the h264 start code prefix. I would also expect that
h264parse would not have changed the bitstream and the output should start
with the same prefix.

What is the exact version of GStreamer and what OS are you using?


On Tue, Jan 28, 2014 at 9:16 AM, Timm Murray <tmurray at wumpus-cave.net>wrote:

> 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).
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140128/eb075444/attachment.html>


More information about the gstreamer-devel mailing list