I am using Raspberrypi HiQ camera to capture High Speed(120fps) videos of planets for astronomy purposes. Using libcamera-vid I can record h264 upto 4.2 but I saw h264 has limitation of 60fps. I wouldn't mind that if I do not loose any frames(video slowed down), but on the other hand I believe that recording in h264 would result in losses? And it is necessary for my purposes that I do not loose any bit of real data. So compression is fine, but lossy is not.
Libcamera-vid can also record in mjpeg, and uncompressed and unformatted YUV420. The latter is interesting to me, but unfortunately I am having trouble decoding it... I learned that ffmpeg can convert it to other formats. As far as I care it even doesn't even have to be a video, series of TIFFs, FITS, SEQ are fine for me. The software I am using is accepts a long list of video and image files, but not yuv.
I tried converting and playing it but I got passing green lines of different saturation on black background... Not planet Saturn :) I saw there are different types of yuv420, but raspi documentation does not give whole lot information on it: https://www.raspberrypi.com/documentation/accessories/camera.html So in short what tool, or command, on linux or windows, can I use to convert this yuv420 to any losseless format from list bellow https://ibb.co/mXKwqLL
or I can even use h264 without fear of losing data? Any alternative is acceptable from my side I am just interested in having video/images that I can work with.
Command I Used to play video:
ffplay test23.yuv -video_size 256x256 -f rawvideo -pixel_format yuv420p
Command I used to record the video
libcamera-vid --codec yuv420 --qt-preview --analoggain 24 --shutter 8000 --framerate 120 --frames 2500 --mode 1332:990:10:P --roi 0.1,0.1,0.5,0.5 -o /mnt/ramdisk/test23.yuv --width 256 --height 256
Here is link to video: https://drive.google.com/file/d/1guvv4x7MuJ15H_g6v9EXuImZ2Xy-lghF/view?usp=sharing