Bug 234194 - multimedia/ffmpeg: Prefer dav1d for decoding
Summary: multimedia/ffmpeg: Prefer dav1d for decoding
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Thomas Zander
URL:
Keywords: needs-qa, performance
Depends on:
Blocks: 235953
  Show dependency treegraph
 
Reported: 2018-12-20 03:52 UTC by Ivan Rozhuk
Modified: 2019-03-16 17:31 UTC (History)
2 users (show)

See Also:
riggs: maintainer-feedback+


Attachments
v1 (1.92 KB, patch)
2018-12-20 19:51 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2018-12-20 03:52:31 UTC
Please, make dav1d AV1 decoder default AV1 decoder then ffmpeg build with dav1d and aom.

I take first 2 video in 4k AV1 here https://www.elecard.com/videos
and aom decode it with lags, low rate fps, on ryzen 2700x.
Same time then I build ffmpeg with dav1d and without aom - all ok.
If build with with dav1d and with aom - low fps/drops.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2018-12-20 19:50:02 UTC
dav1d performance on i386 appears to be worse than aom. Tested on Intel i7-6700K (Skylake) via 11.2 i386 jail on 13.0 amd64 host. Neither CPUTYPE?=native nor -tilethreads help much.

$ fetch https://www.elecard.com/storage/video/Stream2_AV1_4K_22.7mbps.webm
$ ffmpeg -c:v libdav1d -i Stream2_AV1_4K_22.7mbps.webm -f null /dev/null
$ ffmpeg -c:v libaom-av1 -i Stream2_AV1_4K_22.7mbps.webm -f null /dev/null
Comment 2 Jan Beich freebsd_committer freebsd_triage 2018-12-20 19:51:58 UTC
Created attachment 200318 [details]
v1

ffmpeg appears to derive default codec based on sorting order.
Comment 3 Ivan Rozhuk 2018-12-20 23:06:21 UTC
Patch work ok, thanks!

libaom-av1 - 425% CPU and 22 FPS
libdav1d - 230-300% CPU and 32-38 FPS
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-03-16 17:30:46 UTC
A commit references this bug:

Author: riggs
Date: Sat Mar 16 17:29:47 UTC 2019
New revision: 495918
URL: https://svnweb.freebsd.org/changeset/ports/495918

Log:
  Prefer dav1d over for decoding

  PR:		234194
  Submitted by:	jbeich (patch)
  Reported by:	rozhuk.im@gmail.com

Changes:
  head/multimedia/ffmpeg/Makefile
  head/multimedia/ffmpeg/files/patch-libavcodec_allcodecs.c