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

ffmpeg recipe possibly broken #920

Closed
germn opened this issue Oct 31, 2016 · 18 comments
Closed

ffmpeg recipe possibly broken #920

germn opened this issue Oct 31, 2016 · 18 comments

Comments

@germn
Copy link
Contributor

germn commented Oct 31, 2016

I'm trying to build simple possible app using video widget with buildozer.

requirements = hostpython2, kivy==1.9.1, ffmpeg

buildozer android_new debug

Error I'm getting:

./libpng_build.sh: line 17: ./configure: No such file or directory

Ubuntu 16.04 in VirtualBox, everything installed by instructions on site.

@inclement
Copy link
Member

Just to check, this does not happen if you remove ffmpeg from the requirements?

@germn
Copy link
Contributor Author

germn commented Oct 31, 2016

On removing ffmpeg from the requirements everything builds fine (except video doesn't work on Android).

Btw, is there any alternatives to ffmpeg to use video widget on Android? I didn't find it in docs, but looks like ffmpeg is the only way now, am I right?

@inclement
Copy link
Member

I'm not sure about this, I haven't tried video. I'll try to look into
building the recipe when I have time though, feel free to open a
python-for-android github issue about it if there isn't one already.

On 31/10/16 22:50, Gerasimov Mikhail wrote:

On removing ffmpeg from the requirements everything builds fine (except
video doesn't work on Android).

Btw, is there any alternatives to ffmpeg to use video widget on Android?
I didn't find it in docs, but looks like ffmpeg is the only way now, am
I right?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#920 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABNQm9VVlR7f2T-tmPRIqW3PEG67m27Aks5q5nCggaJpZM4KllHh.

@germn
Copy link
Contributor Author

germn commented Nov 1, 2016

Looks like problem comes from WritingMinds/ffmpeg-android used by this recipe, see this issue. There's also PR to fix it from may, but it didn't accepted yet.

Looking at project's state it seems to be dead or poorly maintained :(

What can be done in this case?

@KeyWeeUsr
Copy link
Contributor

Fork under Kivy and fix it? If there's that PR and it works, it shouldn't be hard. If the project is going to die (or is dead anyway), this could be a solution. Pinging the repo author first might be a good idea.

@germn
Copy link
Contributor Author

germn commented Nov 2, 2016

I tried to build project with updated link, but got new error later:

cd builds/unix; \
        ./configure  '--with-pic' '--with-sysroot=/home/kivy/test/.buildozer/android/platform/build/build/other_builds/ffmpeg/armeabi-v7a/ffmpeg/toolchain-android/sysroot' '--host=arm-linux-androideabi' '--enable-static' '--disable-shared' '--with-png=yes' '--with-zlib=yes' '--prefix=/home/kivy/test/.buildozer/android/platform/build/build/other_builds/ffmpeg/armeabi-v7a/ffmpeg/toolchain-android'
/bin/sh: 2: ./configure: not found
builds/unix/detect.mk:85: recipe for target 'setup' failed
make: *** [setup] Error 127

I have no idea how to fix it.

@germn
Copy link
Contributor Author

germn commented Nov 6, 2016

Problem above was because ffmpeg-android need some dependences not mentioned anywhere in p4a:

sudo apt-get --quiet --yes install build-essential git autoconf libtool pkg-config gperf gettext yasm python-lxml


I'm trying to fix recipe for ffmpeg and add recipe for ffpyplayer:
https://github.com/germn/ffmpeg-android
https://github.com/germn/python-for-android

Looks like ffmpeg recipe is ok now: it compiles shared libraries without errors.

While I still can't create correct ffpyplayer recipe, it fails with errors:
http://pastebin.com/dvW3anP9

I don't understand why it happens since all libraries that can not be found exists in specified FFMPEG_LIB_DIR folder. Also manual installing of ffpyplayer (via setup.py) seems to be ok.

If you have any ideas how ffpyplayer recipe should be changed, feel free to help me with this.

@inclement
Copy link
Member

Thanks for the detailed examination. Would you be interested in doing a PR to add these requirements to the doc somewhere?

@germn
Copy link
Contributor Author

germn commented Nov 7, 2016

Should this requirements be added to p4a installing dependencies? I mean since ffmpeg is only lib that need it, may be there's some way to add dependencies for concrete recipe?

I of course will make PR for all this stuff when (and if) I'll be able to make it work. Right now current ffmpeg is broken anyway so just adding it's dependencies to docs wouldn't help.

I also not sure if fixed ffmpeg version is "correct": old ffmpeg recipe (when it was working) was building static libraries while fixed one builds shared (since ffpyplayer needs shared libraries). I don't understand reason of that yet and if static libs still actual.

@germn
Copy link
Contributor Author

germn commented Dec 6, 2016

Current ffmpeg recipe can't be used to play Kivy video standard way (it's not only broken, but also compiles static ffmpeg while ffpyplayer video provider needs shared one).

I still don't understand why this recipe was added, but I think it can be removed since it's broken and confusing (ffpyplayer itself might need this recipe name for it's ffmpeg dependcy).

@germn germn closed this as completed Dec 6, 2016
@SagitSri
Copy link

SagitSri commented Jan 8, 2019

Then how die they added ffmpeg in kivy launcher?

@germn
Copy link
Contributor Author

germn commented Jan 8, 2019

@SagitSri this issue is closed because it is outdated. AFAIK ffmpeg recipe has been rewritten and is working now.

@SagitSri
Copy link

SagitSri commented Jan 9, 2019 via email

@germn
Copy link
Contributor Author

germn commented Jan 9, 2019

@SagitSri yes, you can include ffmpeg this way.

However it's important to notice that ffmpeg recipe itself usually is being used as part of process to build ffpyplayer - main way to allow kivy to play video on Android. It can be enabled with:

requirements = ffpyplayer, openssl, ffpyplayer_codecs

@SagitSri
Copy link

SagitSri commented Jan 9, 2019 via email

@germn
Copy link
Contributor Author

germn commented Jan 9, 2019

@SagitSri please consider creating new issue about problem you have. It'll help other people faced with same problem and allow to find answer faster.

@SagitSri
Copy link

SagitSri commented Jan 10, 2019 via email

@hakanb78
Copy link

hakanb78 commented Mar 14, 2020

Hi, having this same issue with kivy 1.11.1 and python 3.7 running on ubuntu 18.04 VM. Kivy app works on linux but when i add the ffpyplayer to requirements, APK build fails. There's no problem on build if i remove ffpyplayer. Anyone can help?

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

5 participants