Closed eyadshagalih closed 2 years ago
please any one help me
this is my code if (FileListresults.get(m).localfilestatuse == "Need Dawonload"){uploadstatuse=2; FileNameStringForUpload = "http://g********/uploads/" + TaskIdInt + "/" + FileListresults.get(m).localfilenaem; ;} try { bitmap=null; bitmap =retriveVideoFrameFromVideo(FileNameStringForUpload); } catch (Throwable throwable) { throwable.printStackTrace(); }
public static Bitmap retriveVideoFrameFromVideo(String videoPath) throws Throwable { Bitmap bitmapfromret = null; FFmpegMediaMetadataRetriever ffmpegMediaMetadataRetriever = new FFmpegMediaMetadataRetriever(); try { if (Build.VERSION.SDK_INT >= 14) ffmpegMediaMetadataRetriever.setDataSource(videoPath, new HashMap<String, String>()); else ffmpegMediaMetadataRetriever.setDataSource(videoPath); bitmapfromret = ffmpegMediaMetadataRetriever.getFrameAtTime(); // thumpduration = ffmpegMediaMetadataRetriever // .extractMetadata(FFmpegMediaMetadataRetriever.METADATA_KEY_FILESIZE); } catch (Exception e) { e.printStackTrace(); throw new Throwable( "Exception in retriveVideoFrameFromVideo(String videoPath)" + e.getMessage()); } finally { if (ffmpegMediaMetadataRetriever != null) { ffmpegMediaMetadataRetriever.release(); } } return bitmapfromret; } the error is coming
java.lang.Throwable: Exception in retriveVideoFrameFromVideo(String videoPath)setDataSource failed: status = 0xFFFFFFFF
This exception indicates the file you specified is invalid or can't be read. Without more information the cause of this error is difficult to debug.
please any one help me
this is my code if (FileListresults.get(m).localfilestatuse == "Need Dawonload"){uploadstatuse=2; FileNameStringForUpload = "http://g********/uploads/" + TaskIdInt + "/" + FileListresults.get(m).localfilenaem; ;} try { bitmap=null; bitmap =retriveVideoFrameFromVideo(FileNameStringForUpload); } catch (Throwable throwable) { throwable.printStackTrace(); }
java.lang.Throwable: Exception in retriveVideoFrameFromVideo(String videoPath)setDataSource failed: status = 0xFFFFFFFF