matham / ffpyplayer

A cython implementation of an ffmpeg based player.
GNU Lesser General Public License v3.0
134 stars 38 forks source link

Provider: ffpyplayer(['video_ffmpeg'] ignored) - video not working #92

Closed Felipe738743872 closed 4 years ago

Felipe738743872 commented 4 years ago

problem

Hello, the audio works but the video not working :(

main.py:

from kivy.app import App
from kivy.uix.videoplayer import VideoPlayer
import os
os.environ["KIVY_VIDEO"] = "ffpyplayer"

class APPPP(App):
    def build(self):
        video = VideoPlayer(source='song.mp4')
        video.play = True
        return video

if __name__ == '__main__':
    APPPP().run()

specifications:

[app]
title = My Application
package.name = myapp
package.domain = org.test
source.dir = .
source.include_exts = py,png,jpg,kv,atlas,mp4
version = 0.1
requirements = python3, kivy, ffpyplayer
orientation = portrait
osx.python_version = 3
osx.kivy_version = 1.9.1
fullscreen = 0
android.arch = armeabi-v7a
p4a.branch = master
ios.kivy_ios_url = https://github.com/kivy/kivy-ios
ios.kivy_ios_branch = master
ios.ios_deploy_url = https://github.com/phonegap/ios-deploy
ios.ios_deploy_branch = 1.7.0
[buildozer]
log_level = 2
warn_on_root = 1

Log error | android phone:

07-18 12:50:52.550  4314  4613 I python  : Initializing Python for Android
07-18 12:50:52.551  4314  4613 I python  : Setting additional env vars from p4a_env_vars.txt
07-18 12:50:52.569  4314  4613 I python  : Changing directory to the one provided by ANDROID_ARGUMENT
07-18 12:50:52.569  4314  4613 I python  : /data/user/0/org.test.myapp/files/app
07-18 12:50:52.597  4314  4613 I python  : Preparing to initialize python
07-18 12:50:52.597  4314  4613 I python  : _python_bundle dir exists
07-18 12:50:52.597  4314  4613 I python  : calculated paths to be...
07-18 12:50:52.597  4314  4613 I python  : /data/user/0/org.test.myapp/files/app/_python_bundle/stdlib.zip:/data/user/0/org.test.myapp/files/app/_python_bundle/modules
07-18 12:50:52.617  4314  4613 I python  : set wchar paths...
07-18 12:50:52.824  4314  4314 W SDLThread: type=1400 audit(0.0:9617): avc: granted { execute } for uid=10447 path="/data/data/org.test.myapp/files/app/_python_bundle/modules/zlib.cpython-38.so" dev="mmcblk0p64" ino=2288530 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-18 12:50:52.862  4314  4613 I python  : Initialized python
07-18 12:50:52.862  4314  4613 I python  : AND: Init threads
07-18 12:50:52.864  4314  4613 I python  : testing python print redirection
07-18 12:50:52.865  4314  4613 I python  : Android path ['.', '/data/user/0/org.test.myapp/files/app/_python_bundle/stdlib.zip', '/data/user/0/org.test.myapp/files/app/_python_bundle/modules', '/data/user/0/org.test.myapp/files/app/_python_bundle/site-packages']
07-18 12:50:52.866  4314  4613 I python  : os.environ is environ({'PATH': '/sbin:/system/sbin:/product/bin:/apex/com.android.runtime/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin', 'ANDROID_BOOTLOGO': '1', 'ANDROID_ROOT': '/system', 'ANDROID_ASSETS': '/system/app', 'ANDROID_DATA': '/data', 'ANDROID_STORAGE': '/storage', 'ANDROID_RUNTIME_ROOT': '/apex/com.android.runtime', 'ANDROID_TZDATA_ROOT': '/apex/com.android.tzdata', 'EXTERNAL_STORAGE': '/sdcard', 'ASEC_MOUNTPOINT': '/mnt/asec', 'BOOTCLASSPATH': '/apex/com.android.runtime/javalib/core-oj.jar:/apex/com.android.runtime/javalib/core-libart.jar:/apex/com.android.runtime/javalib/okhttp.jar:/apex/com.android.runtime/javalib/bouncycastle.jar:/apex/com.android.runtime/javalib/apache-xml.jar:/system/framework/QPerformance.jar:/system/framework/UxPerformance.jar:/system/framework/tcmiface.jar:/system/framework/telephony-ext.jar:/system/framework/qcom.fmradio.jar:/system/framework/framework.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/android.test.base.jar:/apex/com.android.conscrypt/javalib/conscrypt.jar:/apex/com.android.media/javalib/updatable-media.jar', 'DEX2OATBOOTCLASSPATH': '/apex/com.android.runtime/javalib/core-oj.jar:/apex/com.android.runtime/javalib/core-libart.jar:/apex/com.android.runtime/javalib/okhttp.jar:/apex/com.android.runtime/javalib/bouncycastle.jar:/apex/com.android.runtime/javalib/apache-xml.jar:/system/framework/QPerformance.jar:/system/framework/UxPerformance.jar:/system/framework/tcmiface.jar:/system/framework/telephony-ext.jar:/system/framework/qcom.fmradio.jar:/system/framework/framework.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/android.test.base.jar', 'SYSTEMSERVERCLASSPATH': '/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar:/system/framework/com.android.location.provider.jar', 'DOWNLOAD_CACHE': '/data/cache', 'ANDROID_SOCKET_zygote': '18', 'ANDROID_SOCKET_usap_pool_primary': '20', 'ANDROID_ENTRYPOINT': 'main.pyc', 'ANDROID_ARGUMENT': '/data/user/0/org.test.myapp/files/app', 'ANDROID_APP_PATH': '/data/user/0/org.test.myapp/files/app', 'ANDROID_PRIVATE': '/data/user/0/org.test.myapp/files', 'ANDROID_UNPACK': '/data/user/0/org.test.myapp/files/app', 'PYTHONHOME': '/data/user/0/org.test.myapp/files/app', 'PYTHONPATH': '/data/user/0/org.test.myapp/files/app:/data/user/0/org.test.myapp/files/app/lib', 'PYTHONOPTIMIZE': '2', 'P4A_BOOTSTRAP': 'SDL2', 'PYTHON_NAME': 'python', 'P4A_IS_WINDOWED': 'True', 'P4A_ORIENTATION': 'portrait', 'P4A_NUMERIC_VERSION': 'None', 'P4A_MINSDK': '21', 'LC_CTYPE': 'C.UTF-8'})
07-18 12:50:52.866  4314  4613 I python  : Android kivy bootstrap done. __name__ is __main__
07-18 12:50:52.866  4314  4613 I python  : AND: Ran string
07-18 12:50:52.866  4314  4613 I python  : Run user program, change dir and execute entrypoint
07-18 12:50:52.901  4314  4314 W SDLThread: type=1400 audit(0.0:9618): avc: granted { execute } for uid=10447 path="/data/data/org.test.myapp/files/app/_python_bundle/modules/_heapq.cpython-38.so" dev="mmcblk0p64" ino=2288531 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-18 12:50:52.957  4314  4314 W SDLThread: type=1400 audit(0.0:9619): avc: granted { execute } for uid=10447 path="/data/data/org.test.myapp/files/app/_python_bundle/modules/math.cpython-38.so" dev="mmcblk0p64" ino=2288514 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-18 12:50:52.961  4314  4314 W SDLThread: type=1400 audit(0.0:9620): avc: granted { execute } for uid=10447 path="/data/data/org.test.myapp/files/app/_python_bundle/modules/_queue.cpython-38.so" dev="mmcblk0p64" ino=2288518 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-18 12:50:52.991  4314  4314 W SDLThread: type=1400 audit(0.0:9621): avc: granted { execute } for uid=10447 path="/data/data/org.test.myapp/files/app/_python_bundle/modules/_bisect.cpython-38.so" dev="mmcblk0p64" ino=2288507 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-18 12:50:52.991  4314  4314 W SDLThread: type=1400 audit(0.0:9622): avc: granted { execute } for uid=10447 path="/data/data/org.test.myapp/files/app/_python_bundle/modules/_sha512.cpython-38.so" dev="mmcblk0p64" ino=2288553 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-18 12:50:52.994  4314  4314 W SDLThread: type=1400 audit(0.0:9623): avc: granted { execute } for uid=10447 path="/data/data/org.test.myapp/files/app/_python_bundle/modules/_random.cpython-38.so" dev="mmcblk0p64" ino=2288506 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-18 12:50:53.007  4314  4314 W SDLThread: type=1400 audit(0.0:9624): avc: granted { execute } for uid=10447 path="/data/data/org.test.myapp/files/app/_python_bundle/modules/_opcode.cpython-38.so" dev="mmcblk0p64" ino=2288526 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-18 12:50:53.049  4314  4613 I python  : [WARNING] [Config      ] Older configuration version detected (0 instead of 21)
07-18 12:50:53.049  4314  4613 I python  : [WARNING] [Config      ] Upgrading configuration in progress.
07-18 12:50:53.059  4314  4613 I python  : [INFO   ] [Logger      ] Record log in /data/user/0/org.test.myapp/files/app/.kivy/logs/kivy_20-07-18_0.txt
07-18 12:50:53.059  4314  4613 I python  : [INFO   ] [Kivy        ] v1.11.1
07-18 12:50:53.059  4314  4613 I python  : [INFO   ] [Kivy        ] Installed at "/data/user/0/org.test.myapp/files/app/_python_bundle/site-packages/kivy/__init__.pyc"
07-18 12:50:53.059  4314  4613 I python  : [INFO   ] [Python      ] v3.8.1 (default, Jul 13 2020, 23:52:45) 
07-18 12:50:53.059  4314  4613 I python  : [Clang 8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec7462
07-18 12:50:53.059  4314  4613 I python  : [INFO   ] [Python      ] Interpreter at ""
07-18 12:50:53.060  4314  4613 I python  : [INFO   ] [Logger      ] Purge log fired. Analysing...
07-18 12:50:53.060  4314  4613 I python  : [INFO   ] [Logger      ] Purge finished!
07-18 12:50:53.071  4314  4314 W SDLThread: type=1400 audit(0.0:9625): avc: granted { execute } for uid=10447 path="/data/data/org.test.myapp/files/app/_python_bundle/site-packages/kivy/_clock.so" dev="mmcblk0p64" ino=2287304 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-18 12:50:53.887  4314  4613 I python  : [INFO   ] [Factory     ] 184 symbols loaded
07-18 12:50:54.204  4314  4314 W SDLThread: type=1400 audit(0.0:9637): avc: granted { execute } for uid=10447 path="/data/data/org.test.myapp/files/app/_python_bundle/site-packages/kivy/graphics/instructions.so" dev="mmcblk0p64" ino=2287578 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-18 12:50:54.211  4314  4314 W SDLThread: type=1400 audit(0.0:9638): avc: granted { execute } for uid=10447 path="/data/data/org.test.myapp/files/app/_python_bundle/site-packages/kivy/graphics/buffer.so" dev="mmcblk0p64" ino=2287571 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-18 12:50:54.217  4314  4314 W SDLThread: type=1400 audit(0.0:9639): avc: granted { execute } for uid=10447 path="/data/data/org.test.myapp/files/app/_python_bundle/site-packages/kivy/graphics/vertex.so" dev="mmcblk0p64" ino=2287587 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-18 12:50:54.224  4314  4314 W SDLThread: type=1400 audit(0.0:9640): avc: granted { execute } for uid=10447 path="/data/data/org.test.myapp/files/app/_python_bundle/site-packages/kivy/graphics/cgl.so" dev="mmcblk0p64" ino=2287586 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-18 12:50:54.231  4314  4314 W SDLThread: type=1400 audit(0.0:9641): avc: granted { execute } for uid=10447 path="/data/data/org.test.myapp/files/app/_python_bundle/site-packages/kivy/graphics/vbo.so" dev="mmcblk0p64" ino=2287591 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-18 12:50:54.450  4314  4613 I python  : [INFO   ] [ImageLoaderFFPy] Using ffpyplayer 4.2.0.dev0
07-18 12:50:54.454  4314  4613 I python  : [INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_ffpyplayer, img_gif (img_pil ignored)
07-18 12:50:54.565  4314  4613 I python  : [INFO   ] [Text        ] Provider: sdl2
07-18 12:50:54.626  4314  4613 I python  : [INFO   ] [VideoFFPy   ] Using ffpyplayer 4.2.0.dev0
07-18 12:50:54.628  4314  4613 I python  : [INFO   ] [Video       ] Provider: ffpyplayer(['video_ffmpeg'] ignored)
07-18 12:50:54.716  4314  4613 I python  : [INFO   ] [Window      ] Provider: sdl2
07-18 12:50:54.757  4314  4613 I python  : [INFO   ] [GL          ] Using the "OpenGL ES 2" graphics system
07-18 12:50:54.759  4314  4613 I python  : [INFO   ] [GL          ] Backend used <sdl2>
07-18 12:50:54.760  4314  4613 I python  : [INFO   ] [GL          ] OpenGL version <b'OpenGL ES 3.2 V@415.0 (GIT@961b24f, Ib57168459a, 1582563542) (Date:02/24/20)'>
07-18 12:50:54.761  4314  4613 I python  : [INFO   ] [GL          ] OpenGL vendor <b'Qualcomm'>
07-18 12:50:54.761  4314  4613 I python  : [INFO   ] [GL          ] OpenGL renderer <b'Adreno (TM) 506'>
07-18 12:50:54.762  4314  4613 I python  : [INFO   ] [GL          ] OpenGL parsed version: 3, 2
07-18 12:50:54.762  4314  4613 I python  : [INFO   ] [GL          ] Texture max size <16384>
07-18 12:50:54.763  4314  4613 I python  : [INFO   ] [GL          ] Texture max units <16>
07-18 12:50:54.819  4314  4613 I python  : [INFO   ] [Window      ] auto add sdl2 input provider
07-18 12:50:54.820  4314  4613 I python  : [INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
07-18 12:50:54.951  4314  4613 I python  : [WARNING] Deprecated property "<BooleanProperty name=play>" of object "<kivy.uix.videoplayer.VideoPlayer object at 0x884e4628>" has been set, it will be removed in a future version
07-18 12:50:54.952  4314  4613 I python  : [WARNING] [Base        ] Unknown <android> provider
07-18 12:50:54.952  4314  4613 I python  : [INFO   ] [Base        ] Start application main loop
07-18 12:50:54.958  4314  4613 I python  : [ERROR  ] [Image       ] Error loading texture song.mp4
07-18 12:50:54.968  4314  4613 I python  : [INFO   ] [GL          ] NPOT texture support is available
07-18 12:50:54.972  4314  4613 I python  : [WARNING] Deprecated property "<BooleanProperty name=play>" of object "<kivy.uix.video.Video object at 0x87c17238>" was accessed, it will be removed in a future version
07-18 12:51:06.562  4314  4613 I python  : [WARNING] [Image       ] Unable to load image </data/user/0/org.test.myapp/files/app/_python_bundle/site-packages/kivy/data/images/image-loading.gif>
07-18 12:51:06.563  4314  4613 I python  : [ERROR  ] [Image       ] Error loading texture data/images/image-loading.gif
07-18 12:51:06.785  4314  4758 I python  :  Exception in thread Next frame:
07-18 12:51:06.786  4314  4758 I python  :  Traceback (most recent call last):
07-18 12:51:06.786  4314  4758 I python  :    File "/home/kivy/Desktop/APP/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Lib/threading.py", line 932, in _bootstrap_inner
07-18 12:51:06.793  4314  4758 I python  :    File "/home/kivy/Desktop/APP/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/jnius/__init__.py", line 84, in jnius_thread_hook
07-18 12:51:06.794  4314  4758 I python  :    File "/home/kivy/Desktop/APP/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Lib/threading.py", line 870, in run
07-18 12:51:06.795  4314  4758 I python  :    File "/home/kivy/Desktop/APP/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/core/video/video_ffpyplayer.py", line 240, in _next_frame_run
07-18 12:51:06.795  4314  4758 I python  :  AttributeError: module 'time' has no attribute 'clock'
07-18 12:51:06.809  4314  4781 I python  : [WARNING] [ffpyplayer  ] [swscaler @ 0x840b7a80] No accelerated colorspace conversion found from yuv420p to rgba.
matham commented 4 years ago

This is a bug in Kivy not in ffpyplayer, but it already has been fixed in Kivy master.