Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ffmpeg[avisynthplus]] Could it be possible to have this as Static version too please ? #25534

Closed
jalba69 opened this issue Jul 2, 2022 · 8 comments
Assignees
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist depends:upstream-changes Waiting on a change to the upstream project Stale

Comments

@jalba69
Copy link

jalba69 commented Jul 2, 2022

Hello,

Could it be possible to have ffmpeg[avisynthplus] able to be built with static triplet please ?

Right now when trying vcpkg install FFmpeg[avisynthplus]:x64-windows-static we get this :
Error: ffmpeg[avisynthplus] is only supported on 'windows & !static'

but on the other hand it is possible to have the current single AviSynthPlus as static installed, from my vcpkg list :
avisynthplus:x64-windows-static

Same thing seems to happens when trying to build the main single FFMPEG port and setting manually AvisynthPlus as option to true there, we get an error message saying static version is not possible.

Is there any hard limitations to make AviSynthPlus possible as a Static version included in FFMPEG or maybe it was just an old limitation not reviewed since a while ?

We have the single AvisynthPlus possible as Static then I imagine it should be possible, could you please look into this so it will be possible to have ffmpeg[avisynthplus] static or maybe be able to manually modify the main FFmpeg to add AvisynthPlus option to the static version there ?

Thanks a lot in advance :)

@LilyWangLL LilyWangLL added the category:question This issue is a question label Jul 4, 2022
@LilyWangLL
Copy link
Contributor

Thanks for posting this issue. Feature ffmpeg[avisynthplus] doesn't support static is changed by PR #18803.
cc @mcmtroffaes I saw your comment in #18803, is this the upstream PR AviSynth/AviSynthPlus#222?

@mcmtroffaes
Copy link
Contributor

Yes, I've been trying to get static builds to work with avisynthplus. I submitted four PR's upstream to that effect: AviSynth/AviSynthPlus#192 AviSynth/AviSynthPlus#219 AviSynth/AviSynthPlus#221 AviSynth/AviSynthPlus#222 - all are merged except the last one (i.e. the one you mention) although only Windows XP is affected for that one.

@mcmtroffaes
Copy link
Contributor

... also I haven't checked recently if ffmpeg already supports static linking against avisynthplus. I don't think it does:

https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/avisynth.c

@mcmtroffaes
Copy link
Contributor

... however I managed to dig out an old ffmpeg patch by one of the avisynthplus developers which enables a regularly linked avisynthplus: qyot27/FFmpeg@e70f70a

In short: ffmpeg does not support regular linking against avisynthplus, and until they do, vcpkg cannot realistically support it either in the long term (IMO, as it's a rather hefty patch, better suited to be managed upstream).

@jalba69
Copy link
Author

jalba69 commented Jul 4, 2022

Hello,
this is way out of my league but for what it's worth i done it manually :

Had avisynthplus:x64-windows-static installed, went to FFmpeg port folder, inside vcpkg.json at lines 226 and 296 removed & !static

then :
vcpkg install ffmpeg[core,ffmpeg,swresample,swscale,avdevice,avisynthplus]:x64-windows-static --clean-after-build

And if i recall correctly that's all i done, needed those files for another thing, compiled other program seems to work correctly and accepts my avisynth .avs files. There might be some issues around, this i don't know yet, but so far i managed to get it done this way and it is working for the needs i have.

@LilyWangLL LilyWangLL added category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist depends:upstream-changes Waiting on a change to the upstream project and removed category:question This issue is a question labels Jul 5, 2022
@qyot27
Copy link

qyot27 commented Jul 5, 2022

And if i recall correctly that's all i done, needed those files for another thing, compiled other program seems to work correctly and accepts my avisynth .avs files. There might be some issues around, this i don't know yet, but so far i managed to get it done this way and it is working for the needs i have.

All that means is that there's already an AviSynth.dll somewhere on your library search paths from a previous install. As mentioned, FFmpeg dynamically loads AviSynth using LoadLibrary, rather than by linking to either a shared or static version of the library. The only thing an otherwise-static build of FFmpeg needs are the headers from AviSynth+, and it'll see and use an existing AviSynth.dll, if it exists.

... however I managed to dig out an old ffmpeg patch by one of the avisynthplus developers which enables a regularly linked avisynthplus: qyot27/FFmpeg@e70f70a

The newer version is cleaner: https://github.com/qyot27/FFmpeg/commits/avs_static

@jalba69
Copy link
Author

jalba69 commented Jul 5, 2022

Yup,
https://ffmpeg.org/general.html#AviSynth
I already had Avisynth+ installed on my system.

In the end it works for my needs so I'm satisfied but i understand that it's not a fully static ffmpeg-avisynth+ version, and unless a heavy patch work is done on this it won't be, but FFMPEG itself built from vcpkg is not fully static it seems, some libs are missing due to how vcpkg does his thing and they need to be added manually later on when you'll use ffmpeg files : #9571 (comment)
For my needs i had to add those to the rust config.toml :

dxva2.lib, evr.lib, mf.lib, mfplat.lib, mfplay.lib, mfreadwrite.lib, mfuuid.lib, bcrypt.lib, ws2_32.lib, Secur32.lib, Strmiids.lib, Ole32.lib

Like i said before all this is out of my league, I'm mostly a user, not a coder sadly.

Thank you all.

Copy link

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

@github-actions github-actions bot added the Stale label Dec 19, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist depends:upstream-changes Waiting on a change to the upstream project Stale
Projects
None yet
Development

No branches or pull requests

4 participants