Can't play using VLC in AGX but ok in Xavier NX

I used the command bellow to produce the stream and receive by gst-rtsp-server .

gst-launch-1.0 videotestsrc ! video/x-raw,width=320,height=240,framerate=30/1 ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=NV12’ ! nvv4l2h264enc insert-sps-pps=1 insert-vui=1 ! h264parse ! rtph264pay ! udpsink port=5000

./test-launch “( udpsrc port=5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264" ! rtph264depay ! rtph264pay name=pay0 )”

Then I can use the VLC to display it through URL :rtsp://192.168.2.10:8554/test

But When I execute the same command in AGX Orin, I can’t display it using VLC without any error message:

gst-launch-1.0 videotestsrc ! video/x-raw,width=320,height=240,framerate=30/1 ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=NV12’ ! nvv4l2h264enc insert-sps-pps=1 insert-vui=1 ! h264parse ! rtph264pay ! udpsink port=5000

Setting pipeline to PAUSED …

Opening in BLOCKING MODE

Pipeline is PREROLLING …

Redistribute latency…

NvMMLiteOpen : Block : BlockType = 4

===== NVMEDIA: NVENC =====

NvMMLiteBlockCreate : Block : BlockType = 4

H264: Profile = 66, Level = 0

NVMEDIA: Need to set EMC bandwidth : 126000

Pipeline is PREROLLED …

Setting pipeline to PLAYING …

New clock: GstSystemClock

./test-launch “( udpsrc port=5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264" ! rtph264depay ! rtph264pay name=pay0 )”

stream ready at rtsp://127.0.0.1:8554/test

The only difference I think is “NVMEDIA: Need to set EMC bandwidth : 126000”, could anyone telll me how to troubleshoot or solve it ?

Maybe because of:

Try adding host=127.0.0.1 to udpsink properties:

gst-launch-1.0 videotestsrc ! video/x-raw,width=320,height=240,framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvv4l2h264enc insert-sps-pps=1 insert-vui=1 ! h264parse ! rtph264pay ! udpsink host=127.0.0.1 port=5000

Or try setting ip v6 localhost on receiver:

/test-launch "( udpsrc address=::1 port=5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264" ! rtph264depay ! rtph264pay name=pay0 )"

Also note that you could just stream with RTP/MP2T and VLC would be able to decode it:

1 Like

Thanks very much. Solved by the method you told.

By the way, could I display the stream directly by vlc if the vlc is running in another machine?

If I run the command in the AGX Orin.

gst-launch-1.0 videotestsrc ! video/x-raw,width=320,height=240,framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvv4l2h264enc insert-sps-pps=1 insert-vui=1 ! h264parse ! rtph264pay ! udpsink host=192.168.2.10 port=5000

Could I get the stream in my personal compute using vlc with URL bellow?

rtp://192.168.2.10:5000

I tried but not success.

Try.

gst-launch-1.0 videotestsrc ! video/x-raw,width=320,height=240,framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvv4l2h264enc insert-sps-pps=1 insert-vui=1 idrinterval=15 ! h264parse ! mpegtsmux ! rtpmp2tpay ! udpsink host=192.168.2.10 port=5000

And you should be able to play it without a SDP file using VLC (or else) on host 192,168.2.10.

Thanks for your reply, and I understand now: the gst-launch will send the rtp to the address 192.168.2.10. And if the 192.168.2.10 address is the address of the client machine , then I can play the video in the client machine(192.168.2.10).

But indeed , I don’t know the client IP address. So I just want to send the rtp to one server address,such as the jetson machine itself , and I want to display the stream in one MACbook personal computer.
Could I be a simple server to wait for the client vlc to get the stream and display it ?

If the receiver is connected to the same LAN (and not wifi), then you can try multicast.
The multicast address would depend on your LAN type, but you may try:

gst-launch-1.0 videotestsrc ! video/x-raw,width=320,height=240,framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvv4l2h264enc insert-sps-pps=1 insert-vui=1 idrinterval=15 ! h264parse ! mpegtsmux ! rtpmp2tpay ! udpsink host=224.1.1.1 auto-multicast=true port=5000
1 Like

Great! It really works in the LAN.
If the LAN is wifi , I mean in the situation , the jetson machine as one gstream server , and the users will connect the server using the server’s wifi hot point , for example, the end users want to use the PC or Mobile Phone to display the stream, could they also connect to the multicast address?
If not , are there any solution ?

I tried to use my PC to connect the jetson wifi hotpoint, and then used the VLC to display the address:
rtp://224.1.1.1:5000, but the VLC displayed nothing.
I think that is because the wifi hotpot of the jeston not support multicast protocol.

For wifi I wouldn’t advise multicast.
You may use a TCP server such as:

gst-launch-1.0 videotestsrc ! video/x-raw,width=320,height=240,framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvv4l2h264enc insert-sps-pps=1 insert-vui=1 idrinterval=15 ! h264parse ! mpegtsmux ! tcpserversink host=192.168.2.10 port=4953

where 192.168.2.10 is the IP address of the jetson for the interface (network adapter) where it will receive incoming connections.

Then, if no firewall prevents this, you would be able to receive from any host using uri :

cvlc tcp://192.168.2.10:4953
1 Like

A brilliant method! You are so phenomenal, thanks a million, I really appreciate it!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.