ffmpeginteropx / FFmpegInteropX

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

Initial update to ffmpeg 7.0 including new channel layout api #421

Closed lukasf closed 5 months ago

lukasf commented 8 months ago

I have actually done those changes for ffmpeg 6.0 quite a while back. Now I just saw that 6.1 has again deprecated a large number of APIs. Not planning do do those soon.

lukasf commented 8 months ago

@softworkz I am not sure if the API changes will cause trouble with your build. The channel layout APIs are there since 5.1, I hope that you don't have a lower version than that.

The others are 6.0 I think. If those two cause trouble on your side, I could add a property which you could override and do dynamic compilation. Or we could as well use the deprecated ones here for a while, it's just two lines and they should be available until ffmpeg 8.

softworkz commented 8 months ago

The change is fine for me. We're going in beta with the apps this week and from now on I'll be only cherry-picking fixes or punctual changes for quite a while. Then, at some point, we'll be rebasing our ffmpeg in the server to ffmpeg 6, which we'll be using eventually for the next cycle of the client app as well, so the point in time for this change fits just well. Thanks!

brabebhin commented 6 months ago

@lukasf Looks good.

lukasf commented 6 months ago

We already have ffmpeg 7 by now, and the old channel layout APIs were completely removed. So this has become a mandatory change.

brabebhin commented 6 months ago

So we should skip directly to 7?

lukasf commented 6 months ago

Definitely

brabebhin commented 6 months ago

Fair enough, I'll take a look over the coming days, and update this PR.

brabebhin commented 6 months ago

Here we go, ffmpeg 7.0

No changes were needed to the code, it just took me a while to figure out why the build env didn't work, turns out it was me to blame all along.

You will need to upload new packages, as I don't have the rights for the desktop package and it doesn't sound like a good idea to publish the UWP separately.

With this done, I think we can move towards a preview package of the 2.0 version.

huynhsontung commented 5 months ago

FFmpeg 7.0.1 is now available. We should pin the submodule to that tag as well.

lukasf commented 5 months ago

I've done some cleanup and released new preview packages. Try FFmpegInteropX 2.0.0-pre7, it includes latest ffmpeg 7.0.1. I've only done some very short testing, but it seems to work well on first look.

@brabebhin I also added you as second owner of the new packages, so you should be able to release them as well.

brabebhin commented 5 months ago

Looks good

sakib1361 commented 2 months ago

Hi, thanks for the awesome work. A bit minor issue with new ffmpeg-7 is I cant set any audio filters anymore. The error comes as

Error => [avSource_ctx @ 0000021A7B59C500] Neither number of channels nor channel layout specified

I used to set mss.SetFFmpegAudioFilters("volume=2"); [when my app sets volume above100]

The sample app also shows same error. I did modified it to use nuget package instead of the built version. This error is present and audio filters are not working for all types of file. Works ok if I use ffmpeginteropx 2.0.0-pre3

Not sure if I should create an issue about it as its a pre release version.

brabebhin commented 2 months ago

@sakib1361 thanks for the report, I'll take a look.