Skip to content

ffmpeg-full: Add support for rav1e (faster AV1 encoding) #95188

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

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

primeos
Copy link
Member

@primeos primeos commented Aug 11, 2020

Motivation for this change

Important note: I'm pretty sure that rav1e currently won't cross compile so if ffmpeg-full can be cross compiled we should set rav1e to null by default.

Usage: https://ffmpeg.org/ffmpeg-codecs.html#librav1e

Example/test:

$ ffmpeg -encoders 2>/dev/null | grep rav1e
 V..... librav1e             librav1e AV1 (codec av1)
$ ffmpeg -i test.y4m -c:v librav1e -b:v 500K av1.mp4
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.0 (GCC)
  configuration: --disable-static --prefix=/nix/store/fk43qqifmhbjhq02v91mpv51d04xrpwk-ffmpeg-full-4.3.1 --target_os=linux --arch=x86_64 --enable-gpl --enable-version3 --disable-nonfree --enable-shared --enable-pic --disable-small --enable-runtime-cpudetect --disable-lto --enable-gray --enable-swscale-alpha --enable-hardcoded-tables --enable-safe-bitstream-reader --enable-pthreads --disable-w32threads --disable-os2threads --enable-network --enable-pixelutils --enable-ffmpeg --enable-ffplay --enable-ffprobe --enable-avcodec --enable-avdevice --enable-avfilter --enable-avformat --enable-avresample --enable-avutil --enable-postproc --enable-swresample --enable-swscale --enable-doc --disable-htmlpages --enable-manpages --disable-podpages --disable-txtpages --enable-bzlib --enable-libcelt --enable-libdav1d --disable-libfdk-aac --disable-libflite --enable-fontconfig --enable-libfreetype --enable-frei0r --enable-libfribidi --enable-libgme --enable-gnutls --enable-libgsm --enable-ladspa --enable-libmp3lame --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdc1394 --enable-iconv --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmysofa --enable-libopus --enable-librsvg --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvmaf --enable-libvpx --enable-libwebp --enable-xlib --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxcb-shape --enable-lzma --enable-nvenc --enable-openal --enable-libopencore-amrnb --disable-opengl --enable-libopenjpeg --disable-openssl --enable-libpulse --enable-librav1e --enable-librtmp --enable-sdl2 --enable-libsoxr --enable-libspeex --enable-libvidstab --enable-libvo-amrwbenc --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-zlib --disable-debug --enable-optimizations --disable-extra-warnings --disable-stripping
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, yuv4mpegpipe, from 'test.y4m':
  Duration: 00:00:02.04, start: 0.000000, bitrate: 33178 kb/s
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(progressive), 384x288, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> av1 (librav1e))
Press [q] to stop, [?] for help
Output #0, mp4, to 'av1.mp4':
  Metadata:
    encoder         : Lavf58.45.100
    Stream #0:0: Video: av1 (librav1e) (av01 / 0x31307661), yuv420p, 384x288, q=-1--1, 500 kb/s, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.91.100 librav1e
frame=   51 fps=2.1 q=-0.0 Lsize=     167kB time=00:00:02.00 bitrate= 682.7kbits/s speed=0.0825x
video:166kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.533024%
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
primeos Michael Weiss
@tomberek
Copy link
Contributor

tomberek commented Sep 6, 2020

Result of nixpkgs-review pr 95188 1

1 package marked as broken and skipped:
- meguca
9 packages failed to build:
- liquidsoap
- python27Packages.pytmx
- python37Packages.baselines
- python37Packages.gym
- python37Packages.pytmx
- python37Packages.roboschool
- python38Packages.gym
- python38Packages.pytmx
- python38Packages.roboschool
17 packages built:
- ffmpeg-full
- handbrake
- hydron
- kdenlive (kdeApplications.kdenlive)
- manim
- olive-editor
- printrun
- python27Packages.pydub
- python27Packages.pyglet
- python37Packages.moderngl-window
- python37Packages.pydub
- python37Packages.pyglet
- python38Packages.moderngl-window
- python38Packages.pydub
- python38Packages.pyglet
- soundkonverter
- webcamoid

@primeos primeos merged commit b8f7063 into NixOS:master Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants