ffmpeginteropx / FFmpegInteropX

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

Rework ffmpeg build scripts to allow desktop and other variants #393

Closed lukasf closed 11 months ago

lukasf commented 11 months ago

This makes the build script much more powerful, allowing to add or remove different aspects from the ffmpeg build. This allows not only Desktop vs UWP, but also full builds (with encoders, devices, even programs) vs decoder-only, or GLP vs LGPL versions.

Full builds with programs can be helpful to diagnose issues where people claim "it works with ffmpeg.exe". Now we can build an ffmpeg.exe / ffplay.exe with the exact same build config as used by our lib, as a reference for testing purposes

We still need to decide which builds we want to ship as official NuGet packages. This PR is only to get the infrastructure in place.

Note: I did not test encoders build. On current ffmpeg version, this required some patching to get working with x264/x265. But IIRC, I tested encoders with ffmpeg 6.0 a while back, and there it seemed to work without any patches. We should move to fffmpeg 6.1 soon, then we can test encoder build.

brabebhin commented 11 months ago

Should we add a help command with examples?

lukasf commented 11 months ago

I don't know. This is for advanced users only, probably only us plus very few others. Maybe some more comments on the parameters are sufficient.

However, feel free to add a help command if you like.

lukasf commented 11 months ago

Building with encoders enabled now also works properly. Gpl must be enabled for x264 and x265. I also gave SVT-AV1 a short try. It could also be added without too much trouble. It is BSD, so it could be included in a LGPL encoder build.