Open tuaris opened 4 years ago
@tuaris I've forked this repo and changed it to use dynamic loading instead of static linking: https://github.com/fschutt/vlc-static-rs
The vlc.lib
doesn't exist on Windows, so I just loaded the functions from the libvlc.dll
and libvlccore.dll
from the 3.0.11 release, downloaded from the VLC installation. In order for vlc-static-rs
to work, you can clone the repo and run cargo run --example test -- "mymovie.mp4"
. Plus you need to copy the /plugins directory (where are the video codecs are) from C:\Program Files\VideoLan\VLC
to vlc-static-rs/target/debug/examples
. Then it'll run on Windows, too, otherwise you'll just get an initialization error when running the example.
@tuaris I've forked this repo and changed it to use dynamic loading instead of static linking: https://github.com/fschutt/vlc-static-rs
The
vlc.lib
doesn't exist on Windows, so I just loaded the functions from thelibvlc.dll
andlibvlccore.dll
from the 3.0.11 release, downloaded from the VLC installation. In order forvlc-static-rs
to work, you can clone the repo and runcargo run --example test -- "mymovie.mp4"
. Plus you need to copy the /plugins directory (where are the video codecs are) fromC:\Program Files\VideoLan\VLC
tovlc-static-rs/target/debug/examples
. Then it'll run on Windows, too, otherwise you'll just get an initialization error when running the example.
How would this work in regards to our own custom scripting. for instance would i just move the plugins directory or would i need to do more as well?
@PDFergus you just bundle everything your plugins inside of the app and use include_bytes!()
to package it into the final binary. Then you unpack it when the user starts the application.
Any fix for this?
@prayag17 yeah, use vlc-static-rs instead of vlc-rs, because the former includes the vlc.lib
file as part of the distribution
I found vlc.lib, it is present inside the SDK folder. But I am having other issues when running it
vlc-rs uses vs to export .lib from .dll. The code in crates.io failed to work. I use it directly from git:
[dependencies.vlc-rs]
git = "https://code.videolan.org/videolan/vlc-rs.git"
It just works for me!
Using the instruction on README.md. I added to the bottom of Cargo.toml
Then copy pasted the example to
main.rs
. Build on Windows fails with:I do have VLC installed