I need to get a frame of a video file (it may be on sdcard, cache dir or app dir). I have package android.media in my application and inside I have class MediaMetadataRetrie
The exception is thrown also when the File doesn't exist. So before calling setDataSource() you'd better check if new File(url).exists().
File
setDataSource()
new File(url).exists()