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

Issue when accessing hardware h264 decoder #8086

Closed
c0ff330k opened this issue Dec 28, 2022 · 1 comment
Closed

Issue when accessing hardware h264 decoder #8086

c0ff330k opened this issue Dec 28, 2022 · 1 comment

Comments

@c0ff330k
Copy link

Software Versions

  • Python: 3.10
  • OS: Android
  • Kivy: v2.1.0
  • Kivy installation method: Buildozer

Describe the bug

I am developing android app with kivy and ffpyplayer for watching video streams.
But i'm using low performance hardware and getting lag on streams with 2500 bitrate and higher, so I decided to use hardware accelerated codecs like h264_v4l2m2m.
I add 'vcodec': 'h264_v4l2m2m' parameter of MediaPlayer in kivy.core.video.video_ffpyplayer.py but get this issue:

12-28 00:44:29.802  2065  2138 I python  : [ERROR  ] [ffpyplayer  ] [h264_v4l2m2m @ 0x7b181c6100] can't configure decoder
12-28 00:44:29.803  2065  2138 I python  : [CRITICAL] [ffpyplayer  ] Failed to open file 'http://213.145.131.243:80/cam1/stream.m3u8' or configure filtergraph
12-28 00:44:29.787  2138  2138 W Thread-6: type=1400 audit(0.0:25): avc: denied { read } for name="/" dev="tmpfs" ino=7196 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:device:s0 tclass=dir permissive=0

I found some information about this issue and it seems that

W Thread-6: type=1400 audit(0.0:25): avc: denied { read } for name="/" dev="tmpfs" ino=7196 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:device:s0 tclass=dir permissive=0

is a SELinux denial. So SELinux blocks ffmpeg when trying to access the hardware codec but I don't understand why this is happening.

I also post this issue here: matham/ffpyplayer#137 because I don't know it is ffpyplayer or kivy problem.

@misl6
Copy link
Member

misl6 commented Jan 21, 2023

Not an issue on Kivy side, if the codec is usable on Android, the issue should be addressed on python-for-android or ffpyplayer.

@misl6 misl6 closed this as completed Jan 21, 2023
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