dusty-nv / jetson-containers

Machine Learning Containers for NVIDIA Jetson and JetPack-L4T
MIT License
2.22k stars 456 forks source link

Upgrade from 6.0 to 6.1 breaks WebRTC - coredump - 'sinkpad' should not be nullptr #687

Open TangmereCottage opened 1 day ago

TangmereCottage commented 1 day ago

@dusty-nv thanks for NanoLLM for CUDA=12.6 - works well!!

However, when I invoke it with:

sudo jetson-containers run $(autotag nano_llm) \
  python3 -m nano_llm.agents.video_query --api=mlc \
    --model Efficient-Large-Model/VILA1.5-3b \
    --max-context-len 256 \
    --max-new-tokens 32 \
    --video-input /dev/video0 \
    --video-output webrtc://@:8554/output

and then go to https://192.168.X.X:8554 to view the output, nano_llm core dumps due to 'sinkpad' should not be nullptr. I'm invoking this from the Orin - the same thing happens for https://127.0.0.1:8554 etc.

This is a known issue (see related discussion in jetson-inference https://github.com/dusty-nv/jetson-inference/issues/1619) and so I've disabled #enable-webrtc-hide-local-ips-with-mdns in chrome://flags, which did not help. The other suggestion has to do with the STUN server, but enabling/disabling that did not help.

Anyone out there - any success with WebRTC from jetson-containers or jetson-utils or jetson-inference? If so, how did you get it to work?

TangmereCottage commented 1 day ago

Ok, so according to https://patchwork.libcamera.org/patch/14939/ (from 2021) "gstreamer: Avoid call to deprecated gst_element_get_request_pad()". gst_element_get_request_pad() is the one that is failing. The current version of gst replaces gst_element_get_request_pad() with gst_element_request_pad_simple(). Will dig a bit more... Would be good to have the WebRTC be solid.

TangmereCottage commented 1 day ago

Please see upstream PR. https://github.com/dusty-nv/jetson-utils/pull/219/files When recompiling utils on CUDA=12.6 and the above change, everything seems to work

TangmereCottage commented 1 day ago

Update - changing to gst_element_request_pad_simple is not the fix.

1/ When I run video-viewer /dev/video webrtc://@:8554/output on the Orin, not in a docker, then everything works and I can see the video feed with Chromium at https://192.168.X.X:8554

2/ When I runvideo-viewer /dev/video webrtc://@:8554/output inside a Jetson docker, and then try to access the video data from the host, then I get the same coredump as before.

TangmereCottage commented 19 hours ago

Per @Fibo27, WebRTC used to work as of 6.0 and no longer works w/ the change to 6.1: https://github.com/dusty-nv/jetson-containers/issues/688#issuecomment-2418128928

Hi level summary: