Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt ffmpeg wrapper example not working out of the box (solved)
I'm using a rapsberry pi and qt 4.8.
I'm new to this so I am unsure, do I need to install ffmpeg on its own along with this wrapper, or are all the files needed included?
The error I am receiving is the same as this fellow:
Hi and welcome to devnet,
AFAIR you need to install the development package of ffmpeg, it's really just a wrapper.
Ok, I did apt-get install ffmpeg, but it still has the same error
That's normal, you just installed ffmpeg, not the development package
apt-get install libavutil-dev libavformat-dev libswscale-dev libavcodec-dev
did the trick for those errors, now I have about 71 errors involving the function calls to those libraries.
undefined reference to 'avcodec_init'
undefined reference to 'avformat_version'
What's going on here?
Wild guess: the wrapper was written for an old version of ffmpeg. You'll have to update the code a bit
(to anyone else watching in the future) I changed all
uint_8 to ffmpeg::uint_8
so it will recognize their types
Downloading the latest build of qt ffmpeg wrapper fixed all the errors, but left about 70 warnings about deprecated functions and comparing unsigned and signed ints. After fixing all those, there are no errors left and QT builds and exits without any problems.
However, I can't find a file to run after building. The example is called simpleencdec and I can't run
in the build directory. Any suggestions?
Did you open and build the example project ?
Yes, as I said, I built the project and it had 0 errors and warnings. (ctrl + B)
On a second look, I do get one strange error when I build the project
Project MESSAGE: Warning: unknown QT: widgets
I have fixed it.
I have been running it from my SD Card which was causing problems. When I moved it onto my raspberry pi, it created the file properly. I Chmod 777 the sd card, but it still didn't work.
Thanks for everything
If you are building with Qt 4 you don't have the widgets module
You're welcome !