Install SLP on Ubuntu?

S.L.P. image questions, stereoscopic video livestream and recording, stereoscopic photo capture etc.
Post Reply
neaveeng
Posts: 13
Joined: Wed May 06, 2020 4:26 pm

Install SLP on Ubuntu?

Post by neaveeng »

Howdo,

I'm trying to get my head around using the camera, I'm using the Ubiquity Robotics image to run my robot, and I'm wondering if it's possible to install SLP on Ubuntu or does it only run on the full image?

Thanks,
Keegan

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: Install SLP on Ubuntu?

Post by Realizator »

Hi Keegan,
Actually SLP is a very special image. Original Raspbian has been extremely tuned for our needs. For example, filesystem is read-only. All logging is disabled. A lot of staff (like Nginx etc.) has been installed, and a lot of hidden features (like USB accessory mode for connecting with an Android phones) are installed and configured. As I mentioned, SLP is a very simplified version of our advanced video-related solution (cosmostreamer.com). So it is difficult to "port" it to another image. And if you use not a stock, but another customized image (like ROS-powered Ubiquiti Robotics image), you'll get a lot of internal conflicts.
You can use not all code used in SLP, but partially port it to your solution. Can you please describe, which features you'd like to use in your case? For example, all our livestream code is done by bash scripts and some PHP code. It can be parametrized (by removing PHP admin page dependency) and used as stand-alone code. Look inside /opt/StereoPi/scripts and /var/www/html for example.
Eugene a.k.a. Realizator

neaveeng
Posts: 13
Joined: Wed May 06, 2020 4:26 pm

Re: Install SLP on Ubuntu?

Post by neaveeng »

Hey Eugene,

I'd be happy just to stream live at the minute, one or both cameras, I just cant get my head around the command line to pipe the output over udp. I can get a stream live but if I connect to it in the browser or vlc so a simple command line example would be incredibly handy.

I'll try and have a look at the scripts from the image, thanks for the clarification.

Best Regards,
Keegan

neaveeng
Posts: 13
Joined: Wed May 06, 2020 4:26 pm

Re: Install SLP on Ubuntu?

Post by neaveeng »

I've discovered a problem with the Ubiquity Robotics image, details here:
https://forum.ubiquityrobotics.com/t/mm ... ent/428/13

I can now at least record and capture video and images, working on getting streaming working now :)

Edit: I used this command to get streaming working to VLC, the "-cs 1" argument switches left and right cameras as per another thread:

raspivid -cs 1 -o - -3d sbs -3dswap -t 0 -hf -w 1280 -h 360 -fps 25|cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: Install SLP on Ubuntu?

Post by Realizator »

neaveeng wrote:
Thu May 07, 2020 4:34 pm
I've discovered a problem with the Ubiquity Robotics image, details here:
https://forum.ubiquityrobotics.com/t/mm ... ent/428/13

I can now at least record and capture video and images, working on getting streaming working now :)

Edit: I used this command to get streaming working to VLC, the "-cs 1" argument switches left and right cameras as per another thread:

raspivid -cs 1 -o - -3d sbs -3dswap -t 0 -hf -w 1280 -h 360 -fps 25|cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264
Congrats on your progress! :-)
By the way, "-3dswap" is not working option (conformed by RPi engineers). Use "-cs 1" instead, and keep all other parameters (including -3d sbs).
Eugene a.k.a. Realizator

neaveeng
Posts: 13
Joined: Wed May 06, 2020 4:26 pm

Re: Install SLP on Ubuntu?

Post by neaveeng »

Thanks Eugene, I'll remove it. I've got it working but with a few seconds lag, now I just need to reduce the lag :)

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: Install SLP on Ubuntu?

Post by Realizator »

It's about impossible to remove a lag using VLC, as it has non-removable video buffer on receiver side. Are you familiar with the gstreamer?..
We have some code examples for the receiver (Mac, Win) here in Advanced users section of our Wiki.

upd> Using a "--flush" option for raspivid decrease latency too...
upd2> I've attached our "video-source.sh" file, originally sitting in SLP here: /opt/StereoPi/scripts. Take a look at the very last long row here

Code: Select all

else
    	./bin/raspivid -t 0 $...
All parameters used in this row can be found at the beginning of the file. Actually they are taken from the administration panel.
You can see that raspivid data are piped to "| ./bin/splitter". This is our internal binary, which does the very easy function: it "splits" the stream and can send it to the several receivers at a time. This allow us to do a stream to the browser, record video, stream to Android - and all of that simultaneously.
Attachments
video-source.sh.zip
(1.19 KiB) Downloaded 180 times
Eugene a.k.a. Realizator

neaveeng
Posts: 13
Joined: Wed May 06, 2020 4:26 pm

Re: Install SLP on Ubuntu?

Post by neaveeng »

Thanks, I'll have a look :)

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: Install SLP on Ubuntu?

Post by Realizator »

I've updated my previous answer with some code. By the way, our "splitter" is a stand-alone binary, so you can just copy it to your Raspbian.
Eugene a.k.a. Realizator

neaveeng
Posts: 13
Joined: Wed May 06, 2020 4:26 pm

Re: Install SLP on Ubuntu?

Post by neaveeng »

Thankyou! I'll have a go and see what happens. Looks like you can run ROS in Docker on the Pi though so may be an easy win to switch to your image :)

Post Reply