Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Do not use libaom options, prefer libsvt-av1 #146

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joeyparrish
Copy link
Member

libsvt-av1 can encode in real time with no special options, and does not recognize the options we used in libaom to get as little as 0.2x encoding in our "Player History" live stream.

From now on, let's assume that anyone who wants to use AV1 is using libsvt-av1, which seems to be the only reasonable encoder. If someone is still using libaom, it will still work, but it will be using slower default settings.

libsvt-av1 can encode in real time with no special options, and does
not recognize the options we used in libaom to get as little as 0.2x
encoding in our "Player History" live stream.

From now on, let's assume that anyone who wants to use AV1 is using
libsvt-av1, which seems to be the only reasonable encoder.  If someone
is still using libaom, it will still work, but it will be using slower
default settings.
@mariocynicys
Copy link
Collaborator

to get as little as 0.2x encoding

Do you mean +0.2x the speed of libaom?

Encoding is much much slower for AV1 after applying this patch (never got the finish the 6MB/40sec video I was testing with).

I am using my system ffmpeg since the static one from https://github.com/shaka-project/static-ffmpeg-binaries is segfaulting for some reason.
My ffmpeg config:

ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13.1.1 (GCC) 20230429
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

@mariocynicys
Copy link
Collaborator

My ffmpeg supports both libaom & libsvtav1, but looks like it defaults to using libaom anyways:
image

Is there anyway to make it prefer one lib over the other?

@joeyparrish
Copy link
Member Author

Do you mean +0.2x the speed of libaom?

No, I mean the live stream I mentioned can only be encoded at 0.2x in libaom on our hardware. In libsvt-av1, it can be encoded in realtime.

My ffmpeg supports both libaom & libsvtav1, but looks like it defaults to using libaom anyways. Is there anyway to make it prefer one lib over the other?

Yes, we can set something like -c:v libsvt-av1. Then streamer could only be used for AV1 with ffmpeg builds that have libsvt-av1. But given the performance difference, and the fact that the AOMedia group has dropped libaom in favor of libsvt-av1, I think I would be comfortable with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants