Hello everyone.
Is it possible to start and stop Gstreamer videos on a RP3 with Cayenne?
Hello everyone.
Is it possible to start and stop Gstreamer videos on a RP3 with Cayenne?
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?
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
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')
Like @ognqn.chikov said you can do this with the MQTT API. I have an example here with directions on using it with Python.
Now I have to figure out how to do everything you wrote
Okey, I can help you. From where to start?
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
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.
That is actually a rather awesome looking piece of hardware. Might have to get one of those…
You wont be dissapointed