On Windows: download shared from here(1), unzip anywhere. Right click on the project, select "Project settings" (IIRC) then point to .libs you want to use (or add them all), add include path (ffmpeg/include). Done.
On linux (Qt): install with apt-get. Point to libs, add include path (in the .pro file).
The only complication is that you have to wrap the #includes with extern "C" {} if you are on C++.
I did it for both platforms the other day and it works. Super easy.
Cross-compile: on Qt you do it through packs you select at install stage. Sometimes it requires the runtime to be installed (like for Android) but it's not complicated.
On VS, I don't know today. I remember for Windows CE you had to install an SDK, and compilation/debug was out-of-the-box (F7 to compile, F5 to debug in-target). And I used Platform Builder for years, and I cross-compiled the entire OS from the menu.
On Arduino: select your board from the menu. Also, installing libraries is done through a menu. Pulled from online resources automatically.
But I guess I will not convince you. You'll come up with another challenge.
You have just (inadvertently) demonstrated the exact problem: if you don't have a pre-built binary your job is significantly harder. But everyone knows that and most popular libraries do have a pre-built binary officially or unofficially. That makes this kind of discussion harder, because someone is talking about the worst case and another (in this case you) is talking about the best case.
Parent gave two "big libs" as an example (was it a "worst case"?), I choose the one I used the other day and I remember how I used it.
I also remember that I took the "hard" path on Linux and rebuilt ffmpeg, but it was like "git clone", "./configure", "make", "sudo make install". I had to use the command line, but nobody died (being a huge C project and all that).
But we were talking IDEs vs command line and "actually understand your development tool chain in C as well as C++". Of course that niche, worst-case project are going to require more complicated steps. The thing is that the command line and clunkyness is being forced onto the other 99% of the cases too, for simpler projects and dumber persons like myself.
> Parent gave two "big libs" as an example (was it a "worst case"?), I choose the one I used the other day and I remember how I used it.
I consider them to be the best case because everyone wants them so there has been some improvement down the road. I think Cyph0n pick a wrong example for that reason.
> I also remember that I took the "hard" path on Linux and rebuilt ffmpeg, but it was like "git clone", "./configure", "make", "sudo make install". I had to use the command line, but nobody died (being a huge C project and all that).
That is a happy case for the reason I've said before. In my experience many libraries do not build that cleanly, it is a routine challenge to determine which flags I have to put to configure or which library I have to install (that might not exist in my distro so I may have to build them as well). Also `sudo make install` alters the global environment, which is never a great idea in Linux distros; so you have to either make sure to run `./configure --prefix=$HOME` or likes, or just run `make` and pick necessary bits out of the build directories yourself. The latter is painful, but the former risks two competing versions of the same library in the global environment.
Honestly though this experience greatly depends on tasks, and you may have barely hit those worse cases in your life. The Windows SDK and Android SDK you've initially cited are two examples where almost everything is available for you and you don't need as many libraries to continue on.
[dependencies]
# Direct FFI bindings
ffmpeg-next-sys = "5.0.3"
Note that libav will be built from source, but it will be cached for subsequent builds of your project.
And thanks to the build script maintained by the crate (library) owner, this process should work exactly the same across major OSes and architectures transparently.
On Windows: download shared from here(1), unzip anywhere. Right click on the project, select "Project settings" (IIRC) then point to .libs you want to use (or add them all), add include path (ffmpeg/include). Done.
On linux (Qt): install with apt-get. Point to libs, add include path (in the .pro file).
The only complication is that you have to wrap the #includes with extern "C" {} if you are on C++.
I did it for both platforms the other day and it works. Super easy.
Cross-compile: on Qt you do it through packs you select at install stage. Sometimes it requires the runtime to be installed (like for Android) but it's not complicated.
On VS, I don't know today. I remember for Windows CE you had to install an SDK, and compilation/debug was out-of-the-box (F7 to compile, F5 to debug in-target). And I used Platform Builder for years, and I cross-compiled the entire OS from the menu.
On Arduino: select your board from the menu. Also, installing libraries is done through a menu. Pulled from online resources automatically.
But I guess I will not convince you. You'll come up with another challenge.
(1) https://github.com/BtbN/FFmpeg-Builds/releases