I would like to be able to work on frames from an .mxf video file. The image format of the video is JPEG 2000, using a YUV color space with 4:2:2 subsampling and lossless compression.
My intentions are to extract frames from this video using ffmpeg. Extracted frames would then be processed in Matlab (at the moment I'm interested in performing colorization).
I want to extract the frames with as minimal data loss as possible and I would like to work in the YUV color space. I understand PNG involves a lossless process, but only involves the RGB color space - so not an option.
I think I can extract jpeg2000 frames in the YUV color space, but I'm not sure if I'm losing data from the compression process. I attempted the following code in ffmpeg:
ffmpeg -i video.mxf -r 1/5 out%03d.jp2
... however, the extracted jp2 files are unreadable in various software, including HiView which is a specialised JPEG 2000 software.
Quesiton 1: Is this jpeg 2000 extraction method lossless? What am I doing wrong?
I also considered extracting the images in the tiff format where I can achieve the YUV and lossless requirements. I attempted the following code in ffmpeg:
ffmpeg -i video.mxf -vcodec tiff f%10d.tif
... however, the extracted tiff files are unreadable in software such as paint, paint.net and windows photo viewer.
Question 2: Is this tiff extraction method correct? What am I doing wrong?
Question 3: What is an ideal image format that covers my YUV and lossless requirements?