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

Build from source on mac with all features. #27

Closed
melMass opened this issue Feb 27, 2018 · 3 comments
Closed

Build from source on mac with all features. #27

melMass opened this issue Feb 27, 2018 · 3 comments

Comments

@melMass
Copy link

melMass commented Feb 27, 2018

Hello,

Here is how I built gifski from source:

# clone the repo
git clone https://github.com/ImageOptim/gifski

On mac gcc is a symlink to Clang, but the old apple version doesn't have built-in support for OpenMP see here so:

brew install gcc
export CC="/usr/local/bin/gcc-7"
cargo update
cargo build --release --features=openmp

But is fails when adding ffmpeg support:

cargo build --release --features=video,openmp --verbose

The output (shortened to essential):

It rightly links against brew libs (ffmpeg installed from HEAD):

rustc --crate-name ffmpeg --crate-type lib-L native=/usr/local/Cellar/ffmpeg/HEAD-7414d0b/lib

The errors:

pixel.rs : 696 Pixel::VDA_VLD => AV_PIX_FMT_VDA_VLD,
| ^^^^^^^^^^^^^^^^^^ did you mean AV_PIX_FMT_VAAPI_VLD?
740 Pixel::VDA => AV_PIX_FMT_VDA,
| ^^^^^^^^^^^^^^ did you mean AV_PIX_FMT_CUDA?
803 Pixel::XVMC => AV_PIX_FMT_XVMC,
| ^^^^^^^^^^^ variant not found in util::format::pixel::Pixel

@kornelski
Copy link
Member

kornelski commented Feb 27, 2018

Yeah, the ffmpeg crate is a broken mess:

meh/rust-ffmpeg#97
meh/rust-ffmpeg#90

I plan to migrate video support to gstreamer (it has excellent Rust support), but haven't had time to do it yet.

If you feel adventurous, maybe you could add gstreamer?

@melMass
Copy link
Author

melMass commented Feb 28, 2018

Oh I see... I guess meh abandoned the project. I've never tried binding other language to rust.
The gstreamer one does seem to be well maintained.
Too much of a newbie in Rust to be able to PR anything to this project.

I've made a simple binary wrapper in PyQt, I'll upload the repo this week if anyone is interested.

@kornelski
Copy link
Member

I've switched to less-broken ffmpeg crate. It should work now.

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

2 participants