Problem with h264parse element byte-stream output

Nicolas Dufresne nicolas at ndufresne.ca
Wed Sep 5 23:13:41 UTC 2018


Le mer. 5 sept. 2018 13:27, Amit Pandya <amit4gst at gmail.com> a écrit :

> Hi all,
>
> Trying to decode H264 encoded file (mp4 container test_1280x720.mp4
> <
> http://gstreamer-devel.966125.n4.nabble.com/file/t376003/test_1280x720.mp4>
>
> ) using following pipeline.
>
> gst-launch-1.0 filesrc location=test_1280x720.mp4 ! qtdemux ! h264parse !
> 'video/x-h264, stream-format=(string)byte-stream' ! H264 decoder element
>
> For above pipeline first input buffer received by H264 deoder from
> h264parse
> seems not a complete frame (Refer first_buffer.264 first_buffer.264
> <http://gstreamer-devel.966125.n4.nabble.com/file/t376003/first_buffer.264>
>
> ) - size of only few (~28)bytes only
> Followed with rest of the first frame with second input buffer (Refer
> second_buffer.264 second_buffer.264
> <
> http://gstreamer-devel.966125.n4.nabble.com/file/t376003/second_buffer.264>
>
> ).
> This is creating issues with H264 decode element as it expects complete
> frame with first input buffer.
>
> Here, "stream-format=(string)byte-stream" is forced using caps on output of
> h264parse.
>
> Shouldn't this force h264parse to send complete frame as first input buffer
> for decoder ?
>

No, you also need to specify alignment=au for complete frames. Hopefully
this is all.


> For further tryouts dumped the byte-stream output of h264parse for the same
> mp4 file using below pipeline.
>
> gst-launch-1.0 filesrc location=test_1280x720.mp4 ! qtdemux ! h264parse !
> 'video/x-h264, stream-format=(string)byte-stream' ! filesink
> location=test_1280x720.264
>
> Now, If use this dumped .264 using following pipline then first input
> buffer
> received by H264 decoder from h264parse seems a complete frame (Refer
> first_buffer_elemenary_input.264 first_buffer_elemenary_input.264
> <
> http://gstreamer-devel.966125.n4.nabble.com/file/t376003/first_buffer_elemenary_input.264>
>
> )
>
> gst-launch-1.0 filesrc location=test_1280x720.264 ! h264parse !
> 'video/x-h264, stream-format=(string)byte-stream' ! H264 decoder element
>
> Need help to understand why h264parse element is behaving differently in
> above two cases of .mp4 container vs .264 elementary as input file.
>
> -Thanks
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180905/19ec7734/attachment.html>


More information about the gstreamer-devel mailing list