I have 2 camera on my ROV. When rov runs, I want the code I prepared for the second camera to return but it must be a .sh file.
I tried with crontab but it did not work when I tried with crontab. I did it with my raspberry pi 4 but when I do same things with raspberry pi 3 it does not work. (companion version: 0.0.28-18-g690ba0c . I have to use this version because it is the only version that works with DVL)
Without information on the camera you’re using or the code you’ve written it’s difficult to help.
By “when rov runs” do you mean when it gets powered on, or when the vehicle is armed?
Is this a limitation on your end? The .companion.rc file that’s used for setup when the ROV is turned on doesn’t have any file type requirements (it runs various python and shell files without issues).
What is the “it” that you did? Companion 0 isn’t expected to run on Raspberry Pi 4 by default, so I’m unsure how you tried something with Companion 0 that apparently worked on Raspberry Pi 4 but not Raspberry Pi 3.
Assuming your extra camera has a H264-encoded output option, you might want to try the approach I detailed here, which allows setting up multiple streams with only relatively minor modifications to the existing Companion video streaming code.
E: Unable to locate package libgstreamer0.10-dev
E: Couldn't find any package by regex 'libgstreamer0.10-dev'
E: Unable to locate package libgstreamer-plugins-base0.10-dev
E: Couldn't find any package by regex 'libgstreamer-plugins-base0.10-dev'
Probably the best way to do that is to create a shell script that runs that command, and run that shell script in its own screen session from the .companion.rc file. You could also modify scripts/start_video.sh to be agnostic of stream type (i.e. allow it to take in video/x-h264 or video/x-raw as part of the settings), in which case you’d be able to use the rest of the approach I linked to in my previous comment.
gstreamer 1.0 (one-point-zero) and 0.10 (zero-point-ten) are not the same. You mentioned that it was working before from the terminal - what changed? I don’t expect you should need to install any extra dependencies/libraries, and it’s possible that doing so may cause issues with the normal video streaming functionality.
If for some reason you can’t or don’t want to use that, then try one of these general alternatives. I would note that our normal video streaming functionality is started from .companion.rc, so I’d expect that’s a safer bet since you know any required components should be loaded/available at that point in the booting process.