Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting FFmpegMediaMetadataRetriever Error while running android application #26

Closed
gaurav121900 opened this issue Oct 10, 2014 · 6 comments

Comments

@gaurav121900
Copy link

I have included all the so files and fmmr.jar in libs folder but still getting following error while running application ,

"FFmpegMediaMetadataRetriever libraries not found. Did you forget to add them to your libs folder?"

Code sample :
public static void takeSnapshot(long frameAtTime, String videoPath,
String filename, String videoKey,boolean... forDashboard) {
String uriString = videoPath;
File tempFile = new File(CONST_VIDEO_STOREAGE_PATH + videoKey + "/Miles");
if(!tempFile.exists())
{
tempFile.mkdirs();
}

    FFmpegMediaMetadataRetriever mmr = new FFmpegMediaMetadataRetriever();
    try {
        mmr.setDataSource(URLDecoder.decode(uriString, "UTF-8"));
    } catch (IllegalArgumentException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
    } catch (UnsupportedEncodingException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
    }
    // * 1000)-10,
    mmr.extractMetadata(FFmpegMediaMetadataRetriever.METADATA_KEY_VIDEO_CODEC);
    Bitmap bmp;

    File dirScreenshots;
    String filePath;
    if(forDashboard.length>0)
    {
        String tempPath = CONST_VIDEO_STOREAGE_PATH + videoKey + "/Miles/";
        dirScreenshots=new File(tempPath); 
        filePath=tempPath + filename + ".jpg";
        bmp = mmr.getFrameAtTime(frameAtTime*1000000,
                FFmpegMediaMetadataRetriever.OPTION_CLOSEST_SYNC);
    }
    else
    {
        dirScreenshots=new File(CONST_VIDEO_SNAPSHOT_PATH);
        filePath=CONST_VIDEO_SNAPSHOT_PATH + filename + ".jpg";
        bmp = mmr.getFrameAtTime(frameAtTime*1000,
                FFmpegMediaMetadataRetriever.OPTION_CLOSEST_SYNC);
    }

    if(!dirScreenshots.exists())
    {
        dirScreenshots.mkdir();
    }

    FileOutputStream out = null;
    try {
        out = new FileOutputStream(filePath);
        if (bmp != null)
            bmp.compress(Bitmap.CompressFormat.PNG, 90, out);
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (out != null) {
                out.close();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    mmr.release();
}

}

Below is the screenshot of error :
ffmpeg

@wseemann
Copy link
Owner

Can you send me the sample code and I will check myself?

@gaurav121900
Copy link
Author

Hello William,

I have created sample application and included all ".so" file and "fmmr.jar" file in libs folder and it is working fine but when i include same code and same files in my application which contains other jar and .so files, it is throwing following exception ,

"FFmpegMediaMetadataRetriever libraries not found. Did you forget to add them to your libs folder?"

find attached screenshot of an error.

Regards,
Gaurav Lolge


From: William Seemann [notifications@github.com]
Sent: Tuesday, October 14, 2014 9:51 AM
To: wseemann/FFmpegMediaMetadataRetriever
Cc: Gaurav Lolge
Subject: Re: [FFmpegMediaMetadataRetriever] Getting FFmpegMediaMetadataRetriever Error while running android application (#26)

Can you send me the sample code and I will check myself?


Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-58988526.

@wseemann
Copy link
Owner

As I said in my previous comment, if you can provide me with the application code I will take a look. Otherwise I have no way of reproducing the issue,

@gaurav121900
Copy link
Author

Hello William,

Please find source code here https://drive.google.com/file/d/0B8rMcm6Zq6fycFM1aC1xcllPcEE/view?usp=sharing

My device: Samsung Galaxy Tab Pro 10.1

Regards,
Gaurav Lolge


From: William Seemann [notifications@github.com]
Sent: Wednesday, October 15, 2014 7:51 PM
To: wseemann/FFmpegMediaMetadataRetriever
Cc: Gaurav Lolge
Subject: Re: [FFmpegMediaMetadataRetriever] Getting FFmpegMediaMetadataRetriever Error while running android application (#26)

As I said in my previous comment, if you can provide me with the application code I will take a look. Otherwise I have no way of reproducing the issue,


Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-59212502.

@wseemann
Copy link
Owner

I just imported the project into Eclipse, launched my API 15 emulator and the application worked as expected, no errors or exceptions.

@wseemann
Copy link
Owner

This should now be fixed. Thank you for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants