.github/workflows | ||
examples | ||
internal/cmd/flags | ||
testdata | ||
.gitignore | ||
astiav_!windows.go | ||
astiav_test.go | ||
astiav_windows.go | ||
buffersink_flag.go | ||
buffersrc_flag.go | ||
bytes_test.go | ||
bytes.go | ||
channel_layout_test.go | ||
channel_layout.go | ||
chroma_location.go | ||
codec_context_flag.go | ||
codec_context_test.go | ||
codec_context.go | ||
codec_id_test.go | ||
codec_id.go | ||
codec_parameters_test.go | ||
codec_parameters.go | ||
codec_tag.go | ||
codec_test.go | ||
codec.go | ||
color_primaries.go | ||
color_range.go | ||
color_space.go | ||
color_transfer_characteristic.go | ||
device_test.go | ||
device.go | ||
dictionary_entry.go | ||
dictionary_flag.go | ||
dictionary_test.go | ||
dictionary.go | ||
display_matrix_test.go | ||
display_matrix.go | ||
error_test.go | ||
error.go | ||
filter_command_flag.go | ||
filter_context.go | ||
filter_graph_test.go | ||
filter_graph.go | ||
filter_in_out.go | ||
filter_link.go | ||
filter_test.go | ||
filter.go | ||
flag_test.go | ||
flag.go | ||
flags_test.go | ||
flags.go | ||
format_context_ctx_flag.go | ||
format_context_flag.go | ||
format_context_test.go | ||
format_context.go | ||
format_event_flag.go | ||
frame_data_test.go | ||
frame_data.go | ||
frame_side_data_type.go | ||
frame_side_data.go | ||
frame_test.go | ||
frame.go | ||
go.mod | ||
go.sum | ||
input_format_test.go | ||
input_format.go | ||
int_read_write_test.go | ||
int_read_write.go | ||
io_context_flag.go | ||
io_context_test.go | ||
io_context.go | ||
io_format_flag.go | ||
level.go | ||
LICENSE | ||
log_test.go | ||
log.go | ||
Makefile | ||
mathematics_test.go | ||
mathematics.go | ||
media_type_test.go | ||
media_type.go | ||
output_format.go | ||
packet_flag.go | ||
packet_side_data_type.go | ||
packet_test.go | ||
packet.go | ||
picture_type_test.go | ||
picture_type.go | ||
pixel_format_test.go | ||
pixel_format.go | ||
profile.go | ||
rational_test.go | ||
rational.go | ||
README.md | ||
rounding.go | ||
sample_format_test.go | ||
sample_format.go | ||
seek_flag.go | ||
stream_event_flag.go | ||
stream_test.go | ||
stream.go | ||
strict_std_compliance.go | ||
thread_type.go | ||
time.go |
astiav
is a Golang library providing C bindings for ffmpeg
It's only compatible with ffmpeg
n5.1.2
.
Its main goals are to:
- provide a better GO idiomatic API
- standard error pattern
- typed constants and flags
- struct-based functions
- ...
- provide the GO version of ffmpeg examples
- be fully tested
Examples
Examples are located in the examples directory and mirror as much as possible the ffmpeg examples.
name | astiav | ffmpeg |
---|---|---|
Demuxing/Decoding | see | see |
Filtering | see | see |
Remuxing | see | see |
Transcoding | see | see |
Tip: you can use the video sample located in the testdata
directory for your tests
Install ffmpeg from source
If you don't know how to install ffmpeg
, you can use the following to install it from source:
$ make install-ffmpeg
ffmpeg
will be built from source in a directory named tmp
and located in you working directory
For your GO code to pick up ffmpeg
dependency automatically, you'll need to add the following environment variables:
(don't forget to replace {{ path to your working directory }}
with the absolute path to your working directory)
export CGO_LDFLAGS="-L{{ path to your working directory }}/tmp/n5.1.2/lib/",
export CGO_CFLAGS="-I{{ path to your working directory }}/tmp/n5.1.2/include/",
export PKG_CONFIG_PATH="{{ path to your working directory }}/tmp/n5.1.2/lib/pkgconfig",
Why astiav?
After maintaining for several years the most starred fork of goav, I've decided to write from scratch my own C bindings to fix most of the problems I still encountered using goav
.