I get the following error when trying to run the metadata
example on windows
C:\Users\brand\repos\ffmpeg-the-third> cargo run --example metadata
Updating crates.io index
Compiling ffmpeg-the-third v1.1.0+ffmpeg-5.1.2 (C:\Users\brand\repos\ffmpeg-the-third)
Finished dev [unoptimized + debuginfo] target(s) in 2.75s
Running `target\debug\examples\metadata.exe`
error: process didn't exit successfully: `target\debug\examples\metadata.exe` (exit code: 0xc0000135, STATUS_DLL_NOT_FOUND)
I have installed ffmpeg (and shared libraries) using the ffmpeg-shared
package from chocolatey.
My FFMPEG_DIR
env variable is set to C:\Program Files\FFmpeg
.
Here's a tree of my FFMPEG_DIR
C:\PROGRAM FILES\FFMPEG
├───bin
├───doc
├───ffmpeg-5.1.1-full_build-shared
│ ├───bin
│ ├───doc
│ ├───include
│ │ ├───libavcodec
│ │ ├───libavdevice
│ │ ├───libavfilter
│ │ ├───libavformat
│ │ ├───libavutil
│ │ ├───libpostproc
│ │ ├───libswresample
│ │ └───libswscale
│ ├───lib
│ └───presets
├───include
│ ├───libavcodec
│ ├───libavdevice
│ ├───libavfilter
│ ├───libavformat
│ ├───libavutil
│ ├───libpostproc
│ ├───libswresample
│ └───libswscale
├───lib
└───presets
The build script seems to be able to find the header files just fine. in fact, if I run cargo build
it compiles just fine.
the contents of FFMPEG_DIR\lib:
Directory of C:\Program Files\FFmpeg\lib
01/24/2023 07:24 PM <DIR> .
01/24/2023 07:24 PM <DIR> ..
09/25/2022 09:50 AM 4,229 avcodec-59.def
09/25/2022 09:50 AM 133,376 avcodec.lib
09/25/2022 09:50 AM 544 avdevice-59.def
09/25/2022 09:50 AM 16,444 avdevice.lib
09/25/2022 09:50 AM 1,707 avfilter-8.def
09/25/2022 09:50 AM 50,466 avfilter.lib
09/25/2022 09:50 AM 3,594 avformat-59.def
09/25/2022 09:50 AM 123,914 avformat.lib
09/25/2022 09:50 AM 13,618 avutil-57.def
09/25/2022 09:50 AM 456,536 avutil.lib
09/25/2022 09:50 AM 178,834 libavcodec.dll.a
09/25/2022 09:50 AM 13,518 libavdevice.dll.a
09/25/2022 09:50 AM 164,002 libavfilter.dll.a
09/25/2022 09:50 AM 139,952 libavformat.dll.a
09/25/2022 09:50 AM 384,570 libavutil.dll.a
09/25/2022 09:50 AM 7,514 libpostproc.dll.a
09/25/2022 09:50 AM 17,288 libswresample.dll.a
09/25/2022 09:50 AM 22,050 libswscale.dll.a
09/25/2022 09:50 AM 223 postproc-56.def
09/25/2022 09:50 AM 9,440 postproc.lib
09/25/2022 09:50 AM 519 swresample-4.def
09/25/2022 09:50 AM 21,154 swresample.lib
09/25/2022 09:50 AM 746 swscale-6.def
09/25/2022 09:50 AM 26,726 swscale.lib
24 File(s) 1,790,964 bytes
2 Dir(s) 158,021,533,696 bytes free
now I think it's weird that the dll files here have the .a extension, but removing that extension doesn't seem to help.
Also for reference my currently installed ffmpeg version is 5.1.2