Starting Gstreamer with Cayenne


#1

Hello everyone.

Is it possible to start and stop Gstreamer videos on a RP3 with Cayenne?


#2

Hello,
Can you tell me how you used to do it now, because I am thinking about a custom code that you can connect it with some kind of button with Raspberry, but the main logic to be in a script code on the raspberry?


#3

I simply open the terminal window and type this

raspivid -n -w 680 -h 480 -fps 20 -t 0 -hf -b 2500000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=192.168.8.101 port=5600


#4

Okey,
I am thinking about something:

What about a python file, that is connected with Cayenne dashboard and some kind of “actuator”.

When it is 1, you can run the following code in python:

import os
os.system('ls')

This will execute the ls command to the terminal. I have test is and it works.

What about to put your code like:

import os
os.system('raspivid -n -w 680 -h 480 -fps 20 -t 0 -hf -b 2500000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=192.168.8.101 port=5600')

#5

Like @ognqn.chikov said you can do this with the MQTT API. I have an example here with directions on using it with Python.


#6

Now I have to figure out how to do everything you wrote :blush:


#7

Okey, I can help you. From where to start?


#8

Thank you thank you thank you !!

Let my first explain my setup.

I am using an autopilot hat from this company. www.emlid.com. who have written there own Operating system so there is no GUI.

Secondly when adding using adding my PI to Cayenne the files autopilot functions got corrupted somehow and i had to re install the OS. So now I am a little hesitant to use Cayenne again.

What I would appreciate is a step by step guide to get the following raspivid line to start on startup using the command line

raspivid -n -w 1280 -h 720 -fps 25 -awb sun -mm matrix -ex sports -ISO 500 -br 50 -t 0 -hf -b 2500000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=192.168.8.100 port=5600


#9

Okey, I will test something with Cayenne and if it works, I will give you a detailed information on how to do it. Maybe later or tomorrow expect some messages here. Thank you.


#10

That is actually a rather awesome looking piece of hardware. Might have to get one of those…


#11

You wont be dissapointed