VLC to visualise UDP stream

I’ve searched quite a few post regarding this problem, but didn’t really find a good solution. Has anyone managed to visualize UDP source in VLC? We prefer the udpsink not the c code to run rtsp server…

gst-launch-1.0 v4l2src device=/dev/video1 io-mode=2 ! 'image/jpeg,width=1280,height=720,framerate=60/1' ! videorate ! 'image/jpeg,framerate=12/1' ! nvjpegdec ! 'video/x-raw' ! nvvidconv ! 'video/x-raw(memory:NVMM),width=640,height=480,format=(string)I420' ! nvv4l2h264enc insert-sps-pps=true ! h264parse ! rtph264pay pt=96 ! udpsink host=127.0.0.1 port=8002 sync=false -e

I’ve tried vlc udp://@:8002 or vlc udp://@127.0.0.1:8002 or write a sdp file with
m=video 8002 RTP/AVP 96
c=IN IP4 127.0.0.1
a=rtpmap:96 H264/90000

Nothing really worked… can somebody please help?

It works my XavierNX R32.4.3. I don’t have a MJPG camera, so I simulated source with:

gst-launch-1.0 videotestsrc ! jpegenc ! image/jpeg,width=1280,height=720,framerate=12/1 ! nvjpegdec ! nvvidconv ! 'video/x-raw(memory:NVMM),width=640,height=480,format=(string)I420' ! nvv4l2h264enc insert-sps-pps=true ! h264parse ! rtph264pay pt=96 ! udpsink host=127.0.0.1 port=8002

Then using VLC (you need to remove one plugin) to open the sdp file with the same content as above:

vlc test.sdp

works.

Thanks Honey_Patoucul,

However removing this still not working for me, I received this error:
> VLC media player 3.0.8 Vetinari (revision 3.0.8-0-gf350b6b5a7)

    [000000559fff68d0] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
    [000000559ffd7b80] dummy interface: using the dummy interface module...
    [0000007f6c001150] live555 demux error: no data received in 10s, aborting

This is related to my another post, Nvcompositor with udpsrc not showing any results i can use xvimagesink to visualise, but the CPU usage goes extremely high … not sure if VLC can do better job?

You may have some configuration issue with pulse audio (which may be common ;-) ). Did you set RTP server ?
I don’t have a Nano, but I’m using same VLC version and all messages I get from VLC with the above example are:

vlc test.sdp 
VLC media player 3.0.8 Vetinari (revision 3.0.8-0-gf350b6b5a7)
[0000005592254640] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0000007f4cc0a5e0] main decoder error: buffer deadlock prevented
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory

but it works, though.

Do I need to set a RTP server? How should I do that?

No you don’t need. That was just a possible cause for PA issue.