Port to the new send/receive API by: James Almer <jamrial@gmail.com>.



Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>



[new file with mode: 0644]

b/Changelog diff --git a/Changelog (file)

index 558ea8d .. 11f15ed 100644 --- a/ Changelog +++ b/ Changelog @@ -21,6 +21,7 @@ version <next>: - VDPAU VP9 hwaccel - median filter - QSV-accelerated VP9 encoding +- AV1 encoding support via librav1e version 4.2:

b/configure diff --git a/configure (executable)

index 48e1426 .. 1de90e9 100755 --- a/ configure +++ b/ configure @@ -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++"

b/doc/encoders.texi diff --git a/doc/encoders.texi (file)

index eefd124 .. 6cf3a74 100644 --- a/ doc/encoders.texi +++ b/ doc/encoders.texi @@ -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.

b/doc/general.texi diff --git a/doc/general.texi (file)

index 79a23e1 .. a5b77e0 100644 --- a/ doc/general.texi +++ b/ doc/general.texi @@ -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.

b/libavcodec/allcodecs.c diff --git a/libavcodec/allcodecs.c (file)

index 23a778e .. 0c07419 100644 --- a/ libavcodec/allcodecs.c +++ b/ libavcodec/allcodecs.c @@ -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;