h264parse removes padding from byte streams
Submitted by Georg Lippitsch
Link to original bug (#764372)
Description
When using h264parse element without a conversion (bytestream to bytestream), it removes padding bytes from the original h264 stream. Producing a real constant bitrate is then not possible anymore.
This can be reproduced with the following command line (you need 10Bit libx264):
gst-launch-1.0 videotestsrc ! video/x-raw,width=1920,height=1080,format=I422_10LE,framerate=25/1 ! x264enc trellis=false option-string=avcintra-class=100 ! video/x-h264,stream-format=byte-stream ! h264parse ! mpegtsmux ! filesink location=test.ts
Every frame should then have exactly 568832 bytes. But checking the file test.ts with ffprobe gives different frame sizes for every frame. The frames sizes can be checked with:
ffprobe -show_frames test.ts | grep pkt_size
Removing the "h264parse" element from the above pipeline and checking the frame sizes gives the expected size of 568832 bytes for every frame.