make android video player for android

66 views
Skip to first unread message

Degenerate Tech

unread,
Oct 13, 2021, 2:18:20 AM10/13/21
to Kivy users support

is there any idea to get texture in every frame from video file using android media player .
so we can build powerful video player. and it will be faster.i know kivy videoplayer is also exsist but kivy videoplayer is very limited .
https://developer.android.com/reference/android/media/MediaPlayer

Robert

unread,
Oct 13, 2021, 1:50:19 PM10/13/21
to Kivy users support
Well that is an interesting question. You are good at that.

I have recently been working on a camera preview for Android that is a true Kivy widget (unlike CameraXF).
I'll share it when its done, hopefully before the end of the year.

This question looks like the same design issue except the video provider is different (a file reader in place of a camera).
In the camera case I give a Kivy Texture to the Android camera which wraps it in some data structure (!) and fills it with an image, and the Texture eventually (!!!) gets painted to a canvas. In retrospect it is pretty clear, but it took a long time to figure out why it would be clear.

I looked at the MediaPlayer source  https://android.googlesource.com/platform/frameworks/base/+/56a2301/media/java/android/media/MediaPlayer.java . See line 649.  I really don't know if this is possible. But the good news is if you can figure out filling one Texture, a (my) camera preview widget will be an example of how to do the rest. I don't know anything about the audio part.

Degenerate Tech

unread,
Oct 14, 2021, 3:58:39 AM10/14/21
to Kivy users support

Robert

unread,
Oct 14, 2021, 11:42:36 PM10/14/21
to Kivy users support
Conceptually yes. But the camera api is different.
If you are interested in the details from Python look at Color Blind Camera which used the Camera2 api
(but I don't think anybody got rotate to work with the CBC implementation).
CameraX (which obviously I used for CameraXF) development started with the Camera2 api and then .... changed.
Sadly I found a quite basic issue https://issuetracker.google.com/issues/201085351?pli=1
FYI, the response was: a developer from Banglore will look into it.
Reply all
Reply to author
Forward
0 new messages