gsth264pay fails to detect AU when ended with filler NALU

Gregor Boirie gregor.boirie at parrot.com
Mon Mar 16 06:22:21 PDT 2015


Greetings,

I'm trying to stream a cam with "zero lantency" using a pipeline
connected to a downstream RTP bin. Capture / encode pipeline is similar
to this:

v4l2src ! videoconvert ! \
x264enc \
    tune=zerolatency intra-refresh=true aud=false \
	bitrate=3000 option-string="nal-hrd=cbr" ! \
rtph264pay pt=96

As you can see, x264enc is setup to encode at Constant Bit Rate. In this case,
x264 uses filler NAL units when resulting encoded picture is to small to 
guarantee specified bit rate.

Even when upstream element produces AU aligned buffers, rtph264pay fails to
find Access Unit boundaries since it uses the following logic to perform
detection:

*****
IS_ACCESS_UNIT (nalType) && end_of_au
*****

with :
- end_of_au set to true for the last NAL unit of the AU aligned buffer
and
- IS_ACCESS_UNIT(x) (((x) > 0x00) && ((x) < 0x06)

IS_ACCESS_UNIT macros is to restrictive since it ignores the filler data NAL
unit type (12).  Same question arises for :
- access unit delimiter (9)
- others ??

Are there any H.264 experts that might confirm / infirm this ? Especially:
- which NALU types should be selected ?
- should the DTS be taken into account ?
With respect to progressive vs interlaced structure.

Regards.

-- 
Gregor


More information about the gstreamer-devel mailing list