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

Disabling libraries while building ffmpeg statically #120

Open
AdamBrouwersHarries opened this issue Jan 31, 2019 · 1 comment
Open

Disabling libraries while building ffmpeg statically #120

AdamBrouwersHarries opened this issue Jan 31, 2019 · 1 comment

Comments

@AdamBrouwersHarries
Copy link

I'd quite like to use rust-ffmpeg for a small project of mine, for which I'd need to build and link ffmpeg statically. As far as I understand it, the included build.rs supports this. I only need a couple of formats (mp3, flac, and pcmf32le) for my purposes, so I was wondering if there is any way to disable the other libraries that the static build links (e.g. ssh) in order to reduce the dependencies, and size of the resulting library.

From reading through the build.rs, it seems that there is a way, but I can't quite figure out how to do it...

Thanks!

@AdamBrouwersHarries
Copy link
Author

As far as I can work out, the statically linked libraries are determined by cargo features. I've experimented with disabling them, to no luck. What's more, if I run cargo and disable default features (--no-default-features), then the rust-ffmpeg-sys build script panics (which is to be expected), but still prints linker flags. As far as I can tell, there doesn't seem to be a way to disable the linker flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant