read/write raw video data in FIFO
Do you have an example code to read/write raw video stream in generated FIFO using voxl-rtsp -m option?
Hi, you can use the following commands.
- 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
Started camera 0
Video track created
Updated camera parameters
AE Mode: 1, Exposure: 0us, Gain: 0us, AWB Mode: 1
Camera Output FIFO starting: /dev/my_fifo .. will block until client is ready
** process will proceed when you start reading the fifo **
- 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
- press control-c in 1st terminal to stop the process, the
catprocess will also exit since the fifo will be closed.
Note that using
voxl-rtspyou can use
-fto 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
-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?
That’s a point what I need. I’ll try it