Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. Executing a command line argument at startup

Executing a command line argument at startup

Scheduled Pinned Locked Moved Ask your questions right here!
4 Posts 3 Posters 827 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RDPRobotics
    Contributor
    wrote on last edited by
    #1

    Hello All, we are needing to start a video service to broadcast output from a UVC camera to QGroundcontrol. I was successful streaming with ffmpeg, would like to ultimately use the UVC streaming application to stream over rtsp, but had some trouble getting it functioning, and the deprecated streaming video application did not successfully display a stream (a client connecting would connect/disconnect repeatedly with no video output messages on the VOXL), so I have fallen back on ffmpeg for now. I am familiar with a few options for executing a command at startup like the ffmpeg command, however not for Yocto linux. I wrote a script, placed it in /etc/rc.d, changed the permissions to be executable, and executed "update rc.d myscript.sh defaults" but it doesn't appear to be running upon reboot. I have not yet tried adding an "echo" line in to give me some feedback about what is happening but is this basically the right approach to getting an ffmpeg command to stream uvc video going at startup? Is there a better way? My script is below:

    #!/bin/bash -e
    #
    #Author: C. A. Simpkins Ph.D.
    #
    #Date: June 5 2022
    #
    #Description: This script simply executes a command at startup                                             
    #to start the video streaming from the camera
    #
    #
    #
    #
     
    #this is the command with its options. Change the ip address to be that of the ground station                                                                      
    ffmpeg  -i /dev/video2 -f x265 -s:v 640x480  -b 1M -f mpegts -r 15 -aspect 16:9 -muxdelay 0.01 -vf "transpose=2,transpose=2,format=yuv420p" udp://192.168.1.11:4242
                      
    #upon success exit
    exit 0
    
    1 Reply Last reply
    0
    • tomT Offline
      tomT Offline
      tom
      admin
      wrote on last edited by tom
      #2

      @RDPRobotics The simplest way to do this is with systemd service file.

      To see some examples on VOXL, checkout the /etc/systemd/system directory.

      You can create a new SERVICE_NAME.service file there and enable it to run on bootup with systemctl enable SERVICE_NAME

      Here's an example of how voxl-modem uses systemd: https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-modem/-/blob/master/services/voxl-modem.service

      1 Reply Last reply
      0
      • Eric KatzfeyE Offline
        Eric KatzfeyE Offline
        Eric Katzfey
        ModalAI Team
        wrote on last edited by
        #3

        Here are some relevant documents:
        https://docs.modalai.com/voxl-uvc-server/
        https://docs.modalai.com/voxl-streamer/

        1 Reply Last reply
        0
        • R Offline
          R Offline
          RDPRobotics
          Contributor
          wrote on last edited by
          #4

          Thank you. I could not get video from the uvc device over voxl-streamer, though I could access the test video and the stereo cameras/anything plugged into the MIPI ports. I've had a problem with the newer UVC-server program. I need to check my notes it was a few weeks ago but somehow it wasn't working so I fell back on the ffmpeg due to time limits with the intent of going back to the UVC server application as it's a better solution. I will post a specific issue after looking it over again.

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          ModalAI
          Categories Recent Tags ModalAI.com Docs
          © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups