Why nvv4l2h264enc with udpsink is having low fps = 2 ? But with x264enc and udpsink it is showing 30fps

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson Xavier AGX)
**• DeepStream Version 4.0.1
**• JetPack Version 4.2.3

**• I am getting low fps =2 while using nvv4l2h264enc with udpsink, The same pipeline while using x264enc with udpsink is giving 30 fps. Can anyone help me in finding out the problem with using nvv4l2h264enc
**• pipeline with nvv4l2h264enc:
gst-launch-1.0 filesrc location= deepstream/deepstream_sdk_v4.0.1_jetson/samples/streams/sample_1080p_h264.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! m.sink_0 nvstreammux name=m batch-size=1 width=1920 height=1080 batched-push-timeout=4000000 ! nvof ! queue ! nvofvisual ! queue ! nvinfer config-file-path=deepstream/deepstream_sdk_v4.0.1_jetson/samples/configs/deepstream-app/config_infer_primary.txt batch-size=1 unique-id=1 ! nvvideoconvert ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc insert-sps-pps=true ! h264parse ! queue ! rtph264pay ! fpsdisplaysink text-overlay=false video-sink="udpsink" host= <host address> port=5600 -v

**• pipeline with nvv4l2h264enc with fakesink also gives 30 fps

gst-launch-1.0 filesrc location= /home/nvidia/deepstream/deepstream_sdk_v4.0.1_jetson/samples/streams/sample_1080p_h264.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! m.sink_0 nvstreammux name=m batch-size=1 width=1920 height=1080 batched-push-timeout=4000000 ! nvinfer config-file-path= /home/nvidia/deepstream/deepstream_sdk_v4.0.1_jetson/samples/configs/deepstream-app/config_infer_primary.txt batch-size=1 unique-id=1 ! nvvideoconvert ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! fpsdisplaysink test-overlay=false video-sink="fakesink" -v

1 Like

Hi,
Please set the properties in nvv4l2h264enc and try again:

  maxperf-enable      : Enable or Disable Max Performance mode
                        flags: readable, writable, changeable only in NULL or READY state
                        Boolean. Default: false

We suggest set maxperf-enable=1.

  idrinterval         : Encoding IDR Frame occurance frequency
                        flags: readable, writable, changeable only in NULL or READY state
                        Unsigned Integer. Range: 0 - 4294967295 Default: 256

We suggest set idrinterval=30.

And not sure if the linkage rtph264pay ! fpsdisplaysink is valid. Since we expect output of rtph264pay is packet-based, not frame-based. Not sure if it reports correct frame rate in this linkage, but it looks like you have seen correct result with x264enc.

1 Like

Thank you DaneLLL , I have set mtu property to 65000 in rtph264pay plugin. It gives me 30fps.