Live Streaming from Crawler - Low Latency, LAN Only

Go to the link above. With the THETA V on and connected to your computer with a USB cable, press the button below.

I have a playlist for live streaming.

There’s a video below about the RTSP plugin on a Z1

I also did some tests with a THETA V on a toy robot.

1 Like

Hello Craig,
Thank you for your quick response.
I will try with this and report you back later.

with RTSP

with motionjpeg

for USB

register for this site.

https://theta360.guide/special/linuxstreaming/

The Raspberry Pi cannot display the H.264 4K stream to the monitor connected to the Pi. you must use either a Jetson Nano or restream from the raspberry pi.

On a Linux computer (not raspberry pi right now) use this modified version of libuvc

You can then use this sample application to get it to the screen (not ona Raspberry Pi)

To get the video stream to a video device such as /dev/video0, you need to use this.


For short distances, you can use the motionjpeg from the THETA V.

example of using mjpeg over wifi with OpenCV, which may be what you want.

canny_demo

Flutter example of displaying the stream with navigation using panorama_viewer.

1 Like

Hello Again Craig,
Thank you for your kind help.
I was trying gst_loopback on raspi4 and it took 2 days. I can run successfully ./gst_viewer but ./gst_loopback didn’t.
To be clear that, is loopback not working on raspi? (I am also not giving up using USB API with raspi4)
I installed latest Raspberry Pi OS(64-bit) btw.

For latest I got Jetson Nano and test Theta V with my company protocol for webview using internet. it was about 0.36ms over internet.

The lowest latency you can get is around 350ms due to stitching time inside the camera. There is no way to bypass the in-camera pipeline.

I do not believe the Raspberry Pi graphics chipset supports 4K H.264 hardware decoding. You can try cut down the video resolution to 2K as a test.

I believe that someone on this forum did stream to a Raspberry Pi at 2K, but it was slow. You can research if 4K H.264 hardware decoding works with the Raspberry Pi.

https://forums.raspberrypi.com/viewtopic.php?t=243414

If your robot already has a Raspberry Pi on it as the controller and you don’t want to incur the electrical power cost of the NVIDIA Jetson, then restream from the Raspberry Pi without decoding it.

Stream From Raspberry Pi 4 to a Windows PC

Thanks to Shun Yamashita of fulldepth for this solution to stream the Z1 video to a Raspberry Pi 4 with USB then restream it to a Windows PC.

This is the process:

  • Use GStreamer to stream UDP(RTP) to the Windows PC
  • Do not use H264 decoding on the Raspberry Pi as the Windows machine is handling it and it’s likely that the RPi4 can’t use hardware decoding for 4K H.264.
  • Tested with Raspberry Pi4 modelB with 4GB of RAM running Raspberry Pi OS

On the Raspberry Pi, the following was changed in the GStreamer pipeline in gst/gst_viewer.c.

src.pipeline = gst_parse_launch(
        " appsrc name=ap ! queue ! h264parse ! queue"
        " ! rtph264pay ! udpsink host=192.168.0.15 port=9000",
        NULL);

Hello Craig,
I am trying Theta V with Rapi 4. The Theta V will be attached on a crawler robot and I am going to control and view over LAN with no internet environment.
Because of I failed to load Theta V on /dev/video0, I am going to approach this diagram. I have setup Janus on raspi but don’t know how to install RTSP Streaming Plugin and how to use Theta V from raspi yet.
I have tried for 2 weeks and still not success yet. I can run
gst-launch-1.0 thetauvcsrc mode=0 do-timestamp=true ! h264parse ! openh264dec ! videoconvert ! autovideosink

gst-launch-1.0 thetauvcsrc mode=0 do-timestamp=true ! h264parse ! avdec_h264 ! videoconvert ! autovideosink

but failed following because of not mounted on /dev/video0.

gst-launch-1.0 thetauvcsrc mode=0 do-timestamp=true ! h264parse ! v4l2h264dec ! videoconvert ! autovideosink

Sorry for long content and please let me post my info

pi@testenv:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 05ca:2712 Ricoh Co., Ltd RICOH THETA V
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@testenv:~ $ v4l2-ctl --list-devices
bcm2835-codec-decode (platform:bcm2835-codec):
        /dev/video10
        /dev/video11
        /dev/video12
        /dev/video18
        /dev/video31
        /dev/media3

bcm2835-isp (platform:bcm2835-isp):
        /dev/video13
        /dev/video14
        /dev/video15
        /dev/video16
        /dev/video20
        /dev/video21
        /dev/video22
        /dev/video23
        /dev/media1
        /dev/media2

rpivid (platform:rpivid):
        /dev/video19
        /dev/media0

Dummy video device (0x0000) (platform:v4l2loopback-000):
        /dev/video0

pi@testenv:~ $ sudo modprobe uvcvideo
pi@testenv:~ $ v4l2-ctl --list-devices
bcm2835-codec-decode (platform:bcm2835-codec):
        /dev/video10
        /dev/video11
        /dev/video12
        /dev/video18
        /dev/video31
        /dev/media3

bcm2835-isp (platform:bcm2835-isp):
        /dev/video13
        /dev/video14
        /dev/video15
        /dev/video16
        /dev/video20
        /dev/video21
        /dev/video22
        /dev/video23
        /dev/media1
        /dev/media2

rpivid (platform:rpivid):
        /dev/video19
        /dev/media0

Dummy video device (0x0000) (platform:v4l2loopback-000):
        /dev/video0

RICOH THETA V: RICOH THETA V (usb-0000:01:00.0-1.1):
        /dev/media4

pi@testenv:~ $ v4l2-ctl --info
Driver Info:
        Driver name      : v4l2 loopback
        Card type        : Dummy video device (0x0000)
        Bus info         : platform:v4l2loopback-000
        Driver version   : 6.6.51
        Capabilities     : 0x85200003
                Video Capture
                Video Output
                Read/Write
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x05200003
                Video Capture
                Video Output
                Read/Write
                Streaming
                Extended Pix Format
pi@testenv:~ $ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

@hlamin I attempted to organize your posts into a seperate topic and I accidentally messed up the sequence.

If you are using Unity to get the stream into the headset, then this thread may be of interest.

There’s some examples here of streaming from a Linux computer to another computer with rtsp and gstreamer