# Writing UVC frames to a file

Source: https://forum.modalai.com/topic/1630/writing-uvc-frames-to-a-file
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2022-12-19 23:50:01 UTC by Kris
Replies: 6 · Views: 1436

## Kris · 2022-12-19 23:50:01 UTC

Re: [Video recording from a 4k camera to a SD card.](/topic/648/video-recording-from-a-4k-camera-to-a-sd-card)

Hello, I was wondering if I could get some assistance writing UVC frames to a file. This was mentioned in a previous post but I am not sure how to go about doing it. 

Also, I have a script that could possibly save UVC camera video to the onboard SD card but I am not sure how to implement this script into VOXL.

## Reply by tom (ModalAI staff) · 2022-12-20 18:37:30 UTC

@Kris If you're just wanting to save frames I would take a look at https://docs.modalai.com/voxl-logger/

## Reply by Kris · 2023-01-10 08:05:20 UTC (in reply to tom)

@tom 
At the moment, it’s only possible to write frames from a UVC camera with either RAW8, RAW16, NV12/21, or FLOAT32 formats. Does H.264 format fall into that criteria? 
I am currently looking into purchasing a different UVC camera that has these output formats;  H.264, MJPG, and YUY2. 
Has H.264 standard compressed format been tested for writing files to the VOXL’s onboard SD card?

## Reply by Guest · 2023-01-10 17:31:07 UTC

Hi,

We're currently working on getting h264 encoding working in voxl-camera-server for our mipi hires cams, so this will be our default encoded format for those cameras as well. I believe uvc server would take a few small tweaks to accept that data and spit it out of a libmodal-pipe, but the support is already there on the other end, we know how to handle encoded frames on these pipes and we have a ```voxl-record-video``` on our dev branch that will take encoded frames over a pipe and write them to a file.

## Reply by Kris · 2023-01-16 00:01:43 UTC (in reply to Guest)

Hello @Alex-Gardner,
I have tried looking for this ```voxl-record-video``` in the dev branch, but could not find it. Was it removed recently?
I was looking in this [location](http://voxl-packages.modalai.com/dists/apq8096/dev/binary-arm64/).
If this is the wrong location, could you please let me know where to find the ```voxl-record-video``` ipk.

## Reply by Guest · 2023-01-16 17:34:29 UTC

@Kris,

`voxl-record-video` is a utility that is included in voxl-mpa-tools, see here (https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-tools/-/blob/dev/tools/voxl-record-video.c)

## Reply by Kris · 2023-05-02 01:53:44 UTC (in reply to Guest)

@Alex-Gardner 
I am trying to get the C270 uvc camera to record its video or frames to the Seeker's onboard SD card. 
I have not had any luck using Gstreamer for this.
Has this been successfully done with the ```voxl-record-video``` command from the dev branch?
If so, how would I go about getting this to work?
