GStreamer pipeline inside docker conatiner produces low quality video

Hi,
We run the commands on r32.5.1/TX2 and don’t observe the issue. Please try

$ export DISPLAY=:0
$ xhost +
$ sudo docker run -it --rm --net=host --runtime nvidia  -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix nvcr.io/nvidia/l4t-base:r32.5.0

$ gst-launch-1.0 -v -e videotestsrc is-live=1 num-buffers=250 ! video/x-raw, format=\(string\)NV12, framerate=\(fraction\)25/1 ! nvvidconv ! nvv4l2h264enc ! h264parse ! matroskamux ! filesink location=test.mkv

And see if you can get same result.