- Build ffmpeg;
- patch and rebuild Qt Multimedia;
- build the whatever component you want in POT, which includes:
- test app using the POT library;
- POT library;
- POT plugin;
- proof-of-concept player (POCPlayer).
Build ffmpeg
Building ffmpeg and preparing the other 3rdparty deps is simple: go to piomxtextures_tools and run the prepare_3rdparty.sh script. This should also build ffmpeg:
export COMPILER_PATH=
cd /piomxtextures_tools
./prepare_3rdparty.sh n(n is the number of threads)
./prepare_3rdparty.sh
Patch and Rebuild Qt Multimedia
Unfortunately, still a patch to QtMultimedia is needed, so go into the qtmultimedia dir of your Qt source tree (latest tested is Qt 5.4.1) and patch using the patch provided in tools:$QMAKE_PATH CONFIG+=raspberry
make -jn
make install
Build Components in POT
luca@raspberrypi ~ $ ./piomxtextures_pocplayer
* failed to open vchiq instance
then set the permissions appropriately:
sudo chmod a+rw /dev/vchiq
Or better add your user to the video group. Same stands for input devices:
sudo usermod -a -G video
sudo usermod -a -G input
Old Build Procedure (prev cfe5a9e)
Building PiOmxTextures (POT for convenience) is a little convoluted. Some work should probably be done to make it simpler. However it requires three main steps:- Build ffmpeg;
- build the POT library;
- build the POT Qt plugin.
Building ffmpeg
Building ffmpeg should be pretty simple if a proper sysroot is available. A script is provided in the POT repo:
export COMPILER_PATH=
./compile_ffmpeg.sh n(n is the number of threads)
After this, ffmpeg libs will be placed in the 3rdparty directory and nothing more needs to be done.
NOTE: I had to modify the libssh pkgconfig file ($RPI_SYSROOT/usr/lib/arm-linux-gnueabihf/pkgconfig/libssh.pc) to:
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/arm-linux-gnueabihf
includedir=${prefix}/include
Name: libssh
Description: The SSH Library
Version: 0.5.4
Libs: -L{libdir} -lssh
Cflags: -I{includedir}
Building POT lib
POT lib is needed to get an interface to hardware video and audio decoding/playback. A script is provided to prepare the POT lib and the sources for the Qt driver:./prepare_openmaxil_backend.sh
Now you have to copy the directory of the plugin to the src/plugins subdirectory of your Qt source tree. Once finished, this plugin will be built.
Building POT Qt driver
Unfortunately, still a patch to QtMultimedia is needed, so go into the qtmultimedia dir of your Qt source tree (I tested on the Qt 5.4.0 tree) and patch using the patch provided in tools:cp -a
patch -p1 <
$QMAKE_PATH CONFIG+=raspberry
make -jn
make install
Now you should have the new openmaxil plugin in your Qt prefix. When using, remember that libPiOmxTextures.so* must be in the runtime library path when using the plugin. If an error like this is returned when running an application using the plugin:
luca@raspberrypi ~ $ ./POCPlayer
* failed to open vchiq instance
then set the permissions appropriately:
sudo chmod a+rw /dev/vchiq
Or better add your user to the video group. Same stands for input devices:
sudo usermod -a -G video
sudo usermod -a -G input
hi, while building the latest sources (6f4e2f1efd65) and running ./prepare_openmaxil_backend.sh it ends up with a couple of errors like:
ReplyDeletemkdir: cannot create directory ‘/usr/local/qt-5.4.1/plugins’: Permission denied
i could give him sudo, but is this correct? Am i doing it correctly?
Thank you.
ah figured it out, ./prepare_openmaxil_backend.sh is not needed on latest source, however there is still a problem, when compiling qtmultimedia I get Cannot find file: /home/nick/opt/qt-5.4/qt5/qtmultimedia/src/plugins/openmaxil/openmaxil.pro. and I can not find this file anywhere in the repo.
DeleteYes, prepare_openmax_backend.sh is not needed anymore. Follow the procedure in the build page.
DeleteI'm confused between the old and new way of building :) Can not get it work at all. The ./prepare_3rdparty.sh runs successfully but im unsure about what param qt_src_root means (i suppose its my QT source tree, i.e. the dir where i have the qt modules like qtmultimedia). The ffmpeg seems to compile successfully (i have the libs in 3rdparty/ffmpeg/lib/). The qtmultimedia patch executes without error but when I compile qtmultimedia i get the error above about missing openmaxil.pro file. From the scripts I dont understand what is supposed to copy it there. Any ideas?
ReplyDeleteYes, the patch... needs a patch... :-) no need to build openmaxil backend anymore. It is built outside.
Deleteforgot to mention, I'm using QT 5.4.1 from git.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteDo you have pkg-config installed? Are you crossbuilding?
DeleteHi,
ReplyDeleteI delete the latest post by error:
I was not able to compile ffmpeg, even if I had installed lidssh-dev. I've solved it by modifying libssh.pc file as Luca describe above.
Moving on the new procedure, I've seen that prepare_openmax_backend.sh is no needed anymore.
So, to make the player work correctly, we need to include the piomxtextures_qt_driver.pro in our project and use the openmaxilmediaplayer as player?
If not, could you make a quick description about how to use POT without compiling it as a qtmultimedia pluggin?
Thanks!
The POT library is built as a shared lib and you can find it in piomxtextures_lib. You'll have to take the needed headers yourself, I removed the installation of the headers. The Qt Multimedia Plugin uses the POT lib itself, so you can have a look at that.
DeleteThanks for your reply!
DeleteI've also realized that building the piomxtextures_qt_driver does the same as it used to the old installation. The problem no is while "making" it I get this errors:
/mnt/rpi/usr/lib/arm-linux-gnueabihf/libm.a(fesetround.o): In function `fesetround':
(.text+0x78): undefined reference to `_dl_hwcap'
/mnt/rpi/usr/lib/arm-linux-gnueabihf/libm.a(feholdexcpt.o): In function `feholdexcept':
(.text+0x48): undefined reference to `_dl_hwcap'
/mnt/rpi/usr/lib/arm-linux-gnueabihf/libm.a(fesetenv.o): In function `fesetenv':
(.text+0x64): undefined reference to `_dl_hwcap'
It seems that there is some broken symlinks...
Yes, maybe in your sysroot.
DeleteThanks Luca. Rerunning fixQualifiedLibraryPaths fix the problem.
DeleteDear Luca,
DeleteFirst, thanks for you great work, where is the donate button? :)
Second: I have a raspbian jessie with QT 5.3.2 installed. I've cloned you git, patched qt recompile qtmultimedia, ffmpeg, etc... everything have been compiled successfull.
Everything was compiled ON rpi (not crosscompiled)
So, startx, xterm, and type ./piomxtextures_app
12:57:17.009 VERBOSE: Setting source.
12:57:17.017 VERBOSE: Source was set: 11b24c8.
Fontconfig warning: ignoring UTF-8: not a valid region tag
Cant find EGLConfig, returning null config
Unable to find an X11 visual which matches EGL config 0
Could not initialize OpenGL
Aborted
What is wrong?
Thanks,
Tibor
Forgive me. The second question is solved :)
ReplyDelete(i've given wrong qt source at 3rd party script).
Thanks,
Tibor
If you want to donate to the project you can contact me in private.
DeleteHi. At first thank you for your job and to share it. I have a rpi 2 where i have already compiled qt5.5 on the card (with Gstreamer 0.10, i don't know how to use gstreamer 1). I'm trying to build PiOmxTextures but i have some problems. I'm trying to build ffmpeg, for information i did that on the card, no cross compil.
ReplyDeleteexport RPI_SYSROOT=/
export COMPILER_PATH=/usr/bin
cd tools
./compile_ffmpeg.sh pi2
ihave this error :
Prefix to /home/pi/opt/pi-master/3rdparty/ffmpeg/ffmpeg_src...
ERROR: smbclient not found
Building...
Makefile:2: config.mak: No such file or directory
Makefile:59: /common.mak: No such file or directory
Makefile:100: /libavutil/Makefile: No such file or directory
Makefile:100: /library.mak: No such file or directory
Makefile:102: /doc/Makefile: No such file or directory
Makefile:185: /tests/Makefile: No such file or directory
make: *** No rule to make target '/tests/Makefile'. Stop.
Makefile:2: config.mak: No such file or directory
Makefile:59: /common.mak: No such file or directory
Makefile:100: /libavutil/Makefile: No such file or directory
Makefile:100: /library.mak: No such file or directory
Makefile:102: /doc/Makefile: No such file or directory
Makefile:185: /tests/Makefile: No such file or directory
make: *** No rule to make target '/tests/Makefile'. Stop.
Cleaning up...
mv: cannot stat `ffmpeg_compiled/include': No such file or directory
mv: cannot stat `ffmpeg_compiled/lib': No such file or directory
Done! Bye bye! ;-)
Do you know where is the problem ?
It seems you are not providing a proper sysroot. I suggest you use the prebuilt packages.
Deletei got the same problem, my sysroot is ok i think as i'am using it often to cross compile my apps, any idea what should we check to fix our problems ? :)
DeleteThe library cannot be found or maybe it is not in the sysroot at all. Maybe something related to pkgconfig. Cannot be more specific, it depends on your setup.
Deletehmm the problem exists with --sysroot=$RPI_SYSROOT
Deletewhen i set /mnt/raspiimg (mounted img of jessie from my pi)
i get error like in Anonymous message
when i set it to my crosscompiled with crosstool-ng directory armv7-rpi2-linux-gnueabi/armv7-rpi2-linux-gnueabi/sysroot
i get some other errors like
/Volumes/Cross/armv7-rpi2-linux-gnueabi/bin/armv7-rpi2-linux-gnueabi-gcc is unable to create an executable file.
C compiler test failed.
but when i remove it everything goes fine when executing ./prepare_3rdparty.sh
what excatly is --sysroot and do i need it or will it be fine without it ?
The guy above set RPI_SYSROOT to /, which I suspect is wrong as that is the root of the host. I don't know anything about your issue because I know nothing about your setup.
DeleteHi Luca...
ReplyDeleteIs this still the procedure to build POT from sources?
Is a patch to Qt Multimedia still needed?
On the other hand, we decided to buy the Commercial version of Qt, and they provide a image for raspberry pi 2 based on Armstrong using the Yocto project, but now we are facing the problem to include in it POT and assure Hardware Accelerated Videos...
Have you tried something in this line?
No, actually no. Not needed anymore. I'll update the procedure.
DeleteNo, sorry, never tried to build on anything other than raspbian. Doesn't commercial Qt have a solution for Qt Multimedia?
DeleteAdded a proper note to the article.
DeleteNicolas, can you ask Qt why gstreamer 1.0 isn't working with QML as backend? gstreamer 1.0 can hardware-decode videos on PI.
ReplyDeleteIt seems to work in my build. Not sure however if it is possible to improve.
Deletehi, i'am back with some more questions :) i have succesfully compiled qt5 with gstreamer, and then i followed tutorial found on this page:
ReplyDelete1. run prepare_3rdparty.sh
2. rebuild qtmultimedia
3. build qt plugin, after this i have
libgstaudiodecoder.so libgstmediacapture.so libopenmaxilmediaplayer.so
libgstcamerabin.so libgstmediaplayer.so libqtmedia_audioengine.so
in qt/plugins/mediaservice
3. next i build piomxtextures_pocplayer upload and try to run, after starting video app crashes with
qml: Setting media source...
Segmentation fault
I have also tried to move libgstmediaplayer.so file from mediaservice dir but then i get no error only
qml: Setting media source...
and nothing happens
what am i missing and what is piomxtextures_lib, do i need it ?
Remove any libgst* file from mediaservice directory. gstreamer and POT are mutually exclusive.
Deletehi, ok, i have tried and nothing happens when i click open and chose a file (.mp4) (tried with your compiled qt and it worked fine some time ago) i only get:
DeleteUnable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
Can't find extension for .
Can't find extension for image/jp2.
Can't find extension for image/vnd.microsoft.icon.
Can't find extension for image/x-dds.
Can't find extension for image/x-icns.
Can't find extension for image/x-mng.
qml: Setting media source...
and thats all, black screen, pocplayer still works as i can open menu by click mouse.
what should i check ?
Read the blog, you'll find information.
Deletesorry, cant edit, when no libgstmediaplayer lib in mediaservice folder i also get:
ReplyDeletedefaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
Clearly not enough information here.
DeleteHi Luca, Following the cross compile tutorial from qt wiki I was able to cross compile and deploy qml apps to rpi :):) now I want to add your qt multimedia backend.
ReplyDeleteIn the beginning you say that the patch isn't need no more but than you say we need to patch. Can you take a look at the tutorial above and say if it is updated or not? Thank you
This comment has been removed by the author.
DeletePS: here is my build config: http://pastebin.com/mStsgGUM
DeleteThe procedure is there for any version of POT, even the olders. The note in red applies to the latest versions. So if you are in that condition you can skip that step now.
Deletehttp://pastebin.com/D8eqMSYZ
DeleteDo I need smbclient to compile ffmpeg? if yes do I need to install ir on pi, right?
It depends on how you set it up. My setup includes it, yes.
DeleteI have installed libsmbclient and libsmbclient-dev on RPi, then I sync the files again on host but it still cant find smbclient :s ERROR: smbclient not found
DeletePS: my config:
Deleteexport RPI_SYSROOT=~/raspi/sysroot
export COMPILER_PATH=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/
./prepare_3rdparty.sh ~/raspi/qtbase/ pi1
http://pastebin.com/wGfYDLcf
The build procedure is pretty long. You also need to setup pkgconfig. Not sure if it is the case here.
Deleteit looks like pkgconfig isn't looking for libraries inside sysroot http://pastebin.com/YUQuxA3m can you take a look?
DeleteI manually change the smbclient.pc file to make the it point to the correct path and now configure pass the smbclient test but failed next at libssh because all the *.pc files are point to /user/lib/arm-linux-gnueabihf instead of home/ze/raspi/sysroot/usr/lib/arm-linux-gnueabihf
ReplyDeleteDo you remember what have you done to make it work?
Thank you a lot
You're probably missing the env setup for pkgconfig. What are you trying to accomplish? Building for Pi1?
DeleteI tried to set PKG_CONFIG_PATH with no sucess. Yes, i'm trying to compile it to Pi1.
ReplyDeleteI got this answer from ffmepg mailinglist:
"Well, you have "--pkg-config=pkg-config" in your configure line, what did
you expect?
http://ffmpeg.org/faq.html#How-do-I-use-pkg_002dconfig-when-cross_002dcompiling_003f"
But after read that I don't know how to change pkg-config.
I think I added that for Jessie recently. But unless there is a comment somewhere I don't remember why.
DeleteI download the scr from your git recently, do you have a development branch?
ReplyDeleteI have read the the all the comments from your recent posts but couldn't find any information about pkg-config settings. Would you mind to search in your host bash history for pkg-config settings related?
Thank yoh
No that script is what I use. You should set up the entire env properly, can't say what is wrong sorry. Try with a pkgconfig manual and see what you are missing.
DeleteCan you at least see if you have any pkg-config setting on bashrc that you didn't remember to set up?
ReplyDeleteThat strange why it is working.. Can you share your target sysroot folder on host to compare?
We need to set up this variable export PKG_CONFIG_SYSROOT_DIR=/home/ze/raspi/sysroot so we don't need to manually change pc files :)
ReplyDeleteNow that I prepare_3rdparty is done what do I need to do?
Build POT.
Deleteqmake
ReplyDeletemake
make install
thats it?
http://pastebin.com/3zvXC3ty
ReplyDeleteDo you compile qtbase and then each module you need?
ReplyDeleteOk, I have compiled QtQuick but now I'm trying to solve some opengl problems for some hous without success http://pastebin.com/RZehkPzN :s
ReplyDeleteAny idea what is happening?
ReplyDeleteI haven't found how to solve this problem :S
ReplyDeleteIt is trying to use GLES3 and RPI only support GLES2, don't you remember if you have set up anything related to it?
ReplyDeleteYour setup is clearly wrong, it is trying to build against a wrong gl, but can't know why. What is your Qt config?
DeleteQt config http://pastebin.com/mktyGshE
Deletewhen doing ./prepare_3rdparty.sh you ask for qt_src_root, do you really mean the src or the binaries?
DeleteSeems ok. Remove the package that includes GLES3.
DeleteI didn't do that $QMAKE_PATH CONFIG+=raspberry should it be the reason?
DeleteIt is what I have done:
Deleteexport RPI_SYSROOT=~/raspi/sysroot
export COMPILER_PATH=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/
export PKG_CONFIG_SYSROOT_DIR=/home/ze/raspi/sysroot
cd carlonluca/piomxtextures_tools/
./prepare_3rdparty.sh /home/ze/raspi/qtbase/ pi1
cd ..
~/raspi/qt5/bin/qmake
make
I found I don't have a qtmultimedia folder as told here http://thebugfreeblog.blogspot.pt/2014/12/updates-on-hardware-accelerated-qt.html
DeleteUnless you are using a version < 5.1.0 you don't need to patch qtmultimedia. You just need a regular qtmultimedia build.
DeleteI'm using Qt 5.6.0 and the most recent POT. Can you check my previous comment and see if i'm exporting the need variables or if there is something more?
ReplyDeleteThank you
I'm sorry, again it depends on your setup. That GL problem indicates you have a setup that includes packages that I'm not using, so I do not know what is wrong or missing.
DeleteCan you just confirm me that it is the right procedure:
Deleteexport RPI_SYSROOT=~/raspi/sysroot
export COMPILER_PATH=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/
export PKG_CONFIG_SYSROOT_DIR=/home/ze/raspi/sysroot
cd carlonluca/piomxtextures_tools/
./prepare_3rdparty.sh /home/ze/raspi/qtbase/ pi1
cd ..
~/raspi/qt5/bin/qmake
make
Could you please confirm me these are the needed commands to build POT?
ReplyDeleteHello again... I have been trying to build it without no success. Obviously there is something I'm doing wrong, can you revisit it please? Can you share your ENV VAR and the commands list you're using to compile it?
ReplyDeleteThank you
metRo, as apparently we're using a similar environment, I'll share what has worked for me (Pi 1)
Delete1) I followed the following procedure to build Qt 5.6.1 for Pi:
https://wiki.qt.io/RaspberryPi2EGLFS
But instead of using the full stock jessie image, I opted for the minimal one.
I had to add some include paths to the config script (-I) to correct a few build errors ("~/raspi/sysroot/opt/vc/include" "~/raspi/sysroot/opt/vc/include/interface/vcos/pthreads" "~/raspi/sysroot/opt/vc/include/interface/vmcs_host/linux")
2) After successfully building qtbase, I built qtmultimedia with gst-omx support. The build procedure clearly states that it's unusable - but I gave it a try anyway.
The QVideoWidget support is really bad - a frame or two is displayed and then it crashes.
After building QtDeclarative, I could verify that the QML video sample works better - but crashes too... So GSteamer 1.0 + gst-omx still sucks.
3) The aforementioned build procedure links to Luca's project as an open implementation of openmax + qt. That's how I got it compiled in my environment:
- Downloaded POT 5.2.0 and tried to compile using my sysroot.
- ffmpeg complained about samba and ssh. It doesn't matter if you apt-get those stuff, rsync + correct the symlinks. The ffmpeg configure script won't find it.
Then I just disabled those dependencies in compile_ffmpeg.sh script (--disable-libsmbclient --disable-libssh). Worked.
- Next I had to deal with the same gles3 header problem as you had - weird, because the qtbase was configured with -opengl es2. Anyway that's how I've fixed it:
~/raspi/qt5pi/include/QtGui/qopengl.h:
//manually undef this guys...
#undef QT_OPENGL_ES_3_1
#undef QT_OPENGL_ES_3
// before the following lines:
# if defined(QT_OPENGL_ES_3_1)
# include
# elif defined(QT_OPENGL_ES_3)
# include
# else
# include
#endif
Bingo... gles3 solved.
Then you'll need a few more packages during the compile time (v4l2, boost maybe more), and then a few others (ssh, bz2) during link time. If your environment is different, just pay attention to missing headers or libraries, apt-get them, rsync, correct the symlinks and you'll be able to continue the build process.
Once built, rsync all you need to your pi and have fun.
Note that if you chose to build QMultimedia with GStreamer+gst-omx, you'll have to remove those plugins from the plugins/mediaservice folder.
Hope this helps you or someone else.
SH
Thank you,
DeleteI'm going to try this :)
gles3 error solved :) but it now fails at the end, something relted to mediaservice http://pastebin.com/RDqBP4L1 :s almost there!! :D
DeleteProject ERROR: No module claims plugin type 'mediaservice'
DeleteI'm sorry, I don't remember ever seeing something like this.
I havan't install QtMultimedia :/ Now "make" done with success :)
DeleteHowever "make install" doesn't make anything :s
http://pastebin.com/sSrhRyRb
How do I install it now?
It is not supposed to do anything. You should have the plugin already installed in the proper directory of mediaservice plugins.
DeleteShould I rsync qt5pi to RPi?
DeleteDon't know your env but probably yes.
DeleteI have the qt5pi on RPi with your libraries but when I try to run a qml from your repository I got a bad_alloc error:
Deletehttp://pastebin.com/QEcGpM5P
and poc_player is warning about a qtquick.layout module, can you help me install that http://pastebin.com/nBc67a2W
DeleteSorry, I see no log from POT there at all. May not even be related. Can't help you.
DeleteAnother step, installed QtQuickControls and now:
Delete22:21:26.995 VERB: Can't find extension for .
22:21:26.997 VERB: Can't find extension for image/vnd.microsoft.icon.
http://pastebin.com/CK02LumY
That may be normal. I don't see anything wrong in that log. Is it working?
DeleteNo, nothing show on The screen. Can you explain me wath tells qtmultimedia to use your drives? It make me a little confused not to build qtmultimedia again after build your project.
DeleteThis is correct. Click on the screen with a mouse and press play. The video won't start automatically with that sample.
DeleteHow the plugin is loaded is up to Qt. Do not place multiple plugins, just one.
ok, I'm able to open the dialog, select the video but then it doesn't show on the screen. I tried an image and it worked.
DeleteThe following links are the result of trying to open diferent video formats.
http://pastebin.com/RknwS4Ld
http://pastebin.com/bH4ndKrU
Video file types
http://pastebin.com/ezkgsGWy
thank you
PS: I can play some of the above videos with omxplayer
DeleteNo idea sorry. The first one seems to be running, I don't know what is wrong with your build. Can you play the video with my builds?
DeleteWith your lastest build for RP1 I can play the video however because I'm using a screen that was only added to kernel recently I need to run latest raspbian version.
DeleteI don't know if you saw my pastebin trying to run the video_loop.qml:
pi@raspberrypi:~ $ /usr/local/qt5pi/bin/qmlscene video_loop.qml big_buck_bunny_480p_surround.avi
Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted
Are you running on Qt 5.6 or 5.5?
DeleteQt 5.6 here is my config: http://pastebin.com/mStsgGUM
DeleteI have clone qt-base and then add qtdeclarative, qtquick1, qtquickcontrols, qtquickcontrols2 and qtscript.
This comment has been removed by the author.
DeletePS: I did run it from qt creator and have some more info:
DeleteQML debugging is enabled. Only use this in a safe environment.
Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
20:45:38.505 INFO: [0;32mPOT build Mar 26 2016 16:05:31. [0m
Requesting control for org.qt-project.qt.metadatareadercontrol/5.0...
20:45:38.520 INFO: [0;32mInitializing GPU context in media processor... [0m
Requesting control for org.qt-project.qt.mediaavailabilitycontrol/5.0...
Requesting control for org.qt-project.qt.mediaplayercontrol/5.0...
Requesting control for org.qt-project.qt.medianetworkaccesscontrol/5.0...
Requesting control for org.qt-project.qt.audiorolecontrol/5.6...
bash: line 1: 1368 Segmentation fault DISPLAY=':0.0' /home/pi/untitled2/bin/untitled2
Application finished with exit code 139.
Pass an URI to qmlscene, not a path. And look back in the blog, there is a red message reporting the order of the qmlscene. The one you are using may be wrong.
Deletegot path right and it is working but no video: https://www.youtube.com/watch?v=EiiXICWN-hs
DeleteThe log seems perfectly ok and the position seems to be changing so I have no way to understand what is happening. You may try to increase log level but I see no error anyway. Also I never tested on other screens or resolutions other than 1080p.
DeleteConnected it to a Full HD monitor and it doesn't workd too :s nothing shown on the screen but the mouse. This time I run it directly from the device instead of ssh. help me please
DeleteI'm sorry, but I don't have elements to say what is wrong. I'd need to do a complete build myself but at the moment I don't have the time to do it.
DeleteDo I need to compile QtMultimedia again?
ReplyDeleteAny guide on how can I debug it?
ReplyDeleteGo to the logging header and set level to debug. Then poat the complete result.
Deletecan you be more explicit, thank you
DeleteNot sure how... in POT source code go to the header omx_logging.h and change the debug level. It is a macro that may be set to "INFORMATION". Try to set to DEBUG and rebuild.
Deletepocplayer: http://pastebin.com/hcUwszvQ
ReplyDeleteqml example: http://pastebin.com/CwyAhSH0
No visible error it seems. But:
Delete16:54:17.278 DBG: [0x1fbd450] virtual void OpenMAXILPlayerControl::play()
16:54:20.064 DBG: [0x1fbd450] virtual void OpenMAXILPlayerControl::pause()
So you play and then pause after less than three seconds?
PS: this is the output from your last image for rpi1 that works and video is shown: http://pastebin.com/vSWzVtDc
ReplyDeleteThe problem with this image is that the linux kernel doesn't support the screen where I want to use it.
In file included from ../piomxtextures_src/omx_mediaprocessor.h:44:0,
ReplyDeletefrom ../piomxtextures_src/omx_mediaprocessorelement.h:32,
from ../piomxtextures_src/omx_videosurfaceelement.h:36,
from ../piomxtextures_src/omx_videosurfaceelement.cpp:39:
../piomxtextures_src/omx_textureprovider.h: In member function 'bool OMX_EGLBufferProvider::init()':
../piomxtextures_src/omx_textureprovider.h:237:39: error: 'globalShareContext' is not a member of 'QOpenGLContext'
../piomxtextures_src/omx_textureprovider.h: In member function 'void OMX_EGLBufferProvider::deinit()':
../piomxtextures_src/omx_textureprovider.h:532:40: error: 'globalShareContext' is not a member of 'QOpenGLContext'
Makefile:1145: recipe for target 'omx_videosurfaceelement.o' failed
Why this error
Probably building against Qt < 5.5?
Deletewhat about pi3?
ReplyDeletewhen I ./compile_ffmpeg.sh, when configureing, it shows
Delete"Unknown option "-mfpu=neon-vfpv4"
it seems -mfpu don't have section name "neon-vfpv4"
I check the configure file, and there are only 4 sections of -mfpu.
-mfpu=neon) echo --float_support=vfpv3 --neon ;;
-mfpu=vfp) echo --float_support=vfpv2 ;;
-mfpu=vfpv3) echo --float_support=vfpv3 ;;
-mfpu=vfpv3-d16) echo --float_support=vfpv3d16 ;;
is .sh file wrong or the vision of ffmpeg_src file wrong?
Pi3 is not different from Pi2. Pi3 is backwards compatible.
DeleteThanks! I will try to build as pi2 first.
DeleteI have the same error.
Delete../piomxtextures_src/omx_textureprovider.h:532:40: error: 'globalShareContext' is not a member of 'QOpenGLContext'
Makefile:1145: recipe for target 'omx_videosurfaceelement.o' failed
My qt version is 5.4.1. What should I do? Update qt to >5.5?
No, Qt 5.5 should be sufficient. Requirement is Qt >= 5.5.
DeleteThanks for your help luca.
DeleteGod! That means I have to rebuild damn QT..
I have rebuilt the QT and now the version is 5.7. But when I patch the patch, it is failed. And I just install the no-patch qmultimedia. But when I run ./piomxtextures_tools, it shows
ReplyDeletecd piomxtextures_lib/ && ( test -e Makefile || /usr/local/qt5pi-5.7/bin/qmake /home/lxy/Downloads/pi-master/piomxtextures_lib/piomxtextures_lib.pro DEFINES+=CONFIG_LIB DEFINES+=CONFIG_INCLUDE_FFMPEG -o Makefile ) && make -f Makefile install
Project MESSAGE: Building for RPi1...
Project ERROR: Unknown module(s) in QT: multimedia
Makefile:60: recipe for target 'sub-piomxtextures_lib-install_subtargets' failed
make: *** [sub-piomxtextures_lib-install_subtargets] Error 3
why it can not find multimedia module?
Probably because your installation does not include it?
DeleteI find that even if I disable ssh and smbclient when compiling ffmpeg, they are still need when compile piomx-lib. And when make piomx-lib, makefile will automatically add -lsmbclient and -l ssh after make. I don't why you has to add them. But I get a solution.
ReplyDeleteSimply apt-get smbclient and ssh is not enough. Because they will not link the lib. So in order to enable -lssh and -lsmbclient, you need to link the lib. (-lxxx must need a file named libxxx.so, and libxxx.so.n is not satisfied.)
As an example, I link my lib with
cd /usr/lib/arm-linux-gnueabihf
ln -s libssh.so.4.4.1 libssh.so
ln -s libsmbclient.so.0.2.3 libsmbclient.so
Ps: Thanks for Luca's patience. You always willing to give me a reply. Also appreciate your amazing piomx, even though I have not finish buiding it XD.
BTW, here are some error in path so I have to change your .ssh file. For example,ffmpeg is build in 3rdparty/ffmpeg/ffmpeg_pin, but when running ./prepare_openmaxil_backend.sh, it asks for ffmpeg lib and include files in 3rdparty/ffmpeg/. And why it chooses to build for Pi1 as default and I cannot change it to Pi2. It seems better to give a choice just like ffmpeg.
Thanks Luca again!
Here is another question. What should I copy from build-PiOmxTextures? You just
ReplyDeletecp -a build-PiOmxTextures/libPiOmxTextures* PiOmxTextures/lib and
cp -a build-PiOmxTextures/piomxtextures/* PiOmxTextures/include
But infact, there are
Makefile piomxtextures_pocplayer piomxtextures_qt_driver
piomxtextures_app piomxtextures_pocplayer_widget piomxtextures_samples
piomxtextures_lib piomxtextures_qmlutils
in the file, but not simply the lib and include file.
What should I copy?
And after I get ffmpeg, PiOmxTextures-lib, LightLogger, what should I do then? I am not quite get the point.
I find that I can just compile and install like other qt plugins. Is that the same?
Deleteqmake->make->make install
The plugin is built statically so it contains all you need, including ffmpeg. Just ensure it is placed in the proper position.
DeleteYes, qmake and make is what is needed to build, assuming all the deps are in place. Building the deps can be achieved using the prepare_3rdparty script.
What means proper position? Need I put all lib in /usr/lib/arm-linux-gnueabi and include in /usr/include?
DeleteNow I run ./piomxtextures_pocplayer ~/Download/1.mp4
and it shows:
unrecognized media assuming video
can't find extension for .
can't find extension for image/jp2.
can't find extension for image/vnd.microsoft.icon
libva error:va_getDriverName() failed with unknown libva error, driver_name=(null)
warning: Error:"Could not initialize supporting library."
How can I fix it?
I have rebuild the pocplayer and now it can run a video, but it is nothing different with ffmpeg0.1, it is still not smooth, and the frame seems only 2-10fps. Is this because I have do something wrong?
DeleteThe procedure is simple and is explained above. There are just two steps: build ffmpeg and build POT. 2-10fps means you've done something wrong.
DeleteThe followings are what I now get, could you please show me what I miss?
Deleteffmpeg(including lib and include)
PIO_QT_driver(I get a libopenmaxilmediaplayer.so in mediaservice)
poc_player
POT_lib
pio_app
Still libva error, if I cd piomxtextures_pocplayer and qmake and make the pocplayer.
DeleteBut if I us qtcreator load the.pro file and build and run, it is ok, but 2-10fps.
This is the output while I run the poc_player.
ReplyDelete[9;0]Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
JIT is disabled for QML. Property bindings and animations will be very slow. Visit https://wiki.qt.io/V4 to learn about possible solutions for your platform.
JIT is disabled for QML. Property bindings and animations will be very slow. Visit https://wiki.qt.io/V4 to learn about possible solutions for your platform.
QDeclarativeAudio::itemChange
QMediaPlayer::onItemChanged
QDeclarativeAudio::itemChange
QMediaPlayer::onItemChanged
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
Error: "Could not initialize supporting library."
Killed
libva has nothing to do with POT so you're doing something wrong, but I have no idea what you're doing, sorry.
DeleteCan the patch patches on qt5.7? When I patch the patch, there are 2 failed, so I read the patch and change the Qmultimedia code myself. But I still wonder is the patch fit Qt5.7?
DeleteRead the red lines.
DeleteFine...In fact, I did not make it clear before that whether I need patch.
DeleteOne more question, when running prepare_3rdparty.sh, it will ask for . Why?
It will ask for qt_src
DeleteI have enable gstreamer1.0 when I cross-compile my qt, is that right?
ReplyDeletePOT has nothing to do with gstreamer, but Qt is probably selecting the gstreamer plugin, so remove it.
DeleteHi Luca,
ReplyDeletei crosscompiled QT 5.6.1 for my RPI-1.
Building POT acccording to the above tutorial doesn't work for me. Obviously too many missing libs etc.
Can i use one of your binaries to integrate the needed files into my QT directory? So i don't need to compile myself.
Which files would i have to copy? And where?
Thanks a lot,
Ben
I'm sorry but my latest binaries are optimized for Pi2 and won't work on Pi1.
DeleteTrying to follow Luca's build instructions
Delete1) building 3rd party tools seems to have worked
2) When running qmake on the main POT folder i get the following error. Any idea what is missing?
Project MESSAGE: Building for RPi1...
Project ERROR: freetype2 development package not found
At least the following dev files are installed in the sysroot -> libfreetype6-dev
Ben
Anybody who can help on that?
DeleteIt seems like some dev files in my sysroot are not found.
For example "make" complains about the missing header file "ft2build.h"
But it's there, in the sysroot: sysroot/usr/include/freetype2/ft2build.h
Ben
freetype2 is referenced using pkg-config, so check everything is in place.
DeleteLuca, i appreciate any help.
DeleteI don't really know how to find out, why the files are not found.
"pkg-config" and "autoconf" are installed. If i uninstall them, i get other errors, so i assume that basically they work.
I set the following variables.
sysroot=/home/opt_qt_for_rpi/qt5.6.1-1/sysroot
export RPI_SYSROOT=${sysroot}
export PKG_CONFIG_SYSROOT_DIR=${sysroot}
export PKG_CONFIG_DIR=
export PKG_CONFIG_LIBDIR=${sysroot}/usr/lib/pkgconfig:${sysroot}/usr/share/pkgconfig
export COMPILER_PATH=/home/niki/opt_qt_for_rpi/qt5.6.1-1/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin
Ben
Can't help you, this is your environment. Check that pkg-config is finding the configuration and that the linker flags are correct.
DeleteOk,good hints.
Delete1) but how could I check pkg-config?
2) linker flags: if those are not Ok,should I manipulate your .pro file or the makefile after running qmake?
Use the pkg-config command.
DeleteI just figured, that i didn't enable "pkg-config" support when running ./configure on qt.
DeleteIs this necessary, so that qmake can find freetype2 through pkg-config?
>pkg-config ............. no
You shouldn't need to enable it explicitly. But if configure fails to find it you may encounter issues yes.
DeleteThanks, solved by recompiling qmake.
DeleteNow i get an error from "make". Any ideas what's missing?
/opt_qt_for_rpi/qt5.7.0/qtsrc/pot/pi/piomxtextures_src/omx_audioprocessor.cpp:410:53: error: ‘avcodec_get_frame_defaults’ was not declared in this scope
avcodec_get_frame_defaults(decoded_frame);
^
Makefile:4083: recipe for target 'omx_audioprocessor.o' failed
make[1]: *** [omx_audioprocessor.o] Error 1
You didn't probably build ffmpeg properly with the prepare_3rdparty script.
DeleteI did use your script,but got a bunch of missing header files. Can you tell me (or at least for a few) where I can get those??
Deleteatomic.h
Deletembarrier.h
windows.h
conio.h
io.h
lzo/lzo1x.h
X11/extensions/Xvlib.h
CoreServices/CoreServices.h
direct.h
d3d11.h
dxva.h
dxva2api.h
io.h
libcrystalhd/libcrystalhd_if.h
mach/mach_time.h
net/udplite.h
valgrind/valgrind.h
vdpau/vdpau.h
vdpau/vdpau_x11.h
VideoDecodeAcceleration/VDADecoder.h
VideoToolbox/VideoToolbox.h
X11/extensions/XvMClib.h
d3d9.h
va/va.h
vdpau/vdpau.h
linux/videodev.h
sys/videoio.h
vfw.h
dshow.h
dev/bktr/ioctl_meteor.h
machine/ioctl_meteor.h
dev/video/meteor/ioctl_meteor.h
dev/ic/bt8xx.h
sndio.h
soundcard.h
va/va.h
vdpau/vdpau.h
I finally managed to get it running. Not sure if everything works but it does show videos fluently. :-))
DeleteI am running qmlscene with simple-qml, but commented out the audio part in the qml.
One of the videos produces no obvious errors in the bash, but doesn't show a video (red background).
Output of simple-qml is:
Duration: 00:00:07.67, start: 0.000000, bitrate: 43062 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt709), 1920x1080, 41647 kb/s, 30 fps, 30 tbr, 3k tbn, 6k tbc (default)
Then every few seconds:
16:14:38.304 INFO: Seek to: 00:00:00
Any idea why?
Post the exact error please.
DeleteIf you think there is a bug then please open an issue on github and provide all that is needed to reproduce the issue.
DeleteDon't think it's a bug, but i just don't know whats missing.
DeleteGot keys from plugin meta data ("org.qt-project.qt.mediaplayer")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qtpi_5.7.0/bin/mediaservice" ...
loaded library "/usr/local/qtpi_5.7.0/plugins/mediaservice/libopenmaxilmediaplayer.so"
14:05:29.764 INFO: POT build Dec 7 2016 21:55:00.
Requesting control for org.qt-project.qt.metadatareadercontrol/5.0...
Requesting control for org.qt-project.qt.mediaavailabilitycontrol/5.0...
Requesting control for org.qt-project.qt.mediaplayercontrol/5.0...
Requesting control for org.qt-project.qt.medianetworkaccesscontrol/5.0...
Requesting control for org.qt-project.qt.audiorolecontrol/5.6...
14:05:29.778 INFO: Initializing GPU context in media processor...
14:05:29.786 INFO: Initializing buffer provider...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qtpi_5.7.0/plugins/video/declarativevideobackend" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qtpi_5.7.0/bin/video/declarativevideobackend" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qtpi_5.7.0/plugins/video/videonode" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/local/qtpi_5.7.0/plugins/video/videonode/libeglvideonode.so"
Found metadata in lib /usr/local/qtpi_5.7.0/plugins/video/videonode/libeglvideonode.so, metadata=
{
"IID": "org.qt-project.qt.sgvideonodefactory/5.2",
"MetaData": {
"Keys": [
"egl"
]
},
"className": "QSGVideoNodeFactory_EGL",
"debug": false,
"version": 329472
}
Got keys from plugin meta data ("egl")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qtpi_5.7.0/bin/video/videonode" ...
loaded library "/usr/local/qtpi_5.7.0/plugins/video/videonode/libeglvideonode.so"
Requesting control for org.qt-project.qt.videorenderercontrol/5.0...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qtpi_5.7.0/plugins/accessible" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qtpi_5.7.0/bin/accessible" ...
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/pi/mov2.mov':
Metadata:
major_brand : qt
minor_version : 537331968
compatible_brands: qt CAEP
creation_time : 2016-05-28 18:05:12
Duration: 00:00:07.67, start: 0.000000, bitrate: 43062 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt709), 1920x1080, 41647 kb/s, 30 fps, 30 tbr, 3k tbn, 6k tbc (default)
Metadata:
creation_time : 2016-05-28 18:05:12
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 44100 Hz, stereo, s16, 1411 kb/s (default)
Metadata:
creation_time : 2016-05-28 18:05:12
14:05:30.677 INFO: Instantiating texture data...
14:05:30.695 INFO: Instantiating texture data...
14:05:30.713 INFO: Instantiating texture data...
14:05:30.731 INFO: Instantiating texture data...
Video codec omx-h264 width 1920 height 1080 profile 578 fps 30.000000
Audio codec pcm_s16le channels 2 samplerate 44100 bitspersample 16
V:PortSettingsChanged: 1920x1088@30.00 interlace:0 deinterlace:0 anaglyph:0 par:inf layer:0 alpha:255
14:05:31.066 INFO: Buffer created 0xb2c0c8d0
14:05:31.072 INFO: Buffer created 0xb2c0c940
14:05:31.086 INFO: Buffer created 0xb2c0c9b0
14:05:31.091 INFO: Buffer created 0xb2c0ca20
14:05:39.494 INFO: Seek to: 00:00:00
14:05:48.498 INFO: Seek to: 00:00:00
14:05:57.492 INFO: Seek to: 00:00:00
I don't think it's a bug, but just don't know whats missing.
Deleteeclarativevideobackend" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qtpi_5.7.0/bin/video/declarativevideobackend" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qtpi_5.7.0/plugins/video/videonode" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/local/qtpi_5.7.0/plugins/video/videonode/libeglvideonode.so"
Found metadata in lib /usr/local/qtpi_5.7.0/plugins/video/videonode/libeglvideonode.so, metadata=
{
"IID": "org.qt-project.qt.sgvideonodefactory/5.2",
"MetaData": {
"Keys": [
"egl"
]
},
"className": "QSGVideoNodeFactory_EGL",
"debug": false,
"version": 329472
}
Got keys from plugin meta data ("egl")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qtpi_5.7.0/bin/video/videonode" ...
loaded library "/usr/local/qtpi_5.7.0/plugins/video/videonode/libeglvideonode.so"
Requesting control for org.qt-project.qt.videorenderercontrol/5.0...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qtpi_5.7.0/plugins/accessible" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qtpi_5.7.0/bin/accessible" ...
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/pi/mov2_Matze.mov':
I don't see anything weird here.
Deletesorry for posting twice. It's the same output
DeleteInfo: creating stash file /home/lxy/Downloads/qt5.7-install/qt-everywhere-opensource-src-5.7.0/qtmultimedia/.qmake.stash
ReplyDeleteInfo: creating cache file /home/lxy/Downloads/qt5.7-install/qt-everywhere-opensource-src-5.7.0/qtmultimedia/.qmake.cache
Checking for openal... no
/home/lxy/Downloads/qt5.7-install/qt-everywhere-opensource-src-5.7.0/qtmultimedia/qtmultimedia.pro:27: Variable GST_VERSION is not defined.
Checking for resourcepolicy... no
Checking for gpu_vivante... no
When I qmake qmultimedia, it shows as above. Is the checking right?
Not sure about GST_VERSION sorry. The rest should be correct.
DeleteHi Luca,
ReplyDeleteCan you explain how exactly do I build QtMultimedia library today, in April 2017, for Qt 5.8?
I use Buildroot and I have everything else ready (Qt, ffmpeg), I just need to know what exactly I need to build from your projects and where should I put it, so that Qt knows it's QtMultimedia backend library.
A procedure for Raspbian is approximately the one briefly explained above. Adapt then to your env.
DeleteI managed to adapt POT for Buildroot and it compiles and installs fine. Audio works OK, but I have two problems/questions:
Delete1) When I try to play video with POT, audio plays, but it says "One frame could not be shown" for every frame, so I just have black screen. Regardless of the codec, and omxplayer works fine in the same environment. Shared OpenGL context is enabled.
2) How do I use POT HW acceleration with WebEngine? Does it "just work" or is there something that needs to be patched? You said:
"So, to summarise: a little patch to Chromium is needed to create a VDA that dynamically loads POT library into memory and uses it with a common interface."
Can you share this patch?
1) You mean that you see no frame at all? No idea, sorry. May depend on your environment, difficult for me to say what is wrong.
Delete2) No, it does not "just work": a complete decoder is needed to make chromium work. Actually a bit more than a patch... many patches... Sorry, I had to pause that task, I never completed it.
This comment has been removed by the author.
DeleteHere's the log when I try to play any video. In this example I'm playing YT video, but it's the same regardless of the source (HTML, local file or QRC).
DeleteI use eglfs and QQC2 exclusively (without Quick Controls v1) if that means anything.
https://pastebin.com/QtFTt7YL
What do you mean by "any video"? Did you try this http://mirrorblender.top-ix.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov for instance?
Delete"Any video" means that I tried various HTTP, UDP, local and QRC sources for MPEG2 and MPEG4 videos with various sizes, lengths (recordings and live streams), bit rates, resolutions and sound encodings, including Big Buck Bunny, and everything says "One frame couldn't be shown", but audio always plays fine.
DeleteHere's the log for BBB video: https://pastebin.com/NM438SYe
Unfortunately I don't have an answer, sorry. I guess you're not using the prebuilt packages so your environment is different from mine. I've never seen that behaviour.
DeleteDear Luca,
ReplyDeletei compiled POT some time ago just for fun and it worked well on the raspberry.
I would like to compile again but with newer QT (5.15.2) and newer raspberry pi (2B, Armv7 32 Bit) on raspbian Debian (v9, stretch).
Do you think that still works?
Thanks a lot!
Hello. I'm sorry but POT won't work on pi 4. It works up to pi 3. Pi 4 does not support that kind of acceleration anymore.
DeleteI have a pi 2B (Armv7 32 Bit), not a pi 4
DeleteI don't know what "newer raspberry pi" means then, sorry. Pi version < 4 should be ok afaik. Pi versions >= 4 miss part of the drivers needed. Qt version shouldn't be a significant issue.
DeleteOh, i am sorry. My question was confusing then.
ReplyDeleteBut you answered my question already.
I would like to upgrade to the following setup:
raspberry pi (2B, Armv7 32 Bit)
raspbian Debian (v9, stretch)
QT (5.15.2)
So, according to your answer, this should work. Excellent.
It should theoretically work, yes.
DeleteFor anyone who is following this road.
DeleteI am able to run video (not tried with audio) with the following configuration:
- raspberry pi 2B (Armv7 32 Bit)
- raspbian Debian (v9, stretch)
- QT (5.15.2) -> QML
- POT 5.7.3
I used the toolchain provided in this blog.
There are some minor glitches in the instruction/scripts.
At the end i am playing a H264 video (known bunny sample), with a CPU usage < 5%
It seems like, this is still the (only) option to play HW accelerated video on the raspberry with QT5-QML
:-)
Thanks a lot.
Nik
Dear Luca,
ReplyDeleteIs POT able to show other video codecs than H.264? What would be necessary to do that?
Thanks Nik
Hello, I suppose it should if OpenMAX supports it. I vaguely remember testing mpeg in the past. You'll need a key: https://www.raspberrypi.org/documentation/configuration/config-txt/codeclicence.md. i don't think h265 is supported by OpenMAX, but I never tried.
Delete