Problem with h264parse element byte-stream output
Amit Pandya
amit4gst at gmail.com
Fri Sep 7 15:16:00 UTC 2018
Hi,
Resolved the issue & follwoing are the details for reference/inputs,
Problem seems to be with the encode pipeline used to generate input h264
container file (test_1280x720.mp4) using following pipeline,
H264 encoder element ! 'video/x-h264, stream-format=(string)byte-stream,
alignment=(string)au' ! h264parse ! qtmux ! filesink
location=test_1280x720.mp4 -e
In above pipeline our h264 encoder send 1st buffer consisting only
"sps+pps"(~28 bytes) & 2nd buffer consist of the "first frame data".
Now, h264parse element seems sending this 1st "sps+pps" buffer as is to
qtmux considering first frame to be muxed with mp4 container.
Now, when try to decode such generated h264 container mp4 file then the
first buffer sent out by h264parse is same "sps+pps"(~28 bytes) buffer & not
the complete frame creating issue with the decode pipeline.
gst-launch-1.0 filesrc location=test_1280x720.mp4 ! qtdemux ! h264parse !
'video/x-h264, stream-format=(string)byte-stream, alignment=(string)au' !
H264 decoder element
For resolution of the issue handled this within our encoder merging first
two buffers making sure that first buffer sent out by encoder consist of
both "sps+pps+frame data" combined.
=> Also, Tried following experiment to further investigate comparative
behavior with H265.
Used follwing pipeline to generate input h265 container file
(test_1280x720_h265.mp4)
H265 encoder element ! 'video/x-h265, stream-format=(string)byte-stream,
alignment=(string)au' ! h265parse ! qtmux ! filesink
location=test_1280x720_h265.mp4 -e
In above pipeline our h265 encoder similraly send 1st buffer consisting only
"sps+pps" & 2nd buffer consist of the "first frame data".
h265parse element seems sending this 1st "sps+pps" buffer as is to qtmux
considering first frame to be muxed with mp4 container.
Now, when try to decode such generated h265 container mp4 file then the
first buffer sent out by h265parse is a complete frame (in contrast with
above observation from h264parse case)
gst-launch-1.0 filesrc location=test_1280x720_h265.mp4 ! qtdemux ! h265parse
! 'video/x-h265, stream-format=(string)byte-stream, alignment=(string)au' !
H265 decoder element
Hence, It appears h265parse element is able to handle such scenario & take
care of forming first output buffer consisting of complete frame out of two
separate buffers received(1st:sps+pps & 2nd:frame data).
Though h264parse is not taking care of forming complete frame & sends out
first frame consist of sps+pps buffer only.
Not sure if this is a bug with h264parse element or
should not expect handling of such scenario by h264pasre element considering
still gst-plugins-bad.
Any inputs are appreciated.
-Thanks
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list