Streaming MIPI-CSI over RTSP stream


currently I’m trying to stream my camera (which is connected to the MIPI CSI port) over RTSP using gst-rtsp-server (testlaunch.c)

If I write

./test-launch "v4l2src device=/dev/video0  ! video/x-raw, width=1920, height=1080, framerate=60/1 ! nvvidconv ! nvv4l2h265enc maxperf-enable=1 ! h265parse ! rtph265pay name=pay0"

The stream starts but when I try to connect to it via VLC from my Windows laptop I get no picture.

Does anyone have a clue what I could adapt?

Not sure if your issue is with camera reading or streaming, you may tell more:

  1. Can you read your camera ? Assuming you locally logged into Jetson, or remotely with ssh enabling X11 forwarding from an Linux host having X server running, can you see the camera feed displayed with:
gst-launch-1.0 -v v4l2src device=/dev/video0 ! videoconvert ! xvimagesink

If not working, it might be because you are using a Bayer sensor such as IMX219 RPiv2 camera, that outputs bayer format RG10. You would have to use nvarguscamerasrc plugin instead of v4l2src. nvarguscamerasrc will debayer with ISP HW and provide frame into NVMM memory (DMA-able), so here using nvvidconv for copying into system memory while converting into a suitable format for xvimagesink:

gst-launch-1.0 -v nvarguscamerasrc ! nvvidconv ! xvimagesink

  1. For investigating streaming, you may use a fake video source:
./test-launch "videotestsrc ! video/x-raw,width=320,height=240 ! nvvidconv ! video/x-raw(memory:NVMM),width=1920, height=1080, framerate=60/1 ! nvv4l2h265enc maxperf-enable=1 ! h265parse ! rtph265pay name=pay0"

Then from host you should be able with VLC to read uri: rtsp://<jetson_IP>:8554/test
Be sure that no firewall rule prevents UDP/8554 from Jetson to host.

When you’ll have both 1 & 2 working, it should be easy to adapt for streaming your camera.

Hi, thanks for the reply!

I’m using a Basler camera with the Onsemi AR0521(Format UYVY)
The device tree and drivers are set up and with their software (pylonViewer) I can get a stream running but not with gst-launch-1.0 .

The videotestsrc solution works and I can see a picture on VLC on my windows machine.

You may try building :

in order to get your camera into gstreamer framework.

If your camera is supported, you would be able to display with:

gst-launch-1.0 -v pylonsrc ! videoconvert ! xvimagesink

and stream with:

./test-launch "pylonsrc ! nvvidconv ! video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1 ! nvv4l2h265enc maxperf-enable=1 ! h265parse ! rtph265pay name=pay0"
1 Like

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