Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/allyourcodebase/ffmpeg
FFmpeg Zig package
https://github.com/allyourcodebase/ffmpeg
ffmpeg zig zig-package
Last synced: 2 days ago
JSON representation
FFmpeg Zig package
- Host: GitHub
- URL: https://github.com/allyourcodebase/ffmpeg
- Owner: allyourcodebase
- License: other
- Created: 2023-01-08T01:31:26.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-31T02:04:15.000Z (5 months ago)
- Last Synced: 2024-10-01T15:19:07.802Z (4 months ago)
- Topics: ffmpeg, zig, zig-package
- Language: C
- Homepage:
- Size: 161 MB
- Stars: 170
- Watchers: 4
- Forks: 21
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: COPYING.GPLv2
Awesome Lists containing this project
README
# FFmpeg Packaged for Zig
This is a fork of [ffmpeg](https://ffmpeg.org/), packaged for Zig. Unnecessary
files have been deleted, and the build system has been replaced with
`build.zig`.There are no system dependencies; the only thing required to build this package
is [Zig](https://ziglang.org/download/).Zig API bindings are also provided via the "av" module. See `doc/examples` for
API usage examples.## Differences from Upstream
* Only a single static library is produced. There is no option to create a
dynamic library.
* The ffmpeg command line tool is not provided. Perhaps this could be added if
desired.
* Documentation, tests, and tools are not provided.
* This package enables everything supported by the target; it does not expose
configuration options to choose the set of supported codecs and formats.
* The set of external library integrations is fixed.## External Libraries Included
* [x] libmp3lame
* [x] libvorbis
* [x] liboggMore can be added as desired.
## Update Process
These are the instructions to update this package when a new FFmpeg version is
released upstream.1. Merge the new tag into main and resolve all conflicts by replacing the
conflicting files with the files from upstream.
2. `find libavcodec/ libavdevice/ libavfilter/ libavformat libavutil/ libswscale/ libswresample/ -type f -name "*.asm" -o -name "*.c" -o -name "*.S"`
* Edit to omit files ending in `_template.c` or `_tablegen.c`
* Sort the list
* Update the `all_sources` list in `build.zig`.
3. Inspect the git diff to keep some of the source files commented out like
they were before. Some handy filtering rules apply:
* `/L` prefix means Linux-only
* `/W` prefix means Windows-only
4. Run `./configure --prefix=$HOME/local/ffmpeg --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-programs --enable-libmp3lame --enable-libvorbis --disable-shared --enable-static`
against upstream and diff the generated `config.h` file to the one generated
by this build script. Apply appropriate changes to `build.zig`.
5. Update these files which are generated by the upstream configure script:
* `config_components.h`
* `libavfilter/filter_list.c`
* `libavcodec/codec_list.c`
* `libavcodec/parser_list.c`
* `libavcodec/bsf_list.c`
* `libavformat/demuxer_list.c`
* `libavformat/muxer_list.c`
* `libavdevice/indev_list.c`
* `libavdevice/outdev_list.c`
* `libavformat/protocol_list.c`
6. Update the `headers` list in `build.zig` based on what files are present in
`$HOME/local/ffmpeg/include`.