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

Building on Windows #1

Open
zmwangx opened this issue Oct 28, 2018 · 3 comments
Open

Building on Windows #1

zmwangx opened this issue Oct 28, 2018 · 3 comments

Comments

@zmwangx
Copy link
Owner

zmwangx commented Oct 28, 2018

pkg-config is probably not the way to go on Windows...

@openersoft
Copy link

1 install choco:
open powershell as administrator:

Set-ExecutionPolicy AllSigned
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

2 install pkg-config by choco:
> choco install pkgconfiglite

@Roms1383
Copy link

Thanks for the precision @openersoft but I struggled a little bit more before I got it to work, so let me add to it if you don't mind.

Please note that I already had both ffmpeg and pkgconfiglite installed with chocolatey at the time I ran into the following issues.

First I kept having the following build error:

error: failed to run custom build command for `ffmpeg-sys-next v6.0.1`
Caused by:
  process didn't exit successfully: `C:\Development\audioware\target\debug\build\ffmpeg-sys-next-b4e1b6120c1ca853\build-script-build` (exit code: 101)
  --- stdout
  Could not find ffmpeg with vcpkg: Could not find Vcpkg tree: No vcpkg installation found. Set the VCPKG_ROOT environment variable or run 'vcpkg integrate install'
  ...

After searching about vcpkg I realized it's an alternative package manager for C++.

NB: I say alternative because chocolatey is also just another package manager.

Well I got it installed by following this gist. Also was very surprised when I realized from the logs that it basically reinstalls everything on my machine (powershell, python, ffmpeg, and a load more), and it also rebuilds ffmpeg from scratch both for release and debug (and it takes a while, so please be patient).

But once it's done, it basically just works ™️.
Hope this helps :)

@Roms1383
Copy link

Roms1383 commented Aug 15, 2023

@zmwangx / @openersoft Is there a way to specify to metadata (with an env var or something) where ffmpeg is installed on the host machine ? Or even better in my own case, to vendor ffmpeg directly in the binary ? (because I'm not sure the users will actually have it installed on their machine).

If not, how much effort is required to retrieve an audio file _duration using simply the std lib ? (if it's even possible, sorry I don't know how it works at all under the hood yet)

Khenziii added a commit to Khenziii/media-merger that referenced this issue Mar 7, 2024
It's cross compliation support is almost not existent

There's a [issue](zmwangx/metadata#1) (which is created by this package's author & is 6 years old) open for this problem, yet it doesn't seem like there is anything being done in this topic.

Note to self: Remember to verify reliablity of small dependencies before
using them.
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

3 participants