AW: Problem with h264parse element byte-stream output

Thornton, Keith keith.thornton at zeiss.com
Thu Sep 6 06:01:06 UTC 2018


Hi, a first buffer with length 28 might be an sps.

-----Urspr√ľngliche Nachricht-----
Von: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] Im Auftrag von Amit Pandya
Gesendet: Mittwoch, 5. September 2018 19:18
An: gstreamer-devel at lists.freedesktop.org
Betreff: Problem with h264parse element byte-stream output

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 ?

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


More information about the gstreamer-devel mailing list