#22065 closed enhancement (fixed)
Add Software AV1 support to FFMPEG
| Reported by: | Rahul Chandra | Owned by: | zeckma |
|---|---|---|---|
| Priority: | normal | Milestone: | 13.0 |
| Component: | BOOK | Version: | git |
| Severity: | medium | Keywords: | |
| Cc: |
Description (last modified by )
Requires Adding Encoder: rav1e: https://github.com/xiph/rav1e
Decoder: dav1d: https://code.videolan.org/videolan/dav1d
Change History (25)
comment:1 by , 13 months ago
| Description: | modified (diff) |
|---|
comment:2 by , 13 months ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:3 by , 13 months ago
comment:4 by , 13 months ago
I think we can do that, I need to make sure that gstreamer supports it though
follow-up: 7 comment:5 by , 13 months ago
https://gstreamer.freedesktop.org/documentation/dav1d/?gi-language=c https://gstreamer.freedesktop.org/documentation/rav1e/index.html?gi-language=c
They're both part of the Rust plugins suite... We could either add the respective plugins or keep libaom. I'm leaning towards just adding them. I don't know how this would affect jhalfs but maybe we could put all of the rust plugins on one page similar to xorg-libs or KDE. Just have users pick which one's they want or install all by default?
comment:6 by , 13 months ago
We already use an rs plugin for gtk4, I think we might also want another one for laptop camera support in snapshot (I forget which one I installed to make mine work)
comment:7 by , 13 months ago
Replying to Rahul Chandra:
https://gstreamer.freedesktop.org/documentation/dav1d/?gi-language=c https://gstreamer.freedesktop.org/documentation/rav1e/index.html?gi-language=c
They're both part of the Rust plugins suite... We could either add the respective plugins or keep libaom. I'm leaning towards just adding them.
I agree.
I don't know how this would affect jhalfs but maybe we could put all of the rust plugins on one page similar to xorg-libs or KDE. Just have users pick which one's they want or install all by default?
I think we can just provide the 3 plugins needed by other packages and let the users pick. jhalfs can simply just install all the 3 plugins. It would be like how we deal with webkitgtk.
comment:8 by , 13 months ago
Regarding rav1e, gst-plugins-rs will always build a copy of rav1e instead of using the system one. And there seems nothing we can do to make it use the system one (as both are Rust packages, and it's common for a Rust package to build a Rust dependency in this way).
follow-up: 19 comment:9 by , 13 months ago
Added SVT-AV1 (AV1 encoder) and dav1d (decoder) in GLFS and archived libaom. The commit is here: https://github.com/glfs-book/glfs/commit/5ab31a98ea8c7d92ece2a5b6a291b2ee374adb50. No problems over here with a non-libaom build. YT videos work as expected, Twitch livestreams work just fine, and Google Play Movies which some can have some issues with FFmpeg upgrades have no issues.
comment:10 by , 13 months ago
| Owner: | changed from to |
|---|---|
| Status: | assigned → new |
comment:11 by , 13 months ago
| Status: | new → assigned |
|---|
follow-up: 16 comment:12 by , 13 months ago
gst-plugins-bad builds libaom plugin. We don't seem to document this or the dependency.
comment:13 by , 13 months ago
gst-plugins-bad has an svt-av1 plugin. We still need to add gst-plugin-dav1d (from the rust plugins) for dav1d.
follow-up: 15 comment:14 by , 13 months ago
I've seen several references to rav1e in here. Do we need that as well, or what's the plan with that?
comment:15 by , 13 months ago
Replying to Douglas R. Reno:
I've seen several references to rav1e in here. Do we need that as well, or what's the plan with that?
SVT-AV1 replaces rav1e. They do the same job, it's just one is faster and doesn't depend on Rustc. The packages we care about support dav1d and SVT-AV1, and optionally rav1e which will stay out of book for now.
follow-up: 17 comment:16 by , 13 months ago
Replying to zeckma:
gst-plugins-bad builds libaom plugin. We don't seem to document this or the dependency.
libaom is listed as an optional dependency so if it's installed at build time the plugin will get built.
follow-up: 18 comment:17 by , 13 months ago
Replying to Joe Locash:
Replying to zeckma:
gst-plugins-bad builds libaom plugin. We don't seem to document this or the dependency.
libaom is listed as an optional dependency so if it's installed at build time the plugin will get built.
Ah, didn't notice it. If it's optional though, that sort of means AV1 is optional. Do we need to add instructions for the Rust plugin for dav1d?
comment:18 by , 13 months ago
Replying to zeckma:
Replying to Joe Locash:
Replying to zeckma:
gst-plugins-bad builds libaom plugin. We don't seem to document this or the dependency.
libaom is listed as an optional dependency so if it's installed at build time the plugin will get built.
Ah, didn't notice it. If it's optional though, that sort of means AV1 is optional. Do we need to add instructions for the Rust plugin for dav1d?
Talked with Doug in regards to this. SVT-AV1 will be added to Recommended for gst-plugins-bad and gst-plugins-rs will get instructions for dav1d. That way, WebKitGTK will be able to do AV1 playback.
comment:19 by , 12 months ago
Replying to zeckma:
Added SVT-AV1 (AV1 encoder) and dav1d (decoder) in GLFS and archived libaom. The commit is here: https://github.com/glfs-book/glfs/commit/5ab31a98ea8c7d92ece2a5b6a291b2ee374adb50. No problems over here with a non-libaom build. YT videos work as expected, Twitch livestreams work just fine, and Google Play Movies which some can have some issues with FFmpeg upgrades have no issues.
I mentioned it in the previous FF ticket, but after a reboot, I encountered the standard FFmpeg upgrade issues. So this point of everything working as expected is moot.
follow-up: 22 comment:20 by , 12 months ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Done and dusted. We are keeping libaom because it supports chroma subsampling outside of YUV420. SVT-AV1 does not, it only supports 420. This is likely the reasons distros haven't axed libaom yet. At the very least, it will be up to each package to pick and choose with encoder/decoder to use. FFmpeg might choose the newly added dav1d/SVT-AV1, while libavif may use libaom.
comment:21 by , 12 months ago
Thanks Zeckma, I'm in the middle of the move right now and wasn't able to get to this.
comment:22 by , 12 months ago
Replying to zeckma:
Done and dusted. We are keeping libaom because it supports chroma subsampling outside of YUV420. SVT-AV1 does not, it only supports 420. This is likely the reasons distros haven't axed libaom yet. At the very least, it will be up to each package to pick and choose with encoder/decoder to use. FFmpeg might choose the newly added dav1d/SVT-AV1, while libavif may use libaom.
Because of the outrageous test time I think we should still axe this but keep it documented. Every time I've seen 4:2:2 or 4:4:4 HDR/DoVI has been involved and we don't support either AFAIK. I think we're fine only supporting only 4:2:0
comment:23 by , 12 months ago
I disagree. We had the functionality before, and folks like myself do depend on it when doing editing using Kdenlive. We already discourage running the tests, and if you run them for libavif it will grab a copy anyway and run the full libaom test suite
comment:24 by , 12 months ago
good point, I guess we can leave it in until svt-av1 gets full color range support.

I guess we can archive libaom after we add them, as the pair provides AV1 encoder/decoder faster than libaom. libavif can also be configured to use libdav1d instead.