Why can't I receive Gstreamer live stream pipeline?

Hey guys,

This is the error I get

C:\WINDOWS\system32>gst-launch-1.0 -vvv udpsrc port=5000 ! application/x-rtp,encoding-name=H265,payload=96 ! rtph265depay ! h265parse ! queue ! avdec_h265 ! autovideosink sync=false async=false -e
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Could not get/set settings from/on resource.
Additional debug info:
../gst/udp/gstudpsrc.c(1584): gst_udpsrc_open (): /GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
bind failed: Error binding to address: An attempt was made to access a socket in a way forbidden by its access permissions.
Setting pipeline to NULL ...
Freeing pipeline ...

when I try to stream with this code:

gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)60/1' ! nvv4l2h265enc maxperf-enable=1 bitrate=8000000 iframeinterval=40 preset-level=1 control-rate=1 ! h265parse ! rtph265pay config-interval=1 ! udpsink host= localhost port=5000 sync=false async=false

And receive from this code :

gst-launch-1.0 -vvv udpsrc port=5000 ! application/x-rtp,encoding-name=H265,payload=96 ! rtph265depay ! h265parse ! queue ! avdec_h265 ! autovideosink sync=false async=false -e

I am using a Jetson Nano to transmit and a windows Laptop to receive the stream over my school wifi network. Please advice me on how I can fix this. Thank you!

Hi,
You need to configure client IP(Windows Laptop) in udpsink:

gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)60/1' ! nvv4l2h265enc maxperf-enable=1 bitrate=8000000 iframeinterval=40 preset-level=1 control-rate=1 ! h265parse ! rtph265pay config-interval=1 ! udpsink host=_IP_OF_CLIENT_ port=5000 sync=false async=false

Hi DaneLLL,
By saying IP of client in this context

udpsink host=_IP_OF_CLIENT_ port=5000

I should put my windows laptop IP (Receiving end) instead of the jetson’s IP address?

Hi,
Yes. Configure IP address of receiving end to udpsink. And run udpsrc at receiving end.

Hi DaneLLL,

I tried it with putting the receiving end’s IP address into the pipeline but I still get the same error -

Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Could not get/set settings from/on resource.
Additional debug info:
../gst/udp/gstudpsrc.c(1584): gst_udpsrc_open (): /GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
bind failed: Error binding to address: An attempt was made to access a socket in a way forbidden by its access permissions.
Setting pipeline to NULL ...
Freeing pipeline ...

Do you think it could be my school’s wifi/firewall?

Hi,
You might try the case of using Linux PC as a receiving end.

Hi DaneLLL,
I just did a netstat -a -n to show all my available ports. I then changed the port from 5000 to 1900 and it worked. I get this now:

C:\Users\Gaanesh>gst-launch-1.0 -vvv udpsrc port=1900 ! application/x-rtp,encoding-name=H265,payload=96 ! rtph265depay ! h265parse ! queue ! avdec_h265 ! autovideosink sync=false async=false -e
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

The problem now is no new window pops up showing the streaming feed. How can I get the streaming feed to pop up?

Hi,
You might try xvimagesink, which is window-based sink.

Hi DaneLLL,

To test if it was actually my displaying problem, I ran this debug code :

gst-launch-1.0 videotestsrc ! videoconvert ! autovideosink

A small window pop-ed up showing the test video. This leads me to believe that it is an issue with the streaming code itself.

Is there something I can change? I was using another pipeline before I moved over to UDP

This was my previous pipeline and it worked perfectly:

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=3280, height=1848, framerate=28/1, format=NV12'  ! nvvidconv left=200 right=3080 top=600 bottom=1200 !  'video/x-raw,width=2880, height=600, framerate=28/1, format=NV12, pixel-aspect-ratio=1/1' ! nvvidconv ! nvv4l2h264enc ! h264parse ! flvmux ! rtmpsink location='rtmp://localhost/live/'

Hi,

I managed to troubleshoot the problem. It was an issue with the ports. Once I changed up the ports, it works fine.

Thank you