astiav是一个 Golang 库,为 ffmpeg 提供 C 绑定
Go to file
2023-09-02 17:26:25 +02:00
.github/workflows Added FrameData 2023-09-02 17:26:25 +02:00
examples Oops 2 2022-04-23 09:08:44 +02:00
internal/cmd/flags Initial commit 2022-02-13 19:08:18 +01:00
testdata Added FrameData 2023-09-02 17:26:25 +02:00
.gitignore Initial commit 2022-02-13 19:08:18 +01:00
astiav_!windows.go Added github action 2023-08-13 10:42:10 +02:00
astiav_test.go Added FrameData 2023-09-02 17:26:25 +02:00
astiav_windows.go Added github action 2023-08-13 10:42:10 +02:00
buffersink_flag.go Initial commit 2022-02-13 19:08:18 +01:00
buffersrc_flag.go Initial commit 2022-02-13 19:08:18 +01:00
bytes_test.go Initial commit 2022-02-13 19:08:18 +01:00
bytes.go Added github action 2023-08-13 10:42:10 +02:00
channel_layout_test.go Bumped ffmpeg version to n5.1.2 2023-03-23 14:59:40 +01:00
channel_layout.go Added github action 2023-08-13 10:42:10 +02:00
chroma_location.go Initial commit 2022-02-13 19:08:18 +01:00
codec_context_flag.go Initial commit 2022-02-13 19:08:18 +01:00
codec_context_test.go Added FrameData 2023-09-02 17:26:25 +02:00
codec_context.go Bumped ffmpeg version to n5.1.2 2023-03-23 14:59:40 +01:00
codec_id_test.go Initial commit 2022-02-13 19:08:18 +01:00
codec_id.go Initial commit 2022-02-13 19:08:18 +01:00
codec_parameters_test.go Added FrameData 2023-09-02 17:26:25 +02:00
codec_parameters.go Bumped ffmpeg version to n5.1.2 2023-03-23 14:59:40 +01:00
codec_tag.go Initial commit 2022-02-13 19:08:18 +01:00
codec_test.go Added github action 2023-08-13 10:42:10 +02:00
codec.go Bumped ffmpeg version to n5.1.2 2023-03-23 14:59:40 +01:00
color_primaries.go Initial commit 2022-02-13 19:08:18 +01:00
color_range.go Initial commit 2022-02-13 19:08:18 +01:00
color_space.go Initial commit 2022-02-13 19:08:18 +01:00
color_transfer_characteristic.go Initial commit 2022-02-13 19:08:18 +01:00
device_test.go Disabled filter graph tests for windows 2023-08-14 11:02:13 +02:00
device.go Add avdevice support (#29) 2023-07-27 17:59:18 +02:00
dictionary_entry.go Initial commit 2022-02-13 19:08:18 +01:00
dictionary_flag.go Initial commit 2022-02-13 19:08:18 +01:00
dictionary_test.go Initial commit 2022-02-13 19:08:18 +01:00
dictionary.go Added github action 2023-08-13 10:42:10 +02:00
display_matrix_test.go Oops 2022-03-26 11:47:14 +01:00
display_matrix.go Oops 2022-03-26 11:47:14 +01:00
error_test.go Initial commit 2022-02-13 19:08:18 +01:00
error.go Initial commit 2022-02-13 19:08:18 +01:00
filter_command_flag.go Initial commit 2022-02-13 19:08:18 +01:00
filter_context.go Initial commit 2022-02-13 19:08:18 +01:00
filter_graph_test.go Disabled filter graph tests for windows 2023-08-14 11:02:13 +02:00
filter_graph.go Added FindPixelFormatByName + frame.AllocSamples 2022-02-20 11:23:28 +01:00
filter_in_out.go Initial commit 2022-02-13 19:08:18 +01:00
filter_link.go Initial commit 2022-02-13 19:08:18 +01:00
filter_test.go Initial commit 2022-02-13 19:08:18 +01:00
filter.go Initial commit 2022-02-13 19:08:18 +01:00
flag_test.go Initial commit 2022-02-13 19:08:18 +01:00
flag.go Initial commit 2022-02-13 19:08:18 +01:00
flags_test.go Initial commit 2022-02-13 19:08:18 +01:00
flags.go Initial commit 2022-02-13 19:08:18 +01:00
format_context_ctx_flag.go Initial commit 2022-02-13 19:08:18 +01:00
format_context_flag.go Bumped ffmpeg version to n5.1.2 2023-03-23 14:59:40 +01:00
format_context_test.go Added FrameData 2023-09-02 17:26:25 +02:00
format_context.go Bumped ffmpeg version to n5.1.2 2023-03-23 14:59:40 +01:00
format_event_flag.go Initial commit 2022-02-13 19:08:18 +01:00
frame_data_test.go Added FrameData 2023-09-02 17:26:25 +02:00
frame_data.go Added FrameData 2023-09-02 17:26:25 +02:00
frame_side_data_type.go Added frame side data 2022-09-18 17:48:10 +02:00
frame_side_data.go Added github action 2023-08-13 10:42:10 +02:00
frame_test.go Added FrameData 2023-09-02 17:26:25 +02:00
frame.go Added FrameData 2023-09-02 17:26:25 +02:00
go.mod Initial commit 2022-02-13 19:08:18 +01:00
go.sum Initial commit 2022-02-13 19:08:18 +01:00
input_format_test.go Disabled filter graph tests for windows 2023-08-14 11:02:13 +02:00
input_format.go Add avdevice support (#29) 2023-07-27 17:59:18 +02:00
int_read_write_test.go Initial commit 2022-02-13 19:08:18 +01:00
int_read_write.go Initial commit 2022-02-13 19:08:18 +01:00
io_context_flag.go Initial commit 2022-02-13 19:08:18 +01:00
io_context_test.go Not using io/ioutil anymore 2023-03-31 16:35:15 +02:00
io_context.go Initial commit 2022-02-13 19:08:18 +01:00
io_format_flag.go Initial commit 2022-02-13 19:08:18 +01:00
level.go Initial commit 2022-02-13 19:08:18 +01:00
LICENSE Initial commit 2022-02-13 19:08:18 +01:00
log_test.go Added fmt to log callback 2022-03-24 15:35:37 +01:00
log.go Bumped ffmpeg version to n5.1.2 2023-03-23 14:59:40 +01:00
Makefile Added github action 2023-08-13 10:42:10 +02:00
mathematics_test.go Initial commit 2022-02-13 19:08:18 +01:00
mathematics.go Initial commit 2022-02-13 19:08:18 +01:00
media_type_test.go Initial commit 2022-02-13 19:08:18 +01:00
media_type.go Initial commit 2022-02-13 19:08:18 +01:00
output_format.go Initial commit 2022-02-13 19:08:18 +01:00
packet_flag.go Initial commit 2022-02-13 19:08:18 +01:00
packet_side_data_type.go Initial commit 2022-02-13 19:08:18 +01:00
packet_test.go Added FrameData 2023-09-02 17:26:25 +02:00
packet.go Added github action 2023-08-13 10:42:10 +02:00
picture_type_test.go Initial commit 2022-02-13 19:08:18 +01:00
picture_type.go Initial commit 2022-02-13 19:08:18 +01:00
pixel_format_test.go Added FindPixelFormatByName + frame.AllocSamples 2022-02-20 11:23:28 +01:00
pixel_format.go Added FindPixelFormatByName + frame.AllocSamples 2022-02-20 11:23:28 +01:00
profile.go Initial commit 2022-02-13 19:08:18 +01:00
rational_test.go Initial commit 2022-02-13 19:08:18 +01:00
rational.go Initial commit 2022-02-13 19:08:18 +01:00
README.md Added github action 2023-08-13 10:42:10 +02:00
rounding.go Initial commit 2022-02-13 19:08:18 +01:00
sample_format_test.go Initial commit 2022-02-13 19:08:18 +01:00
sample_format.go Initial commit 2022-02-13 19:08:18 +01:00
seek_flag.go Initial commit 2022-02-13 19:08:18 +01:00
stream_event_flag.go Initial commit 2022-02-13 19:08:18 +01:00
stream_test.go Added FrameData 2023-09-02 17:26:25 +02:00
stream.go Added github action 2023-08-13 10:42:10 +02:00
strict_std_compliance.go Initial commit 2022-02-13 19:08:18 +01:00
thread_type.go Initial commit 2022-02-13 19:08:18 +01:00
time.go Initial commit 2022-02-13 19:08:18 +01:00

GoReportCard GoDoc Test Coveralls

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.