imageimage-processingjpegnv12-nv21

How to get an image with an extension .nv12 from a .jpg image


I am working with .jpg RGB images on a linux system. How do I get .nv12 images from these? I know how to convert RGB images into YUV420 images with ffmpeg, but I don't know how to get .nv12 files from RGB images.


Solution

  • As mentioned in the comments, running the following works:-

    ffmpeg -i input.jpg -pix_fmt nv12 -f rawvideo output.nv12