The pipeline is OK.
gst-launch-1.0 filesrc location=/opt/nvidia/deepstream/deepstream-5.0/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! m.sink_0 nvstreammux name=m batch-size=1 width=1920 height=1080 ! nvinfer config-file-path=dstest1_pgie_config.txt ! nvvideoconvert ! nvdsosd ! nvvideoconvert ! ‘video/x-raw,format=I420’ ! avenc_mpeg4 bitrate=2000000 ! mpeg4videoparse ! mux.video_0 qtmux name=mux ! filesink location=test.mp4