You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-7Lines changed: 15 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -14,23 +14,31 @@ Cross platform FFI bindings for FFmpeg inner libraries. This is a crate that:
14
14
15
15
To use this crate, you need to set several environment variables.
16
16
17
-
### Simplest:
17
+
### The simplest usage:
18
18
19
-
Build ffmpeg staticly and set `FFMPEG_PKG_CONFIG_PATH` to the path of the generated FFmpeg package-config files. And you don't need to set other environment variables for static linking.
19
+
#### *nix
20
20
21
-
### More complex
21
+
Build ffmpeg statically and set `FFMPEG_PKG_CONFIG_PATH` to the path of the generated FFmpeg `pkg-config` files. And you don't need to set other environment variables for static linking.
22
22
23
-
You need to set environment variable for both linking and generating bindings.
23
+
(Hint: set `FFMPEG_PKG_CONFIG_PATH` to some placeholder value will let `rusty_ffmpeg` probing system library.)
24
+
25
+
#### Windows
26
+
27
+
Set no environment variable, then `rusty_ffmpeg` will help you download, compile and statically linking FFmpeg using `vcpkg`.
28
+
29
+
### Fine-grained usage:
30
+
31
+
You need to set environment variables for both linking and binding generating procedure.
24
32
25
33
#### To link:
26
34
27
-
1. Dynamic linking with prebuilt dylib: Set `FFMPEG_DLL_PATH` to the path of `dll` or `so`. (Windows: Put corresponding `.lib` file next to the `.dll` file.)
35
+
1. Dynamic linking with pre-built dylib: Set `FFMPEG_DLL_PATH` to the path of `dll` or `so`. (Windows: Put corresponding `.lib` file next to the `.dll` file.)
28
36
29
-
2. Static linking with prebuilt staticlib: or set `FFMPEG_LIB_DIR` to the path of the FFmpeg prebuilt libs directory.
37
+
2. Static linking with pre-built staticlib: Set `FFMPEG_LIB_DIR` to the path of the FFmpeg pre-built libs directory.
30
38
31
39
#### To generate bindings:
32
40
33
-
1. Compile-time binding generation(requires clang dylib): Set `FFMPEG_INCLUDE_DIR` to the path to the header files for binding generation.
41
+
1. Compile-time binding generation([requires the `Clang`dylib](https://github.com/KyleMayes/clang-sys/blob/c9ae24a7a218e73e1eccd320174349eef5a3bd1a/build.rs#L23)): Set `FFMPEG_INCLUDE_DIR` to the path to the header files for binding generation.
34
42
35
43
2. Use pre-built binding: Set `FFMPEG_BINDING_PATH` to the prebuilt binding file.
0 commit comments