Commit d8bf2445 authored by Derek Buitenhuis's avatar Derek Buitenhuis

avcodec: Add librav1e encoder

Port to the new send/receive API by: James Almer <jamrial@gmail.com>.
Signed-off-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parent 0f89a229
......@@ -21,6 +21,7 @@ version <next>:
- VDPAU VP9 hwaccel
- median filter
- QSV-accelerated VP9 encoding
- AV1 encoding support via librav1e
version 4.2:
......
......@@ -254,6 +254,7 @@ External library support:
--enable-libopenmpt enable decoding tracked files via libopenmpt [no]
--enable-libopus enable Opus de/encoding via libopus [no]
--enable-libpulse enable Pulseaudio input via libpulse [no]
--enable-librav1e enable AV1 encoding via rav1e [no]
--enable-librsvg enable SVG rasterization via librsvg [no]
--enable-librubberband enable rubberband needed for rubberband filter [no]
--enable-librtmp enable RTMP[E] support via librtmp [no]
......@@ -1784,6 +1785,7 @@ EXTERNAL_LIBRARY_LIST="
libopenmpt
libopus
libpulse
librav1e
librsvg
librtmp
libshine
......@@ -3203,6 +3205,8 @@ libopenmpt_demuxer_deps="libopenmpt"
libopus_decoder_deps="libopus"
libopus_encoder_deps="libopus"
libopus_encoder_select="audio_frame_queue"
librav1e_encoder_deps="librav1e"
librav1e_encoder_select="extract_extradata_bsf"
librsvg_decoder_deps="librsvg"
libshine_encoder_deps="libshine"
libshine_encoder_select="audio_frame_queue"
......@@ -6287,6 +6291,7 @@ enabled libopus && {
}
}
enabled libpulse && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new
enabled librav1e && require_pkg_config librav1e "rav1e >= 0.1.0" rav1e.h rav1e_context_new
enabled librsvg && require_pkg_config librsvg librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_render_cairo
enabled librtmp && require_pkg_config librtmp librtmp librtmp/rtmp.h RTMP_Socket
enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++ && append librubberband_extralibs "-lstdc++"
......
......@@ -1378,6 +1378,49 @@ makes it possible to store non-rgb pix_fmts.
@end table
@section librav1e
rav1e AV1 encoder wrapper.
Requires the presence of the rav1e headers and library during configuration.
You need to explicitly configure the build with @code{--enable-librav1e}.
@subsection Options
@table @option
@item qmax
Sets the maximum quantizer to use when using bitrate mode.
@item qmin
Sets the minimum quantizer to use when using bitrate mode.
@item qp
Uses quantizer mode to encode at the given quantizer.
@item speed
Selects the speed preset (0-10) to encode with.
@item tiles
Selects how many tiles to encode with.
@item tile-rows
Selects how many rows of tiles to encode with.
@item tile-columns
Selects how many columns of tiles to encode with.
@item rav1e-params
Set rav1e options using a list of @var{key}=@var{value} pairs separated
by ":". See @command{rav1e --help} for a list of options.
For example to specify librav1e encoding options with @option{-rav1e-params}:
@example
ffmpeg -i input -c:v librav1e -b:v 500K -rav1e-params speed=5:low_latency=true output.mp4
@end example
@end table
@section libaom-av1
libaom AV1 encoder wrapper.
......
......@@ -253,6 +253,13 @@ FFmpeg can use the OpenJPEG libraries for decoding/encoding J2K videos. Go to
instructions. To enable using OpenJPEG in FFmpeg, pass @code{--enable-libopenjpeg} to
@file{./configure}.
@section rav1e
FFmpeg can make use of rav1e (Rust AV1 Encoder) via its C bindings to encode videos.
Go to @url{https://github.com/xiph/rav1e/} and follow the instructions to build
the C library. To enable using rav1e in FFmpeg, pass @code{--enable-librav1e}
to @file{./configure}.
@section TwoLAME
FFmpeg can make use of the TwoLAME library for MP2 encoding.
......
......@@ -993,6 +993,7 @@ OBJS-$(CONFIG_LIBOPUS_DECODER) += libopusdec.o libopus.o \
vorbis_data.o
OBJS-$(CONFIG_LIBOPUS_ENCODER) += libopusenc.o libopus.o \
vorbis_data.o
OBJS-$(CONFIG_LIBRAV1E_ENCODER) += librav1e.o
OBJS-$(CONFIG_LIBSHINE_ENCODER) += libshine.o
OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o
OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o
......
......@@ -704,6 +704,7 @@ extern AVCodec ff_libopenjpeg_encoder;
extern AVCodec ff_libopenjpeg_decoder;
extern AVCodec ff_libopus_encoder;
extern AVCodec ff_libopus_decoder;
extern AVCodec ff_librav1e_encoder;
extern AVCodec ff_librsvg_decoder;
extern AVCodec ff_libshine_encoder;
extern AVCodec ff_libspeex_encoder;
......
This diff is collapsed.
......@@ -28,7 +28,7 @@
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 60
#define LIBAVCODEC_VERSION_MINOR 61
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment