How to properly save frames from mp4 as png files using ExtractMpegFrames.java?
I am trying to get all frames from an mp4 file using the ExtractMpegFrames.java class found here http://bigflake.com/mediacodec/ExtractMpegFramesTest.java.txt What I currently do is create a temp file (File.createTempFile) in a directory that stores all the frames, create a FileOutputStream and do bm.compress(Bitmap.CompressFormat.PNG, 100, fOut) where fOut is the OutputStream with the file. Currently, the saved images look like this: https://imgur.com/a/XpsV2 Using the Camera2 Api, I record a video and save it as an mp4. According to VLC, the color space for the video is Planar 4:2:0 YUV Full