ffmpeginteropx / FFmpegInteropX

FFmpeg decoding library for Windows 10 UWP and WinUI 3 Apps
Apache License 2.0
212 stars 53 forks source link

Maybe use SMP for FFmpeg Compilation? #384

Closed softworkz closed 1 year ago

softworkz commented 1 year ago

Hi,

this is merely a question. I've seen that most of the projects you are using for building the FFmpeg dlls are borrowed from the ShiftMediaProject (SMP). I'm wondering why you aren't using those projects for the complete build of FFmpeg as it would avoid having to go through MinGW/MSYS2 and you could have a single VS solution to build everything with a single command (per platform)?

I could assist in setting this up in case you're interested.

sw

lukasf commented 1 year ago

The FFmpeg build is quite a beast. It is impressive that SMP managed to get this working in a VS environment. But it is difficult to keep it updated, because whenever files are added, moved or removed, the project file needs to be adapted. And it only builds in the exact setup that SMP has intended. No way to use the enable- or disable- commands, which are very helpful for customizing the FFmpeg build. And at least in the past, he never had ARM build configs. It was quite a pain to get the SMP libs build the way I want it. I don't want to add more of these, unless it is really required.

One other major downside is that he requires the installation of different VS plugins (e.g. NASM and one or two others). I am not a fan of that at all. Everyone developing here would need to manually install these plugins. If a new VS version comes out and the plugin is not updated, we cannot use it. I'd rather just use standard VS tools, plus tools I can automatically download and use.

After we fully automated the MSYS2 setup+installation, I think it works really well. And we have the full flexibility of the ffmpeg build system. I wouldn't want to miss out on that.

softworkz commented 1 year ago

The FFmpeg build is quite a beast. It is impressive that SMP managed to get this working in a VS environment

Strongly agree to both 😄

And it only builds in the exact setup that SMP has intended. No way to use the enable- or disable- commands, which are very helpful for customizing the FFmpeg build

Oh, that's not true. There is a "project-generator.exe" which takes the same input as ffmpeg's configure, so you can get exactly what you want.

And at least in the past, he never had ARM build configs.

Okay, that's a problem, then. Best would be to get it into SMP. Anything on our side only would get outdated quickly.

If a new VS version comes out and the plugin is not updated, we cannot use it.

Those plugins haven't been updated in a long time. But yes, they would need to be installed. Same like you're installing them now for the MSYS build.

And we have the full flexibility of the ffmpeg build system. I wouldn't want to miss out on that.

I was suspecting that you might not now about the project-generate.exe tool, and I made this post because I thought that might be a game/mind-changer in this case...

softworkz commented 1 year ago

Anyway, just an offer in case you need help to get going with it. I use it for ffmpeg development which is really convenient when it can be done in VS. Not using it for production, though, because it's much slower than gcc builds (most things in ffmpeg are optimized for gcc, that 's just a fact and not to be blamed on msvc). For production, we're using media-autobuild-suite, which is fully MinGW/MSYS2 based and compiles with gcc. Though, I don't know whether it can compile for UWP. The outputs though, should be usable by MSVC - at least I was told so. Feel free to reopen in case..