VLC Unity - Play UDP stream

This forum is about all development around libVLC.
PrivHateVoid
New Cone
New Cone
Posts: 1
Joined: 24 Oct 2023 12:32

VLC Unity - Play UDP stream

Postby PrivHateVoid » 24 Oct 2023 13:54

Hello everyone,

For a professional project I need to read an UDP video stream into Unity3D. (Local network)

This stream come from a Jetson AGX Orin using Gstreamer.

Here my Jetson gst command line:

H264:

Code: Select all

gst-launch-1.0 nvarguscamerasrc sensor-id=0 sensor-mode=0 ! "video/x-raw(memory:NVMM), width=(int)4056, height=3040, format=(string)NV12, framerate=30/1" ! nvvidconv ! "video/x-raw(memory:NVMM), format=(string)NV12, width=(int)1920, height=(int)1080" ! nvv4l2h264enc ! rtph264pay mtu=60000 ! udpsink clients=192.168.1.10:1234 sync=false
H265:

Code: Select all

gst-launch-1.0 nvarguscamerasrc sensor-id=0 sensor-mode=0 ! "video/x-raw(memory:NVMM), width=(int)4056, height=3040, format=(string)NV12, framerate=30/1" ! nvvidconv ! "video/x-raw(memory:NVMM), format=(string)NV12, width=(int)1920, height=(int)1080" ! nvv4l2h265enc ! rtph265pay mtu=60000 ! udpsink clients=192.168.1.10:1234 sync=false

This stream work good with gst on windows client with those command lines :

H264:

Code: Select all

.\gst-launch-1.0.exe udpsrc port=1234 caps="application/x-rtp, media=(string)video, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false
H265:

Code: Select all

.\gst-launch-1.0.exe udpsrc port=1234 caps="application/x-rtp, media=(string)video, encoding-name=(string)H265, payload=(int)96" ! rtph265depay ! avdec_h265 ! videoconvert ! autovideosink sync=false
I have tried to read the same stream with VLC, Unity and basic desktop app, but I got no image.
Like you can see in the following screenshot, I can see the bandwidth used by VLC, but I do not get any image, I have tried in H264 and H265 but same result.

I do not have a lot of experience into video/streaming/encoding world, is that possible to get any help please?

Thanks in advance. Regard's.

Image

Image

PC config :
  • Windows 11 22H2
    Build : 22621.2428
    CPU : Intel(R) Core(TM) i9-10900KF CPU @ 3.70GHz 3.70 GHz
    RAM : 32.0 GB
    GPU : RTX 3080

mfkl
Developer
Developer
Posts: 746
Joined: 13 Jun 2017 10:41

Re: VLC Unity - Play UDP stream

Postby mfkl » 07 Nov 2023 04:42

Try making it work with the VLC app first, and check the verbose debug logs for problems.
https://mfkl.github.io


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 7 guests