tanersener / mobile-ffmpeg

FFmpeg for Android, iOS and tvOS. Not maintained anymore. Superseded by FFmpegKit.
https://tanersener.github.io/mobile-ffmpeg
GNU General Public License v3.0
3.85k stars 787 forks source link

Updated AV1 Codecs #657

Closed JordanMcCulloch closed 3 years ago

JordanMcCulloch commented 3 years ago

Description

Since AV1 is the successor to VP9, this is a simple request for both MobileFFmpeg AND MobileFFmpeg LTS to make use of the following AV1 releases:

1) Update 'libaom' to the latest version 2.0.1 [1] following steps in [2].

 -> Currently Mobile-FFmpeg is running the old experimental 'libaom' version 1 which requires the addition of the '-strict experimental' flag [3], and is drastically slower than the newer version 2. 

2) Add 'libsvtav1' support following steps in [4], as 'SVT-AV1' is regularly being improved by Netflix and Intel and is faster than 'libaom'.

3) Add 'librav1e' support following steps in [5], since 'rav1e' is even faster than 'libaom' under certain situations.

Environment

[1] https://aomedia.googlesource.com/aom/+/refs/tags/v2.0.1 [2] https://www.ffmpeg.org/general.html#Alliance-for-Open-Media-_0028AOM_0029 [3] https://trac.ffmpeg.org/wiki/Encode/AV1 [4] https://www.ffmpeg.org/general.html#SVT_002dAV1 [5] https://www.ffmpeg.org/general.html#rav1e

tanersener commented 3 years ago

I remember we discussed AV1 encoder/decoder alternatives with @Javernaut back in December 2019. One of the projects we talked about was dav1d and it was depending on meson and ninja. I was not very keen to depend on another build system in build scripts so I didn't make a change then.

These days, popularity of AV1 increases each day. So, I think we need to re-consider supporting alternative encoders/decoders. I don't know how fast is libaom 2.x but I remember that libaom 1.x was very slow and it was nearly impossible to use it.

Regarding the alternatives; there are two encoder alternatives (librav1e, libsvtav1) and two decoder alternatives (libsvtav1, dav1d). Do you know which of these are better than the other?

JordanMcCulloch commented 3 years ago

Thanks tanersener for looking into this!

Essentially, the comparisons online that are available are months old, and are therefore out of date due to the regular performance improvements being made.

Hence why enabling multiple will allow people to do their own tests. But in general:

Best Encoders: librav1e/rav1e, libsvtav1/SVT-AV1

Best Decoder: libdav1d/dav1d

[1] https://github.com/xiph/rav1e/releases/tag/v0.4.0 [2] https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/e55a80da3872bf7ee6523452c41b5f01817dad43 [3] https://code.videolan.org/videolan/dav1d/-/releases/0.8.0

onexuan commented 3 years ago

please add libsvtav1

tanersener commented 3 years ago

I'm not sure how we can add SVT-AV1 at the moment. SVT-AV1 doesn't support 32-bit architectures. They are not in the project scope. See AOMediaCodec/SVT-AV1/issues/1231.

onexuan commented 3 years ago

OK, I got it

Maybe it can support libdav1d

dav1d

https://code.videolan.org/videolan/dav1d https://netflixtechblog.com/netflix-now-streaming-av1-on-android-d5264a515202 https://netflixtechblog.com/more-efficient-mobile-encodes-for-netflix-downloads-625d7b082909

tanersener commented 3 years ago

Yeah, we can add support for libdav1d.

JordanMcCulloch commented 3 years ago

I think updating libaom to the latest, and adding in libdav1d (decoder) and librav1e (encoder) would be an amazing base point.

onexuan commented 3 years ago

@tanersener https://chromium.googlesource.com/codecs/libgav1/ libgav1 -- an AV1 decoder libgav1 is a Main profile (0) & High profile (1) compliant AV1 decoder. More information on the AV1 video format can be found at aomedia.org.

tanersener commented 3 years ago

This project will be retired. Please consider switching to FFmpegKit. Support for libdav1d is added in FFmpegKit.