Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7086721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:35:06+00:00 2026-05-28T07:35:06+00:00

I have built ffmpeg for Android using the code and method described at https://github.com/halfninja/android-ffmpeg-x264

  • 0

I have built ffmpeg for Android using the code and method described at

https://github.com/halfninja/android-ffmpeg-x264

using Ubuntu running in VirtualBox on windows. I then copied libvideokit.so into the Project\libs\armeabi folder of a Windows copy of the provided projects. From there I was able to run the ProjectTest from Eclipse on my Android device. I can see the ffmpeg code being executed but when it gets to the point of opening the input file it gives me the indicated error. I have noticed some discussion of this problem at

FFMpeg on Android, undefined references to libavcodec functions, although it is listed on command line

but the solutions have not helped since the file protocol is enabled in this build and I also tried putting “file:” in front of the filepath to no avail. For completeness I tried setting minimal_featureset=0 to enable all the defaults but this gives me the same error. Below is a snapshot of the logcat from Eclipse showing the output from Videokit with an extra call to LOGE to display the result from av_open_input_file. Any suggestions of things to try would be greatly appreciated.

10-23 11:57:33.888: DEBUG/Videokit(4830): run() called
10-23 11:57:33.888: DEBUG/Videokit(4830): run passing off to main()
10-23 11:57:33.904: DEBUG/Videokit(4830): main(): registering all modules
10-23 11:57:33.927: DEBUG/Videokit(4830): main(): registered everything
10-23 11:57:33.927: DEBUG/Videokit(4830): main(): initting opts
10-23 11:57:33.943: DEBUG/Videokit(4830): main(): initted opts.
10-23 11:57:33.943: ERROR/Videokit(4830): ffmpeg version N-30996-gf925b24, Copyright (c) 2000-2011 the FFmpeg developers
10-23 11:57:33.943: ERROR/Videokit(4830):   built on Oct 21 2011 13:54:03 with gcc 4.4.3
10-23 11:57:33.943: ERROR/Videokit(4830):   configuration: --enable-cross-compile --arch=arm5te --enable-armv5te --target-os=linux --disable-stripping --prefix=../output --disable-neon --enable-version3 --disable-shared --enable-static --enable-gpl --enable-memalign-hack --cc=arm-linux-androideabi-gcc --ld=arm-linux-androideabi-ld --extra-cflags='-fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated' --disable-everything --enable-decoder=mjpeg --enable-demuxer=mjpeg --enable-parser=mjpeg --enable-demuxer=image2 --enable-muxer=mp4 --enable-encoder=libx264 --enable-libx264 --enable-decoder=rawvideo --enable-protocol=file --enable-hwaccels --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-filter=buffer --enable-filter=buffersink --disable-demuxer=v4l --disable-demuxer=v4l2 --disable-indev=v4l --disable-indev=v4l2 --extra-cflags='-I../x264 -Ivideokit' --extra-ldflags=-L../x264
10-23 11:57:33.943: DEBUG/Videokit(4830): main(): parsing options
10-23 11:57:33.943: DEBUG/Videokit(4830): parse_options has 4 options to parse
10-23 11:57:33.951: ERROR/Videokit(4830): opt_input_file av_open_input_file /mnt/sdcard/fun/snap0000.jpg -2 
10-23 11:57:33.951: ERROR/Videokit(4830): /mnt/sdcard/fun/snap0000.jpg: No such file or directory
10-23 11:57:33.951: ERROR/Videokit(4830): ffmpeg_exit(1) called!
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:35:07+00:00Added an answer on May 28, 2026 at 7:35 am

    The problem is in permissions. On android we have sdcard mounted with system as owner, but without rwx. But ffmpeg checks that:

    avformat/file.c:

    static int file_check(URLContext *h, int mask)
    {
        struct stat st;
        int ret = stat(h->filename, &st);
        if (ret < 0)
            return AVERROR(errno);
    
        ret |= st.st_mode&S_IRUSR ? mask&AVIO_FLAG_READ  : 0;
        ret |= st.st_mode&S_IWUSR ? mask&AVIO_FLAG_WRITE : 0;
    
        return ret;
    }
    

    Change this function like this:

    static int file_check(URLContext *h, int mask)
    {
        struct stat st;
        int ret = stat(h->filename, &st);
        if (ret < 0)
            return AVERROR(errno);
    
        ret |= st.st_mode&S_IRUSR ? mask&AVIO_FLAG_READ  : 0;
        ret |= st.st_mode&S_IRGRP ? mask&AVIO_FLAG_READ  : 0;
        ret |= st.st_mode&S_IROTH ? mask&AVIO_FLAG_READ  : 0;
        ret |= st.st_mode&S_IWUSR ? mask&AVIO_FLAG_WRITE : 0;
        ret |= st.st_mode&S_IWGRP ? mask&AVIO_FLAG_WRITE  : 0;
        ret |= st.st_mode&S_IWOTH ? mask&AVIO_FLAG_WRITE  : 0;
    
    
        return ret;
    }
    

    And rebuild your ffmpeg. And that`s it!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built a web page which contains a Crystal Report built using the
I have built a simple StreamGeometry, using MSDN example: StreamGeometry geometry = new StreamGeometry();
I have built a small app using javascript. I am using javascript for form
anyone using ffmpeg I have a fairly simple wmv exported by a user from
I am trying to build ffmpeg source code on ubuntu 10.1 linux machine with
I have built a rich Text Editor for Flex 4 using the instruction in
I have built a processor using PTLSIM and want to test it, for educational
I have created libffmpeg.so using the android build system. Now I'm trying to use
I have built a simple transport agent (using .NET 4.0) for exchange 2010 and
I have built an android app, but it does not seem stable. It is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.