I am using a Jetson Nano for an autonomous vehicle application which involves compositing video from 4 USB cameras and VP8 encoding the stream. The cameras that I’m using (ELP-USBFHD06H-L36) support streaming h264 encoded video and my gstreamer pipeline is essentially
appsink. The pipeline works well most of the time, however I am having issues whenever I reboot the Jetson Nano. The first time the pipeline is launched following a reboot, one or two of the cameras will have bad visual artifacts which will persist until the pipeline is destroyed and recreated. After the process has been restarted, the error will not occur again until the next reboot. Here is an image of the artifacts that I am seeing.
I have a found a minimal pipeline capable of reproducing this issue:
GST_DEBUG=2 gst-launch-1.0 -ev v4l2src device=/dev/tinymile/video_usb2.1_1 ! video/x-h264,width=640,height=360 ! nvv4l2decoder ! nvv4l2vp8enc ! matroskamux ! filesink location=test.mkv
Here are logs from running this command: logs.txt (9.0 KB)
I have noticed a few things while experimenting:
- This command can replicate the issue nearly 100% of the time, even if I wait a while after reboot
- Changing the caps to
video/x-h264,width=1920,height=1080will eliminate the problem and will even temporarily prevent the issue from reoccuring with
video/x-h264,width=640,height=360following reboot, however the issue always comes back eventually
- The actual video is vaguely visible (especially around the edges)
- The negotiated caps seem to be same in both the corrupted and uncorrupted cases
- The composited video can contain both corrupted and uncorrupted video streams which suggests that encoding is not the issue
Any ideas on what could be the cause of this or recommendations on how to debug this? I believe I could work around this issue by streaming 1920x1080 video and downscaling, however I would prefer if I could stream the video directly in 640x360.