Problem with h264parse element byte-stream output

Amit Pandya amit4gst at gmail.com
Wed Sep 5 17:18:15 UTC 2018


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/


More information about the gstreamer-devel mailing list