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

ModalAI Forum

  1. ModalAI Support Forum
  2. General Questions
  3. read/write raw video data in FIFO

read/write raw video data in FIFO

Scheduled Pinned Locked Moved Unsolved General Questions
3 Posts 2 Posters 729 Views 2 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.
  • S Offline
    S Offline
    shlee853
    Regular
    wrote on last edited by
    #1

    Hi

    Do you have an example code to read/write raw video stream in generated FIFO using voxl-rtsp -m option?

    Thanks,

    1 Reply Last reply
    0
    • Alex KushleyevA Offline
      Alex KushleyevA Offline
      Alex Kushleyev
      ModalAI Team
      wrote on last edited by
      #2

      Hi, you can use the following commands.

      1. In first terminal, run voxl-rtsp which will connect to camera and create the fifo and wait for the client to open the fifo

      voxl-rtsp -m /dev/my_fifo -f h264
      voxl-rtsp version 1.0.4
      Enabling output fifo /dev/my_fifo
      Setting output format to: h264
      Connected
      Started camera 0
      Created session
      Video track created
      Updated camera parameters
      AE Mode: 1, Exposure: 0us, Gain: 0us, AWB Mode: 1
      rtsp://<your_voxl_ip_address>:8900/live
      Camera Output FIFO starting: /dev/my_fifo .. will block until client is ready
      ** process will proceed when you start reading the fifo **

      1. then in second terminal (This opens the fifo and sends the raw data from the fifo into a file):

      cat /dev/my_fifo > raw_video.h264

      1. press control-c in 1st terminal to stop the process, the cat process will also exit since the fifo will be closed.

      Note that using voxl-rtsp you can use -f to specify which format to use for data output, include h264 (Defualt), h265, or even yuv or raw formats.

      You can also just dump the video to a file without fifo, using voxl-rtsp -o <filename>. From voxl-rtsp -h :

      -o <filename> Save video to filename (No save to file by default). If extension of the file is .mp4, then video will be written in MP4 container, otherwise raw

      So if you wanted to just use voxl-rtsp without a fifo to save raw yuv (no mp4 container) to file, then just use voxl-rtsp -f h264 (or h265) -o my_video.h264 (or .h265)

      Did that answer your question?

      S 1 Reply Last reply
      0
      • Alex KushleyevA Alex Kushleyev

        Hi, you can use the following commands.

        1. In first terminal, run voxl-rtsp which will connect to camera and create the fifo and wait for the client to open the fifo

        voxl-rtsp -m /dev/my_fifo -f h264
        voxl-rtsp version 1.0.4
        Enabling output fifo /dev/my_fifo
        Setting output format to: h264
        Connected
        Started camera 0
        Created session
        Video track created
        Updated camera parameters
        AE Mode: 1, Exposure: 0us, Gain: 0us, AWB Mode: 1
        rtsp://<your_voxl_ip_address>:8900/live
        Camera Output FIFO starting: /dev/my_fifo .. will block until client is ready
        ** process will proceed when you start reading the fifo **

        1. then in second terminal (This opens the fifo and sends the raw data from the fifo into a file):

        cat /dev/my_fifo > raw_video.h264

        1. press control-c in 1st terminal to stop the process, the cat process will also exit since the fifo will be closed.

        Note that using voxl-rtsp you can use -f to specify which format to use for data output, include h264 (Defualt), h265, or even yuv or raw formats.

        You can also just dump the video to a file without fifo, using voxl-rtsp -o <filename>. From voxl-rtsp -h :

        -o <filename> Save video to filename (No save to file by default). If extension of the file is .mp4, then video will be written in MP4 container, otherwise raw

        So if you wanted to just use voxl-rtsp without a fifo to save raw yuv (no mp4 container) to file, then just use voxl-rtsp -f h264 (or h265) -o my_video.h264 (or .h265)

        Did that answer your question?

        S Offline
        S Offline
        shlee853
        Regular
        wrote on last edited by
        #3

        @Alex-Kushleyev great!

        That’s a point what I need. I’ll try it

        Thanks,

        1 Reply Last reply
        0

        Reading along? Create a free ModalAI Forum account to join in.

        With an account you can reply, ask your own question, get an email when a ModalAI engineer answers, and mark the reply that solved it. Your place in each thread is saved between visits.

        Questions about VOXL, Flight Core, ESCs and ModalAI drones are answered here by the engineers who build them.

        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

        • Don't have an account? Register

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