m_mediaMetadataRetriever = MediaMetadataRetriever()
m_mediaMetadataRetriever.setDataSource(p_videoPath)
m_bitmap = m_mediaMetadataRetriever.frameAtTime
I am trying to get the frame from a video that I recorded using MediaStore.Action_Video_Capture. The video is stored at a location /storage/emulated/0/DCIM/Camera/PXL_1345657.mp4
But after running the above code the bitmap is coming null and setDataSource is showing an IllegalArgumentException.
There is another overload method that only worked for me:
setDataSource(Context, Uri). You should obtain Uri of the file (with proper permissions) and pass it to the method with according context.