Live Streaming over USB on Ubuntu and Linux, NVIDIA Jetson

@craig @snafu666
and this is the pipeline in gst_viewer.c :

pipe_proc = "decodebin ! autovideoconvert ! "
		"video/x-raw,format=I420 ! identity drop-allocation=true !"
		"v4l2sink device=/dev/video99 sync=false"; 

And also, I’m still trying this on my Jetson Nano.

1 Like

What version of Jetpack are you using and what type of SDCard on the nano?

Does it work if you display it to source?

gst-launch-1.0 v4l2src device=/dev/video99 ! video/x-raw,framerate=30/1 \
! videoconvert \
! videoscale \
! xvimagesink

The command looks identical.

Do you have the same problem with this?

gst-launch-1.0 v4l2src device=/dev/video99 ! video/x-raw,framerate=30/1
! nvvidconv
! omxh264enc
! h264parse ! matroskamux \
! filesink location=vid99.mkv
2 Likes

Oh my god, the second command managed to save the file in a corrected way, 2 minutes of video for 2 minutes of recording ! thank you so much !!!
The only small problem that I have is that the quality is very bad… (with 3840 x 1920 dimension).

The first command line shows the streams but incorrectly (result is hugely zoomed)

Also, I am considering buying another SD card, which one do you advice me to buy if we assume that I have very good financial resources ?
Or do you think that running the jetsonNano on a hardDrive is better than an SD card ?

I’m personally using the SanDisk card below. It was recommended on a robotics site. I think you should search for “Jetson SDCard recommendation” on Google and see what comes up. I don’t know too much about SDCards, but I believe the speed of the card matters with the Jetson.

I read on the NVIDIA developer forums that it is better to use an SSD when saving video to file. However, I do not have experience with this. I suggest you try posting a question to the NVIDIA forum before you spend money on the SSD.

If you post, and if you have time, link back to this discussion thread in case other people want to experiment with the RICOH THETA.


Your Jetson Nano is acting differently from mine. Are you running JetPack 4.4 from the NVIDIA site?

It seems like there is something missing on your OS installation. Can you put the video file up on some cloud drive such as Google Drive or DropBox and then put the link to the test clip in this forum? It would be good if the clip was fairly small as my daughter is on Zoom classes all day and I have limited bandwidth. Something under 100MB would be nice.

I’m using the jetson-nano-4gb-jp441-sd-card-image as OS, isn’t it an appropriate one ? (available on NVIDIA official website)

We’re using the same OS image from the NVIDIA site.

Does the problem only occur when you try to save the video to the microSD card? Does it display properly to the monitor?

There is a minor difference between your setup and the successful tests. I’m not sure what it is.

I’m using the barrel connector for power, not the USB port.

when I display it with gst_viewer it works perfectly fine,

but not with this command (the resulted video is hugely zoomed)

gst-launch-1.0 v4l2src device=/dev/video99 ! video/x-raw,framerate=30/1
! videoconvert
! videoscale
! xvimagesink

here is a link of one stream recorded via the h264 encoding :

the problem is that it is quite a lot pixelised, which gives a bad result,
The huffman encoding otherwise generates a weired video of one second (seems to be accelerated) but with a good quality

Thank you for help @craig !!

Hello. I am trying to use my Ricoh Theta V as a webcam on my Linux computer.
One main difference of my system is that it’s on Ubuntu 16.04 .

I ran into the problem that i couldn’t run

./gst_loopback
or
gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,framerate=30/1
due to the following error:

libv4l2: error getting pixformat: Invalid argument
start, hit any key to stop
Error: Internal data flow error.
stop

I try to search for this error, but couldn’t find any clues. Do you have any ideas on this error?

What I’ve confirmed / did:

1.Theta V is connected on LIVE mode. (lsusb shows ID:05ca: 2712 )
2.modprobe v4l2loopback => /dev/video1 port is assigned.
3.change a line in gst_viewer.c => v4l2sink device=/dev/video1
4.gst_viewer shows the livestreaming successfully.
5.try install libv4l-dev via apt install (not sure if related or not)

Thank you for this topic.
I got an error “Can’t open THETA” It will be so helpful if you know the reason. I use Jetson Xavier and Theta V.

Thank

Please verify that the THETA is turned on and in live streaming mode. The word “LIVE” needs to be on the front of the camera.

I am not able to install v4l2loopback on Ubuntu 16.04. Did you install it?

image

Thank for your reply.
Yes, THETA is on live mode.

$ lsusb
Bus 001 Device 031: ID 05ca:2712 Ricoh Co., Ltd 
Bus 001 Device 007: ID 04ca:005a Lite-On Technology Corp. 

$ ./gst_viewer 
Can't open THETA

If the THETA is turned off or not on live mode, the error “THETA not found” appeared.

I also did the change below but the I got the same error.

v4l2sink device=/dev/video0 qos=false sync=false;
pipe_proc = "nvv4l2decoder ! nv3dsink sync=false;
2 Likes

I was able to install v4l2loopback and run modprobe v4l2loopback to get my theta on /dev/video1

2 Likes

It works now! Cool!

It might be due to I got wrong libuvc?
git clone https://github.com/libuvc/libuvc —> “Can’t Open Theta” error
git clone https://github.com/ricohapi/libuvc-theta.git --> Work

2 Likes

Great news!

Yes, the libuvc at the URL you displayed has a patch for the THETA device information.

There’s a bunch of information at this site if you haven’t already seen it.

1 Like

Good to point this out explicitly. Thank you for posting this.

1 Like

Hi, this might be interesting for those who got it to work.

Based on this: HowTo: Viewing 360° Video in Real-Time from THETA V with Oculus Go Browser
and copying code from https://github.com/mganeko/aframe
to: https://github.com/kJh19/Test

I managed to live stream my theta from my PC to my phone and VR device as a 360 spherical image and even put them in VR/cardboard mode, using a webrowser.

The details are explained in the links, it works similar to skype or zoom.

2 Likes

Sorry that my previous post might be misleading.

I am still have ‘internal data flow error’ running ./gst_loopback.

Anyone got it to work on Ubuntu 16.04?