PermissionError: [Errno 13] Permission denied: 'ffmpeg'

3,007 views
Skip to first unread message

purushottam yadav

unread,
Aug 29, 2021, 11:12:38 AM8/29/21
to Kivy users support
what is this error   PermissionError: [Errno 13] Permission denied: 'ffmpeg' 

with below  function  , it is happening  only on android platform   not on ubuntu . 

what all I  want is  to create thumbnail   for the video  path given to function .


    def thumforvideo(self , path):


        print(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3])
        result = os.path.basename(path)[:-3] + "jpg"
        print(result)
        ff = FFmpeg(  inputs  = {str(path): None}  ,
                      outputs = {str(result): ['-ss', '00:00:4', '-vframes', '1']}   )


        print(ff.cmd)
        # Print result
        # ffmpeg -i input.mp4 -ss 00:00:10 -vframes 1 output.png
        ff.run()
        print(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3])
        print(os.listdir())

Robert

unread,
Aug 29, 2021, 12:39:50 PM8/29/21
to Kivy users support
The error occurs because is no ffmpeg executable on Android, only the .so files (if ffmpeg is in requirements).

Generally the easiest way to get a thumbnail is with Pillow.
But I don't know if that applies to a video.

1000 MMO

unread,
Aug 29, 2021, 12:49:56 PM8/29/21
to Kivy users support
adb screenshot + pillow crop maybe good ! 

Vào lúc 22:12:38 UTC+7 ngày Chủ Nhật, 29 tháng 8, 2021, mekala.pu...@gmail.com đã viết:

purushottam yadav

unread,
Aug 31, 2021, 9:58:11 AM8/31/21
to Kivy users support
what is  this error now ? 
I have changed the function  .



08-31 19:08:34.604 16409 16409 I python  :  Process Process-1:
08-31 19:08:34.606 16409 16409 I python  :  Traceback (most recent call last):
08-31 19:08:34.606 16409 16409 I python  :    File "/home/purushottam2/Desktop/project/tttt/yyy/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Lib/multiprocessing/process.py", line 315, in _bootstrap
08-31 19:08:34.607 16409 16409 I python  :    File "/home/purushottam2/Desktop/project/tttt/yyy/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Lib/multiprocessing/process.py", line 108, in run
08-31 19:08:34.607 16409 16409 I python  :    File "/home/purushottam2/Desktop/project/tttt/yyy/.buildozer/android/app/main.py", line 186, in thumforvideo
08-31 19:08:34.607 16409 16409 I python  :    File "/home/purushottam2/Desktop/project/tttt/yyy/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/cv2/__init__.py", line 5, in <module>
08-31 19:08:34.608 16409 16409 I python  :  ImportError: dlopen failed: "/data/data/org.test.myapp/files/app/_python_bundle/site-packages/cv2/cv2.so" is 64-bit instead of 32-bit




=======================================code ==============================







    def thumforvideo(self , path):


        # Importing all necessary libraries
        import cv2
        import os

        print(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3])
        result = os.path.basename(path)[:-3] + "jpg"
        print(result)


        # Read the video from specified path
        cam = cv2.VideoCapture(path )

        try:

            # creating a folder named data
            if not os.path.exists('data'):
                os.makedirs('data')

        # if not created then raise error
        except OSError:
            print ('Error: Creating directory of data')

        # frame
        currentframe = 0
        done = False

        while(True):

            # reading from frame
            ret,frame = cam.read()


            if ret and not done :
                # if video is still left continue creating images
                name =  result


                print ('Creating...' + name)

                # writing the extracted images
                cv2.imwrite(name, frame)

                # increasing counter so that it will
                # show how many frames are created
                done = True

            elif done :
                break

        # Release all space and windows once done
        cam.release()
        cv2.destroyAllWindows()


        print(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3])
        print(os.listdir())

Robert

unread,
Aug 31, 2021, 1:02:13 PM8/31/21
to Kivy users support
>>ImportError: dlopen failed: "/data/data/org.test.myapp/files/app/_python_bundle/site-packages/cv2/cv2.so" is 64-bit instead of 32-bit

The build process included the wrong .so file.
If you change the arch from arm7 to arm8, appclean, and rebuild you will get a different error.
This will probably say it is trying to link an x86_64 object.
This was sucked in from pypl because of a requirements specification error in buildozer.spec

One of your requirements needs a recipe (or needs to be specified differently).

Perhaps you specified opencv as cv2 not opencv which is the recipe name?

purushottam yadav

unread,
Sep 2, 2021, 10:59:23 AM9/2/21
to Kivy users support

# (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86, x86_64
android.arch = armeabi-v7a

among those choices which one should I chose ? 

what should  I change among requirements ?

# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy
requirements = python3,Kivy==2.0.0 , https://github.com/kivymd/KivyMD/archive/master.zip , sdl2_ttf==2.0.15 ,  plyer ,pillow, pyjnius  , kivmob  , kivy_garden.mapview , requests , opencv-python, ffmpy ,  urllib3 , chardet , idna

I dont know about recipes ,  what are they  , how to use them ?

Robert

unread,
Sep 2, 2021, 12:29:41 PM9/2/21
to Kivy users support
The arch thing explains how to verify the diagnosis, it is not required.


>One of your requirements needs a recipe (or needs to be specified differently).
>Perhaps you specified opencv as cv2 not opencv which is the recipe name?

The cause of the issue opencv-python

purushottam yadav

unread,
Sep 2, 2021, 2:42:47 PM9/2/21
to Kivy users support
I changed the requirements but I got this error .  spec file is below  if required .

# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy 
requirements = python3,Kivy==2.0.0 , https://github.com/kivymd/KivyMD/archive/master.zip , sdl2_ttf==2.0.15 ,  plyer ,pillow, pyjnius  , kivmob  , kivy_garden.mapview , requests , opencv , ffmpy ,  urllib3 , chardet , idna




- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF
-- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF - Success
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH - Success
-- Android: fixup -g compiler option from Android toolchain
-- Update variable ANDROID_SDK from environment: /home/purushottam2/.buildozer/android/platform/android-sdk
-- Android SDK Tools: ver. 2.0 (description: 'Android SDK Command-line Tools')
-- Android SDK Build Tools: ver. 31.0.0 (subdir 31.0.0 from 30.0.2;30.0.3;31.0.0;31.0.0-rc1;31.0.0-rc2;31.0.0-rc3;31.0.0-rc4)
CMake Error at cmake/android/OpenCVDetectAndroidSDK.cmake:176 (message):
  Android SDK Tools: OpenCV requires Android SDK Tools revision 14 or newer.

  Use BUILD_ANDROID_PROJECTS=OFF to prepare Android project files without
  building them
Call Stack (most recent call first):
  CMakeLists.txt:780 (include)


-- Configuring incomplete, errors occurred!
See also "/home/purushottam2/Desktop/project/tttt/yyy/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/opencv/armeabi-v7a__ndk_target_21/opencv/build/CMakeFiles/CMakeOutput.log".
See also "/home/purushottam2/Desktop/project/tttt/yyy/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/opencv/armeabi-v7a__ndk_target_21/opencv/build/CMakeFiles/CMakeError.log".


  STDERR:

# Command failed: /home/purushottam2/Desktop/project/tttt/bin/python3.7 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,Kivy==2.0.0,https://github.com/kivymd/KivyMD/archive/master.zip,sdl2_ttf==2.0.15,plyer,pillow,pyjnius,kivmob,kivy_garden.mapview,requests,opencv,ffmpy,urllib3,chardet,idna --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/purushottam2/Desktop/project/tttt/yyy/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
# ENVIRONMENT:
#     SHELL = '/bin/bash'
#     SESSION_MANAGER = 'local/purushottam2-HP-Laptop-15-bs1xx:@/tmp/.ICE-unix/1746,unix/purushottam2-HP-Laptop-15-bs1xx:/tmp/.ICE-unix/1746'
#     QT_ACCESSIBILITY = '1'
#     COLORTERM = 'truecolor'
#     XDG_CONFIG_DIRS = '/etc/xdg/xdg-ubuntu:/etc/xdg'
#     XDG_MENU_PREFIX = 'gnome-'
#     GNOME_DESKTOP_SESSION_ID = 'this-is-deprecated'
#     LANGUAGE = 'en_IN:en'
#     MANDATORY_PATH = '/usr/share/gconf/ubuntu.mandatory.path'
#     GNOME_SHELL_SESSION_MODE = 'ubuntu'
#     SSH_AUTH_SOCK = '/run/user/1000/keyring/ssh'
#     XMODIFIERS = '@im=ibus'
#     DESKTOP_SESSION = 'ubuntu'
#     SSH_AGENT_PID = '1643'
#     GTK_MODULES = 'gail:atk-bridge'
#     DBUS_STARTER_BUS_TYPE = 'session'
#     PWD = '/home/purushottam2/Desktop/project/tttt/yyy'
#     XDG_SESSION_DESKTOP = 'ubuntu'
#     LOGNAME = 'purushottam2'
#     XDG_SESSION_TYPE = 'x11'
#     GPG_AGENT_INFO = '/run/user/1000/gnupg/S.gpg-agent:0:1'
#     XAUTHORITY = '/run/user/1000/gdm/Xauthority'
#     WINDOWPATH = '2'
#     HOME = '/home/purushottam2'
#     USERNAME = 'purushottam2'
#     IM_CONFIG_PHASE = '1'
#     LANG = 'en_IN'
#     LS_COLORS = 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
#     XDG_CURRENT_DESKTOP = 'ubuntu:GNOME'
#     VIRTUAL_ENV = '/home/purushottam2/Desktop/project/tttt'
#     VTE_VERSION = '6003'
#     GNOME_TERMINAL_SCREEN = '/org/gnome/Terminal/screen/f64baf06_1a09_421e_b94e_f6b45329f973'
#     INVOCATION_ID = '71ec8baba92947dda5a56cfb689100f8'
#     MANAGERPID = '1463'
#     LESSCLOSE = '/usr/bin/lesspipe %s %s'
#     XDG_SESSION_CLASS = 'user'
#     TERM = 'xterm-256color'
#     DEFAULTS_PATH = '/usr/share/gconf/ubuntu.default.path'
#     LESSOPEN = '| /usr/bin/lesspipe %s'
#     USER = 'purushottam2'
#     GNOME_TERMINAL_SERVICE = ':1.100'
#     DISPLAY = ':1'
#     SHLVL = '1'
#     QT_IM_MODULE = 'ibus'
#     DBUS_STARTER_ADDRESS = 'unix:path=/run/user/1000/bus,guid=65025a4e9268f09c34075dbd6130fed5'
#     XDG_RUNTIME_DIR = '/run/user/1000'
#     PS1 = ('(tttt) \\[\\e]0;\\u@\\h: '
 '\\w\\a\\]${debian_chroot:+($debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ ')
#     JOURNAL_STREAM = '8:45279'
#     XDG_DATA_DIRS = '/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'
#     PATH = '/home/purushottam2/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/purushottam2/Desktop/project/tttt/bin:/home/purushottam2/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
#     GDMSESSION = 'ubuntu'
#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus,guid=65025a4e9268f09c34075dbd6130fed5'
#     OLDPWD = '/home/purushottam2/Desktop/project/tttt'
#     _ = '/home/purushottam2/Desktop/project/tttt/bin/buildozer'
#     PACKAGES_PATH = '/home/purushottam2/.buildozer/android/packages'
#     ANDROIDSDK = '/home/purushottam2/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/purushottam2/.buildozer/android/platform/android-ndk-r19b'
#     ANDROIDAPI = '27'
#     ANDROIDMINAPI = '21'
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2 





======================================================spec file========================================



[app]

# (str) Title of your application
title = kApplication

# (str) Package name
package.name = myapp

# (str) Package domain (needed for android/ios packaging)
package.domain = org.test

# (str) Source code where the main.py live
source.dir = .

# (list) Source files to include (let empty to include all the files)
source.include_exts =

# (list) List of inclusions using pattern matching
source.include_patterns = *

# (list) Source files to exclude (let empty to not exclude anything)
#source.exclude_exts = spec

# (list) List of directory to exclude (let empty to not exclude anything)
#source.exclude_dirs = tests, bin

# (list) List of exclusions using pattern matching
#source.exclude_patterns = license,images/*/*.jpg

# (str) Application versioning (method 1)
version = 0.1

# (str) Application versioning (method 2)
# version.regex = __version__ = ['"](.*)['"]
# version.filename = %(source.dir)s/main.py

# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy 
requirements = python3,Kivy==2.0.0 , https://github.com/kivymd/KivyMD/archive/master.zip , sdl2_ttf==2.0.15 ,  plyer ,pillow, pyjnius  , kivmob  , kivy_garden.mapview , requests , opencv , ffmpy ,  urllib3 , chardet , idna

# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes
# requirements.source.kivy = ../../kivy

# (list) Garden requirements
#garden_requirements = mapview

# (str) Presplash of the application
#presplash.filename = %(source.dir)s/data/presplash.png

# (str) Icon of the application
#icon.filename = %(source.dir)s/data/icon.png

# (str) Supported orientation (one of landscape, sensorLandscape, portrait or all)
orientation =  all

# (list) List of service to declare
#services = NAME:ENTRYPOINT_TO_PY,NAME2:ENTRYPOINT2_TO_PY

#
# OSX Specific
#

#
# author = © Copyright Info

# change the major version of python used by the app
osx.python_version = 3

# Kivy version to use
osx.kivy_version = 1.9.1

#
# Android specific
#

# (bool) Indicate if the application should be fullscreen or not
fullscreen = 0

# (string) Presplash background color (for new android toolchain)
# Supported formats are: #RRGGBB #AARRGGBB or one of the following names:
# red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray,
# darkgray, grey, lightgrey, darkgrey, aqua, fuchsia, lime, maroon, navy,
# olive, purple, silver, teal.
#android.presplash_color = #FFFFFF

# (list) Permissions
android.permissions = INTERNET, WRITE_EXTERNAL_STORAGE ,READ_EXTERNAL_STORAGE ,  ACCESS_NETWORK_STATE , ACCESS_COARSE_LOCATION , ACCESS_FINE_LOCATION

# (int) Target Android API, should be as high as possible.
#android.api = 27
android.api = 27
# (int) Minimum API your APK will support.
#android.minapi = 21
android.minapi = 21
# (int) Android SDK version to use
#android.sdk = 20
android.sdk = 24
# (str) Android NDK version to use
#android.ndk = 19b
android.ndk = 19b
# (int) Android NDK API to use. This is the minimum API your app will support, it should usually match android.minapi.
#android.ndk_api = 21

# (bool) Use --private data storage (True) or --dir public storage (False)
#android.private_storage = True

# (str) Android NDK directory (if empty, it will be automatically downloaded.)
#android.ndk_path =

# (str) Android SDK directory (if empty, it will be automatically downloaded.)
#android.sdk_path =

# (str) ANT directory (if empty, it will be automatically downloaded.)
#android.ant_path =

# (bool) If True, then skip trying to update the Android sdk
# This can be useful to avoid excess Internet downloads or save time
# when an update is due and you just want to test/build your package
# android.skip_update = False

# (bool) If True, then automatically accept SDK license
# agreements. This is intended for automation only. If set to False,
# the default, you will be shown the license when first running
# buildozer.
# android.accept_sdk_license = False

# (str) Android entry point, default is ok for Kivy-based app
#android.entrypoint = org.renpy.android.PythonActivity

# (str) Android app theme, default is ok for Kivy-based app
# android.apptheme = "@android:style/Theme.NoTitleBar"

# (list) Pattern to whitelist for the whole project
#android.whitelist =

# (str) Path to a custom whitelist file
#android.whitelist_src =

# (str) Path to a custom blacklist file
#android.blacklist_src =

# (list) List of Java .jar files to add to the libs so that pyjnius can access
# their classes. Don't add jars that you do not need, since extra jars can slow
# down the build process. Allows wildcards matching, for example:
# OUYA-ODK/libs/*.jar
#android.add_jars = foo.jar,bar.jar,path/to/more/*.jar

# (list) List of Java files to add to the android project (can be java or a
# directory containing the files)
#android.add_src =

# (list) Android AAR archives to add (currently works only with sdl2_gradle
# bootstrap)
#android.add_aars = support-compat-28.0.0.aar

# (list) Gradle dependencies to add (currently works only with sdl2_gradle
# bootstrap)
#android.gradle_dependencies =
android.gradle_dependencies = 'com.google.firebase:firebase-ads:10.2.0'

# (list) add java compile options
# this can for example be necessary when importing certain java libraries using the 'android.gradle_dependencies' option
# android.add_compile_options = "sourceCompatibility = 1.8", "targetCompatibility = 1.8"

# (list) Gradle repositories to add {can be necessary for some android.gradle_dependencies}
# please enclose in double quotes
# e.g. android.gradle_repositories = "maven { url 'https://kotlin.bintray.com/ktor' }"
#android.add_gradle_repositories =

# (list) packaging options to add
# can be necessary to solve conflicts in gradle_dependencies
# please enclose in double quotes
# e.g. android.add_packaging_options = "exclude 'META-INF/common.kotlin_module'", "exclude 'META-INF/*.kotlin_module'"
#android.add_gradle_repositories =

# (list) Java classes to add as activities to the manifest.
#android.add_activities = com.example.ExampleActivity

# (str) OUYA Console category. Should be one of GAME or APP
# If you leave this blank, OUYA support will not be enabled
#android.ouya.category = GAME

# (str) Filename of OUYA Console icon. It must be a 732x412 png image.
#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png

# (str) XML file to include as an intent filters in <activity> tag
#android.manifest.intent_filters =

# (str) launchMode to set for the main activity
#android.manifest.launch_mode = standard

# (list) Android additional libraries to copy into libs/armeabi
#android.add_libs_armeabi = libs/android/*.so
#android.add_libs_armeabi_v7a = libs/android-v7/*.so
#android.add_libs_arm64_v8a = libs/android-v8/*.so
#android.add_libs_x86 = libs/android-x86/*.so
#android.add_libs_mips = libs/android-mips/*.so

# (bool) Indicate whether the screen should stay on
# Don't forget to add the WAKE_LOCK permission if you set this to True
#android.wakelock = False

# (list) Android application meta-data to set (key=value format)
#android.meta_data =
android.meta_data = com.google.android.gms.ads.APPLICATION_ID=ca-app-pub-3940256099942544~3347511713

# (list) Android library project to add (will be added in the
# project.properties automatically.)
#android.library_references =

# (list) Android shared libraries which will be added to AndroidManifest.xml using <uses-library> tag
#android.uses_library =

# (str) Android logcat filters to use
#android.logcat_filters = *:S python:D

# (bool) Copy library instead of making a libpymodules.so
#android.copy_libs = 1

# (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86, x86_64
android.arch = armeabi-v7a

# (int) overrides automatic versionCode computation (used in build.gradle)
# this is not the same as app version and should only be edited if you know what you're doing
# android.numeric_version = 1

#
# Python for android (p4a) specific
#

# (str) python-for-android fork to use, defaults to upstream (kivy)
#p4a.fork = <your username>

# (str) python-for-android branch to use, defaults to master
#p4a.branch = develop
p4a.branch = master

# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
#p4a.source_dir =

# (str) The directory in which python-for-android should look for your own build recipes (if any)
#p4a.local_recipes =

# (str) Filename to the hook for p4a
#p4a.hook =

# (str) Bootstrap to use for android builds
# p4a.bootstrap = sdl2

# (int) port number to specify an explicit --port= p4a argument (eg for bootstrap flask)
#p4a.port =


#
# iOS specific
#

# (str) Path to a custom kivy-ios folder
#ios.kivy_ios_dir = ../kivy-ios
# Alternately, specify the URL and branch of a git checkout:
ios.kivy_ios_branch = master

# Another platform dependency: ios-deploy
# Uncomment to use a custom checkout
#ios.ios_deploy_dir = ../ios_deploy
# Or specify URL and branch
ios.ios_deploy_branch = 1.7.0

# (str) Name of the certificate to use for signing the debug version
# Get a list of available identities: buildozer ios list_identities
#ios.codesign.debug = "iPhone Developer: <lastname> <firstname> (<hexstring>)"

# (str) Name of the certificate to use for signing the release version
#ios.codesign.release = %(ios.codesign.debug)s


[buildozer]

# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
log_level = 2

# (int) Display warning if buildozer is run as root (0 = False, 1 = True)
warn_on_root = 1

# (str) Path to build artifact storage, absolute or relative to spec file
# build_dir = ./.buildozer

# (str) Path to build output (i.e. .apk, .ipa) storage
# bin_dir = ./bin

#    -----------------------------------------------------------------------------
#    List as sections
#
#    You can define all the "list" as [section:key].
#    Each line will be considered as a option to the list.
#    Let's take [app] / source.exclude_patterns.
#    Instead of doing:
#
#[app]
#source.exclude_patterns = license,data/audio/*.wav,data/images/original/*
#
#    This can be translated into:
#
#[app:source.exclude_patterns]
#license
#data/audio/*.wav
#data/images/original/*
#


#    -----------------------------------------------------------------------------
#    Profiles
#
#    You can extend section / key with a profile
#    For example, you want to deploy a demo version of your application without
#    HD content. You could first change the title to add "(demo)" in the name
#    and extend the excluded directories to remove the HD content.
#
#[app@demo]
#title = My Application (demo)
#
#[app:source.exclude_patterns@demo]
#images/hd/*
#
#    Then, invoke the command line with the "demo" profile:
#
#buildozer --profile demo android debug

Robert

unread,
Sep 2, 2021, 4:47:12 PM9/2/21
to Kivy users support
> Android SDK Tools: OpenCV requires Android SDK Tools revision 14 or newer.

Others have seen this issue, but I don't know anything about it. Sorry
This might be a place to start https://github.com/kivy/buildozer/issues/1144

Robert

unread,
Sep 2, 2021, 10:17:22 PM9/2/21
to Kivy users support
So I read that thread, as far as I understand it OpenCV is not compatible with the current Google tools.
The OpenCV compile process depends on old tools that are not in the tools version Buildozer downloads from Google.

So OpenCV has bitrot.

The link contains some hacks to add the required tools.

purushottam yadav

unread,
Sep 5, 2021, 5:39:40 PM9/5/21
to Kivy users support
opencv and ffmpeg are not working in android kivy app .

Any other way to get a frame out of video  ...? 

purushottam yadav

unread,
Sep 6, 2021, 1:49:24 PM9/6/21
to Kivy users support
any suggestions from  any other memebers and ElliotG  .....?

Elliot Garbus

unread,
Sep 6, 2021, 1:56:16 PM9/6/21
to kivy-...@googlegroups.com

I have not done any Android programming… perhaps Robert or another user can help.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/f52efd35-dca7-4301-aabc-9c2e8069e885n%40googlegroups.com.

 

purushottam yadav

unread,
Sep 7, 2021, 4:45:35 PM9/7/21
to Kivy users support
what is this  below error ? I am trying to run below function .



    def  thumforvideo(self , path ):



        print(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3])
        print(os.listdir())
        print("started thumbnail making...."*(50))

        # Read the video from specified path
        cam = cv2.VideoCapture(path)

        try:

            # creating a folder named data
            if not os.path.exists('data'):
                os.makedirs('data')

        # if not created then raise error
        except OSError:
            print ('Error: Creating directory of data')

        # frame
        currentframe = 0
        done = False

        while(True):



            # reading from frame
            ret,frame = cam.read()

            if ret and not done :
                if currentframe > 5 :

                    result =  os.path.basename(path)[:-3] + "jpg"
                    # if video is still left continue creating images
                    name = result  #'./data/frame' + str(currentframe) + '.jpg'
                    print('Creating...' + name)

                    # writing the extracted images
                    cv2.imwrite(name, frame)

                    # increasing counter so that it will
                    # show how many frames are created
                    currentframe += 1
                    done = True
            else:
                break

        # Release all space and windows once done
        cam.release()
        cv2.destroyAllWindows()

        print(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3])
        print(os.listdir())
        print("ended  thumbnail making...."*(50))


======================================errror================================================
4277:com.google.android.gms/u999a24}
09-08 01:40:58.741  2318  2433 D CompatibilityInfo: mCompatibilityFlags - 0
09-08 01:40:58.741  2318  2433 D CompatibilityInfo: applicationDensity - 440
09-08 01:40:58.741  2318  2433 D CompatibilityInfo: applicationScale - 1.0
09-08 01:40:58.827 27630 27630 I Finsky  : [2] wsg.a(3): SCH: job service start with id 9263.
09-08 01:40:58.885 31626 31941 D SharedPreferencesImpl: Time required to fsync /data/user/0/com.xiaomi.misettings/shared_prefs/mi_stat_pref.xml: [<1: 0, <2: 0, <4: 2, <8: 10, <16: 31, <32: 6, <64: 18, <128: 5, <256: 1, <512: 0, <1024: 1, <2048: 0, <4096: 0, <8192: 0, <16384: 0, >=16384: 0]
09-08 01:40:58.923 27630  2200 I Finsky  : [5070] wrc.a(25): SCH: Satisfied jobs for 9263 are: 12-1
09-08 01:40:58.935  2318  2511 W NativeCrashListener: Couldn't find ProcessRecord for pid 2628
09-08 01:40:58.935  2649  2649 E crash_dump32: cannot open libmiuindbg.so: No such file or directory
09-08 01:40:58.940  1191  1191 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_03
09-08 01:40:58.941  2648  2648 I crash_dump32: performing dump of process 2629 (target tid = 2629)
09-08 01:40:58.972  2648  2648 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-08 01:40:58.972  2648  2648 F DEBUG   : Build fingerprint: 'xiaomi/lavender/lavender:9/PKQ1.180904.001/V11.0.9.0.PFGINXM:user/release-keys'
09-08 01:40:58.972  2648  2648 F DEBUG   : Revision: '0'
09-08 01:40:58.972  2648  2648 F DEBUG   : ABI: 'arm'
09-08 01:40:58.972  2648  2648 F DEBUG   : pid: 2629, tid: 2629, name: org.test.myapp  >>> org.test.myapp <<<
09-08 01:40:58.972  2648  2648 F DEBUG   : signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xe791e1e1
09-08 01:40:58.972  2648  2648 F DEBUG   :     r0  00000000  r1  00000000  r2  00000000  r3  00000000
09-08 01:40:58.972  2648  2648 F DEBUG   :     r4  e791e12c  r5  e791e1e1  r6  ffb306d8  r7  ffb30700
09-08 01:40:58.973  2648  2648 F DEBUG   :     r8  e9406d8c  r9  00000000  r10 ffb30978  r11 e9406d8c
09-08 01:40:58.973  2648  2648 F DEBUG   :     ip  e93ffcfc  sp  ffb306d8  lr  e93ce16f  pc  c6a990a2
09-08 01:40:58.973  2648  2648 I unwind  : Malformed section header found, ignoring...
09-08 01:40:58.981  2648  2648 F DEBUG   : 
09-08 01:40:58.981  2648  2648 F DEBUG   : backtrace:
09-08 01:40:58.981  2648  2648 F DEBUG   :     #00 pc 000180a2  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:58.981  2648  2648 F DEBUG   :     #01 pc 0001ac89  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:58.981  2648  2648 F DEBUG   :     #02 pc 0001877f  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so (cv::AVIReadContainer::AVIReadContainer()+42)
09-08 01:40:58.981  2648  2648 F DEBUG   :     #03 pc 00014075  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:58.981  2648  2648 F DEBUG   :     #04 pc 00013cef  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:58.981  2648  2648 F DEBUG   :     #05 pc 00013c71  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:58.981  2648  2648 F DEBUG   :     #06 pc 00013e4f  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:58.981  2648  2648 F DEBUG   :     #07 pc 00017eef  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:58.981  2648  2648 F DEBUG   :     #08 pc 0000bd47  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so (cv::VideoCapture::open(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, int)+466)
09-08 01:40:58.981  2648  2648 F DEBUG   :     #09 pc 0000b951  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so (cv::VideoCapture::VideoCapture(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, int)+64)
09-08 01:40:58.981  2648  2648 F DEBUG   :     #10 pc 0004a84b  /data/data/org.test.myapp/files/app/_python_bundle/site-packages/cv2.so
09-08 01:40:58.981  2648  2648 F DEBUG   :     #11 pc 000b7a74  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libpython3.8.so
09-08 01:40:58.991 27630  2669 I Finsky  : [5080] wqo.accept(2): SCH: Job 12-1 starting
09-08 01:40:59.036 27630 27630 I Finsky  : [2] ContentSyncJob.x(1): [ContentSync] job started
09-08 01:40:59.119  2318  2511 W NativeCrashListener: Couldn't find ProcessRecord for pid 2629
09-08 01:40:59.120  2648  2648 E crash_dump32: cannot open libmiuindbg.so: No such file or directory
09-08 01:40:59.120  1191  1191 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_04
09-08 01:40:59.121  2651  2651 I crash_dump32: performing dump of process 2633 (target tid = 2633)
09-08 01:40:59.177  2651  2651 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-08 01:40:59.177  2651  2651 F DEBUG   : Build fingerprint: 'xiaomi/lavender/lavender:9/PKQ1.180904.001/V11.0.9.0.PFGINXM:user/release-keys'
09-08 01:40:59.177  2651  2651 F DEBUG   : Revision: '0'
09-08 01:40:59.178  2651  2651 F DEBUG   : ABI: 'arm'
09-08 01:40:59.178  2651  2651 F DEBUG   : pid: 2633, tid: 2633, name: org.test.myapp  >>> org.test.myapp <<<
09-08 01:40:59.178  2651  2651 F DEBUG   : signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xe791e1e1
09-08 01:40:59.178  2651  2651 F DEBUG   :     r0  00000000  r1  00000000  r2  00000000  r3  00000000
09-08 01:40:59.178  2651  2651 F DEBUG   :     r4  e791e12c  r5  e791e1e1  r6  ffb306d8  r7  ffb30700
09-08 01:40:59.178  2651  2651 F DEBUG   :     r8  e9406d8c  r9  00000000  r10 ffb30978  r11 e9406d8c
09-08 01:40:59.178  2651  2651 F DEBUG   :     ip  e93ffcfc  sp  ffb306d8  lr  e93ce16f  pc  c6a990a2
09-08 01:40:59.178  2651  2651 I unwind  : Malformed section header found, ignoring...
09-08 01:40:59.180  2651  2651 F DEBUG   : 
09-08 01:40:59.180  2651  2651 F DEBUG   : backtrace:
09-08 01:40:59.180  2651  2651 F DEBUG   :     #00 pc 000180a2  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.180  2651  2651 F DEBUG   :     #01 pc 0001ac89  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.180  2651  2651 F DEBUG   :     #02 pc 0001877f  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so (cv::AVIReadContainer::AVIReadContainer()+42)
09-08 01:40:59.180  2651  2651 F DEBUG   :     #03 pc 00014075  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.180  2651  2651 F DEBUG   :     #04 pc 00013cef  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.180  2651  2651 F DEBUG   :     #05 pc 00013c71  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.180  2651  2651 F DEBUG   :     #06 pc 00013e4f  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.180  2651  2651 F DEBUG   :     #07 pc 00017eef  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.180  2651  2651 F DEBUG   :     #08 pc 0000bd47  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so (cv::VideoCapture::open(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, int)+466)
09-08 01:40:59.180  2651  2651 F DEBUG   :     #09 pc 0000b951  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so (cv::VideoCapture::VideoCapture(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, int)+64)
09-08 01:40:59.180  2651  2651 F DEBUG   :     #10 pc 0004a84b  /data/data/org.test.myapp/files/app/_python_bundle/site-packages/cv2.so
09-08 01:40:59.180  2651  2651 F DEBUG   :     #11 pc 000b7a74  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libpython3.8.so
09-08 01:40:59.267  2318  3196 D ActivityManager: Raise procstate to external provider: ProcessRecord{c83055b 4277:com.google.android.gms/u999a24}
09-08 01:40:59.259   757   757 W memt...@1.0-se: type=1400 audit(0.0:23682): avc: denied { read } for name="mem" dev="debugfs" ino=2271027 scontext=u:r:hal_memtrack_default:s0 tcontext=u:object_r:qti_debugfs:s0 tclass=file permissive=0
09-08 01:40:59.319  2318  6871 D ActivityManager: Raise procstate to external provider: ProcessRecord{c83055b 4277:com.google.android.gms/u999a24}
09-08 01:40:59.325  2318  3196 D ActivityManager: Raise procstate to external provider: ProcessRecord{c83055b 4277:com.google.android.gms/u999a24}
09-08 01:40:59.328  2318  2335 D Boost   : hostingType=FastRestart, hostingName=null, callerPackage=system, isSystem=true, isBoostNeeded=false.
09-08 01:40:59.332  2318  2335 I ActivityManager: Start proc 2674:com.android.camera/u0a29 for FastRestart caller=system
09-08 01:40:59.269   757   757 W memt...@1.0-se: type=1400 audit(0.0:23683): avc: denied { read } for name="mem" dev="debugfs" ino=2271027 scontext=u:r:hal_memtrack_default:s0 tcontext=u:object_r:qti_debugfs:s0 tclass=file permissive=0
09-08 01:40:59.338  2674  2674 E .android.camer: Not starting debugger since process cannot load the jdwp agent.
09-08 01:40:59.342  2318  2511 W NativeCrashListener: Couldn't find ProcessRecord for pid 2633
09-08 01:40:59.342  2651  2651 E crash_dump32: cannot open libmiuindbg.so: No such file or directory
09-08 01:40:59.343  1191  1191 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_05
09-08 01:40:59.344  2652  2652 I crash_dump32: performing dump of process 2631 (target tid = 2631)
09-08 01:40:59.375  2652  2652 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-08 01:40:59.375  2652  2652 F DEBUG   : Build fingerprint: 'xiaomi/lavender/lavender:9/PKQ1.180904.001/V11.0.9.0.PFGINXM:user/release-keys'
09-08 01:40:59.375  2652  2652 F DEBUG   : Revision: '0'
09-08 01:40:59.376  2652  2652 F DEBUG   : ABI: 'arm'
09-08 01:40:59.376  2652  2652 F DEBUG   : pid: 2631, tid: 2631, name: org.test.myapp  >>> org.test.myapp <<<
09-08 01:40:59.376  2652  2652 F DEBUG   : signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xe791e1e1
09-08 01:40:59.376  2652  2652 F DEBUG   :     r0  00000000  r1  00000000  r2  00000000  r3  00000000
09-08 01:40:59.376  2652  2652 F DEBUG   :     r4  e791e12c  r5  e791e1e1  r6  ffb306d8  r7  ffb30700
09-08 01:40:59.376  2652  2652 F DEBUG   :     r8  e9406d8c  r9  00000000  r10 ffb30978  r11 e9406d8c
09-08 01:40:59.376  2652  2652 F DEBUG   :     ip  e93ffcfc  sp  ffb306d8  lr  e93ce16f  pc  c6a990a2
09-08 01:40:59.377  2652  2652 I unwind  : Malformed section header found, ignoring...
09-08 01:40:59.378  2652  2652 F DEBUG   : 
09-08 01:40:59.378  2652  2652 F DEBUG   : backtrace:
09-08 01:40:59.378  2652  2652 F DEBUG   :     #00 pc 000180a2  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.378  2652  2652 F DEBUG   :     #01 pc 0001ac89  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.378  2652  2652 F DEBUG   :     #02 pc 0001877f  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so (cv::AVIReadContainer::AVIReadContainer()+42)
09-08 01:40:59.378  2652  2652 F DEBUG   :     #03 pc 00014075  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.378  2652  2652 F DEBUG   :     #04 pc 00013cef  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.378  2652  2652 F DEBUG   :     #05 pc 00013c71  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.378  2652  2652 F DEBUG   :     #06 pc 00013e4f  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.378  2652  2652 F DEBUG   :     #07 pc 00017eef  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.378  2652  2652 F DEBUG   :     #08 pc 0000bd47  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so (cv::VideoCapture::open(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, int)+466)
09-08 01:40:59.378  2652  2652 F DEBUG   :     #09 pc 0000b951  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so (cv::VideoCapture::VideoCapture(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, int)+64)
09-08 01:40:59.378  2652  2652 F DEBUG   :     #10 pc 0004a84b  /data/data/org.test.myapp/files/app/_python_bundle/site-packages/cv2.so
09-08 01:40:59.378  2652  2652 F DEBUG   :     #11 pc 000b7a74  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libpython3.8.so
09-08 01:40:59.409  2318  4193 D ActivityManager: Raise procstate to external provider: ProcessRecord{c83055b 4277:com.google.android.gms/u999a24}
09-08 01:40:59.447  2318  4193 D CompatibilityInfo: mCompatibilityFlags - 0
09-08 01:40:59.447  2318  4193 D CompatibilityInfo: applicationDensity - 440
09-08 01:40:59.448  2318  4193 D CompatibilityInfo: applicationScale - 1.0
09-08 01:40:59.484  2318  4193 D CompatibilityInfo: mCompatibilityFlags - 0
09-08 01:40:59.484  2318  4193 D CompatibilityInfo: applicationDensity - 440
09-08 01:40:59.484  2318  4193 D CompatibilityInfo: applicationScale - 1.0
09-08 01:40:59.451  2318  4193 I chatty  : uid=1000(system) Binder:2318_F identical 1 line
09-08 01:40:59.483  2318  4193 D ActivityManager: Raise procstate to external provider: ProcessRecord{c83055b 4277:com.google.android.gms/u999a24}
09-08 01:40:59.486  2318  2511 W NativeCrashListener: Couldn't find ProcessRecord for pid 2631
09-08 01:40:59.487  2652  2652 E crash_dump32: cannot open libmiuindbg.so: No such file or directory
09-08 01:40:59.490  1191  1191 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_06
09-08 01:40:59.492  2655  2655 I crash_dump32: performing dump of process 2639 (target tid = 2639)
09-08 01:40:59.533  2655  2655 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-08 01:40:59.533  2655  2655 F DEBUG   : Build fingerprint: 'xiaomi/lavender/lavender:9/PKQ1.180904.001/V11.0.9.0.PFGINXM:user/release-keys'
09-08 01:40:59.533  2655  2655 F DEBUG   : Revision: '0'
09-08 01:40:59.533  2655  2655 F DEBUG   : ABI: 'arm'
09-08 01:40:59.533  2655  2655 F DEBUG   : pid: 2639, tid: 2639, name: org.test.myapp  >>> org.test.myapp <<<
09-08 01:40:59.534  2655  2655 F DEBUG   : signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xe791e1e1
09-08 01:40:59.534  2655  2655 F DEBUG   :     r0  00000000  r1  00000000  r2  00000000  r3  00000000
09-08 01:40:59.534  2655  2655 F DEBUG   :     r4  e791e12c  r5  e791e1e1  r6  ffb306d8  r7  ffb30700
09-08 01:40:59.534  2655  2655 F DEBUG   :     r8  e9406d8c  r9  00000000  r10 ffb30978  r11 e9406d8c
09-08 01:40:59.534  2655  2655 F DEBUG   :     ip  e93ffcfc  sp  ffb306d8  lr  e93ce16f  pc  c6a990a2
09-08 01:40:59.534  2655  2655 I unwind  : Malformed section header found, ignoring...
09-08 01:40:59.536  2655  2655 F DEBUG   : 
09-08 01:40:59.536  2655  2655 F DEBUG   : backtrace:
09-08 01:40:59.536  2655  2655 F DEBUG   :     #00 pc 000180a2  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.536  2655  2655 F DEBUG   :     #01 pc 0001ac89  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.536  2655  2655 F DEBUG   :     #02 pc 0001877f  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so (cv::AVIReadContainer::AVIReadContainer()+42)
09-08 01:40:59.536  2655  2655 F DEBUG   :     #03 pc 00014075  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.536  2655  2655 F DEBUG   :     #04 pc 00013cef  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.536  2655  2655 F DEBUG   :     #05 pc 00013c71  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.536  2655  2655 F DEBUG   :     #06 pc 00013e4f  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.536  2655  2655 F DEBUG   :     #07 pc 00017eef  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so
09-08 01:40:59.536  2655  2655 F DEBUG   :     #08 pc 0000bd47  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so (cv::VideoCapture::open(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, int)+466)
09-08 01:40:59.536  2655  2655 F DEBUG   :     #09 pc 0000b951  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libopencv_videoio.so (cv::VideoCapture::VideoCapture(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, int)+64)
09-08 01:40:59.536  2655  2655 F DEBUG   :     #10 pc 0004a84b  /data/data/org.test.myapp/files/app/_python_bundle/site-packages/cv2.so
09-08 01:40:59.536  2655  2655 F DEBUG   :     #11 pc 000b7a74  /data/app/org.test.myapp-dwiihsHJnbULLqQimX4RXQ==/lib/arm/libpython3.8.so
09-08 01:40:59.572  3176  4798 W GetToken: [GetToken]GetToken failed with status code: BadAuthentication


Robert

unread,
Sep 7, 2021, 6:47:08 PM9/7/21
to Kivy users support
There are multiple OS crashes here, all originating in opencv.

The first appears to be
crash_dump32: cannot open libmiuindbg.so: No such file or directory

I don't know enough about Opencv to answer your question, but one thing I notice:
 cv2.destroyAllWindows()
Android is not a windowing operating system, if you are trying to create windows it will crash.

purushottam yadav

unread,
Sep 21, 2021, 4:52:02 AM9/21/21
to Kivy users support
Below is my initial question , and your reply  .
you said something about  .so file  . I have no clue about  .SO  files  , can you please explain in detail  .  
I found these   https://github.com/kivy/python-for-android/issues/2345https://github.com/kivy/buildozer/issues/1247      in which you replied to similar  question  anout  FFMPEG  in android  ,   but nothing is in detailed  . 
I need your help badly to finish a small android app .
I need to use FFMPEG to many case  in my android  app for video editing .  

=======================my initial question ===================


what is this error   PermissionError: [Errno 13] Permission denied: 'ffmpeg' 

with below  function  , it is happening  only on android platform   not on ubuntu . 

what all I  want is  to create thumbnail   for the video  path given to function .


    def thumforvideo(self , path):


        print(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3])
        result = os.path.basename(path)[:-3] + "jpg"
        print(result)
        ff = FFmpeg(  inputs  = {str(path): None}  ,
                      outputs = {str(result): ['-ss', '00:00:4', '-vframes', '1']}   )


        print(ff.cmd)
        # Print result
        # ffmpeg -i input.mp4 -ss 00:00:10 -vframes 1 output.png
        ff.run()
        print(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3])
        print(os.listdir())




==================your reply ==================



The error occurs because is no ffmpeg executable on Android, only the .so files (if ffmpeg is in requirements).

Robert

unread,
Sep 21, 2021, 12:44:04 PM9/21/21
to Kivy users support
The way you are trying to do this is not going to work because the executable does not exist on Android.

It is presumably possible to link the binary components of ffmpeg (.so files) but I don't have an example.

purushottam yadav

unread,
Sep 21, 2021, 2:44:03 PM9/21/21
to Kivy users support
but FFMPEG is in list of recipes of p4a .   then what is the issue here ? why permission denied error ?  


Do you know  any other pure python module or recipe  for video editing , cutting , thumbnail creation   ? 



Robert

unread,
Sep 21, 2021, 4:39:42 PM9/21/21
to Kivy users support
There is no executable, just the .so  
Reply all
Reply to author
Forward
0 new messages