-
Notifications
You must be signed in to change notification settings - Fork 56
QmlVlc on Android framerate #29
Comments
Sorry, I didn't test it on android. I even don't have any android device to try. |
btw, do you use VlcPlayer or VlcMmPlayer? if you use VlcPlayer, then try VlcMmPlayer, it could help, but I don't sure. |
I've tried both of them. But I'm gonna try again VlcMmPlayer. |
btw, don't use "-vvv" option - it enables debug mode, and could affect performance. |
I just tried VlcMmPlayer. Same result. Yes you're right, "-vvv" enables debug mode. I removed it. The parames are now: |
It seems QmlVlc needs some optimizations for android platform... |
Hello again RSATom. I spend too much time to solve this issue. But I couldnt yet. |
Android devices just much less powerful than any desktop platform, and if on desktop decoding frame to memory and after that transfer to video memory is fast enough for smooth playback, on android device it could be much worse. |
btw, did you try to use QtMultimedia (i.e. without QmlVlc at all)? Does it has acceptable performance? |
Yes, I tried 1080p videos on QtMultimedia QML Video element. It plays perfect on tablet. I checked vlc android sources, but it seems simple. It uses libvlc's display methods. I didnt find any opengl code section. I checked QtMultimedia sources also, it's too complicated. I checked opengl shaders code section. It's too hard to find the reason. |
Sorry, don't know how to help you... I even don't have any android device to test it on... Do you really need QmlVlc if QtMultimedia work good? |
QtMultimedia cannot play http and rtsp streams, some video formats. If I rebuild QtMultimedia gstreamer with streaming feature, I can use that. |
Understand... I'm afraid I can't help you, at least this time, maybe later but don't know when exactly... Sorry. |
Hello, I've been trying to configure qmlvlc demo to compile to android devices with QT5.4 with no luck. I'm new in android development. I followed these steps:
Anyone can help me? Thank you. |
Are you really need QmlVlc? It needs to be optimized for android before. |
I would like to try and help its development if I can. |
I will be glad if you will try. But, unfortunately, I couldn't help you with any android related questions - Maybe somebody else will... Please keep me informed about progress. Thanks! |
Hi friends. I follow different way on Android and it's done. I've integrated LibVLC into QtMultimedia source, modified original java files, compiled it. I created a hybrid system. After compiling, I just copy modified jar files into my "C:\Qt\5.4\android_armv7\jar" directory. It means I can use original QML elements in my QML project on Android. I can use original MediaPlayer or modified MediaPlayer. It's too easy. If I add ":VLC" suffix to MediaPlayer.source it uses QtMultimediaWithLibVLC at backend, otherwise it uses original QtMultimedia. So, QtMultimedia on Android is powerful now. I want to share it with Qt friends, but I have no time. I will. And dear Tom, I worked LibVLC QML project on desktop. It's a small project and uncompleted yet. It uses widget hwnd to display. Can I create a different repo for this? |
@mzafers, it's great! And I would like to see how you did it.
I don't understand. Why do you ask me? You free to do anything you like :) |
Ok :) I will do some cosmetics (clean some output logs) for QtMultimediaVLC on Android and share it. Maybe name is "QtMultimediaVLC". In fact, I did try Vitamio integration before. I did it, but I faced an issue about hardware acceleration modules releasing. It can play first attempt fine, but if I release mediaPlayer and create again it cannot play with hardware acceleration mode. And then I decided to work on LibVLC. And my second job is LibVLC QML for desktop. I couldn't find a name for it. It's tiny and uncompleted yet. |
Btw, on what hardware did you test it? And how smooth was playback? |
I've Samsung 7" T230 tablet and LG G2 Mini mobile phone. I tested bigbuckbunny 1080p 30fps video. It plays fine. If VLC application can play then QtMultimediaVLC can play. Same result. |
How do you think, is it possible achieve same result with QmlVlc? Do you know what exactly wrong with it? |
I think, EGLImage method can do that. It's hard to implement it. |
So the bottleneck in QmlVlc is copy decoded frame from memory to video memory? |
Yes it is. I see that, glTexImage2D / glTexSubImage2D functions work slow. |
It was predictable... Thank you for info. |
@mzafers mzafers Can you please tell what you have done? |
Hi. I've downloaded VLC Android and QtMultimedia source, copied VLC java files into QtMultimedia dirs, added them to jar project, modified QtMultimedia's own java files and compiled jar.pro only. It generates 2 jar files. (QtMultimedia.jar and QtMultimedia-bundled.jar) I copied them into C:\Qt\5.4\android_armv7\jar dir. I cannot create my own repo yet about this project. |
[removed] |
I'm creating new repo for this. What is your Android version? |
I've created. You can check my repos. But I couldn't format readme.md file in my QtVlcMediaPlayerSample repo, sorry. Maybe I modify the file later. I tested it on Android 4.4.2 and 4.1.2. |
Amazing! Will check it right now. |
Please comment after you tried. |
You are my hero!!! This works simply perfect. Tested on my Android lowspeed 4.2.2 Android Tablet device. Will try it also on my Nexus 4 with Android 5.1.1. I also try QtAv project from wang-bin but it was hard to compile and furthermore content was als a little bit stuttering and asynchronous. I think you (or we) MUST publish your work. Can you also provide the merged source code from QtMediaPlayer and VLC? |
Did it work :) Thanks. I send it Qt Forum. Qt friends should use it. Actually I try QtAV before. But it was slow and unstable. I spend tooooo much time to play high res videos, streams on Qt Android. But I cannot find any solution. And then I started to read LibVLC java files and modify QtMultimedia java files. In fact I developt this 3 months ago. I dont have time for github. I saw your comment yesterday and I shared it. I will publish the codes when I free. |
Really really good! Currently I play hd content from a Upnp Device over wireless network on my tablet with your MediaPlayer implementation. I try also differnt solutions but no one works perfect...until your implementation. On my Nexus 4 with Android 5.1.1 I got following error: E/art (19564): dlopen("/data/app/org.qtproject.example.QtQmlMediaPlayer-2/lib/arm/libiomx.14.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "_ZN7android12MemoryDealerC1EjPKc" referenced by "libiomx.14.so"... I seems that libiomx.14.so must be build against different Android version, right? Can you do it? |
I don't have an Android 5 device. Right, maybe LibVLC files don't support Android Lollipop. I will try it on Android 5 emulator. |
Something new regarding Android 5? |
In fact, I couldn't build my sample project today. I'll try again later. Do you need to use this on Android 5? |
Well, it would be really nice because more and more Android devices will be updated to latest Android versions. So when you be able to build it you project can become even more useful :-)! |
Can you provide source code? Maybe I can help you with development. |
I found the problem :-)! To run the project on Android 5 devices simply not include "libiomx.14.so". So I removed the include path for this library and it works. I studied code from "http://maci.satgnu.net/rpmbuild/BUILD/xbmc-12.2/xbmc/android/activity/AndroidFeatures.cpp" while searching for "libiomx.14.so" and see that they do not use this library for Android versions bigger than IceCreamSandwich (Version 4.2). Playback is working like a charm! |
Then we need 2 apk file. It's not good. |
Well...than we have to patch the line where libVLC tries to load "libiomx.14.so". However maybe we can continue discussing this issue at your repo? Please can you also push the source code? |
I pushed. You can see the trick at QtAndroidMediaPlayer.java file. |
Amazing! |
hi @mzafers I've just tried QmlVlc on Neo Minix X5 Mini 4.2.2 to play some mp4 file and the framerate is very slow. I've tried the QmlVlcDemo and got the same issue. Do you got any idea or can you tell me who to see the trick for that? |
Hello RSATom. I try to use QmlVlc on Android. I have a dual core 1Ghz tablet. VLC.apk can play fullHD video. But QmlVlc cannot. I think hardware acceleration mode is not enabled. I search VLC parameters, I found that:
const char _argv[] = {"-I", "dummy", "-vvv", "--no-drop-late-frames", "--codec", "iomx,all"};
size_t argc = sizeof(argv) / sizeof(_argv);
return libvlc_new(argc, argv);
If I set that parameters in QmlVlcConfig.cpp file, tablet can play fullHD video low fps and some freeze. Do you know how to play a fullHD video on QmlVlc like VLC.apk? What are the best parameters? Any idea?
The text was updated successfully, but these errors were encountered: