]> pere.pagekite.me Git - homepage.git/commitdiff
New post on AV1.
authorPetter Reinholdtsen <pere@hungry.com>
Sat, 16 Apr 2022 06:31:03 +0000 (08:31 +0200)
committerPetter Reinholdtsen <pere@hungry.com>
Sat, 16 Apr 2022 06:31:03 +0000 (08:31 +0200)
blog/data/2022-04-16-debian-av1.txt [new file with mode: 0644]

diff --git a/blog/data/2022-04-16-debian-av1.txt b/blog/data/2022-04-16-debian-av1.txt
new file mode 100644 (file)
index 0000000..60db6ce
--- /dev/null
@@ -0,0 +1,74 @@
+Title: Playing and encodingd AV1 in Debian Bullseye
+Tags: english, standard, video
+Date: 2022-04-16 08:40
+
+<p>Inspired by the recent news of
+<a href="https://slashdot.org/story/22/04/03/2039219/intel-beats-amd-and-nvidia-with-arc-gpus-full-av1-support">AV1
+hardware encoding support from Intel</a>, I decided to look into
+the state of AV1 on Linux today.  AV1 is a
+<a href="https://web.archive.org/web/20160618103850/http://www.digistan.org/open-standard:definition">free
+and open standard</a> as defined by Digistan without any royalty
+payment requirement, unlike its much used competitor encoding
+H.264.  While looking, I came across an 5 year
+<a href="https://askubuntu.com/questions/1061908/how-to-encode-and-playback-video-with-the-av1-codec-on-bionic-beaver-18-04">old
+question on askubuntu.com</a> which in turn inspired me to check out
+how things are in Debian Stable regarding AV1.  The test file listed
+in the question (askubuntu_test_aom.mp4) did not exist any more, so I
+tracked down a different set of test files on
+<a href="https://av1.webmfiles.org/">av1.webmfiles.org</a> to test them
+with the various video tools I had installed on my machine.  I was
+happy to discover that AV1 decoding and playback worked with almost
+every tool I tested:
+
+<table align="center">
+<tr><td>mediainfo</td>       <td>ok</td></tr>
+<tr><td>dragonplayer</td>    <td>ok</td></tr>
+<tr><td>ffmpeg / ffplay</td> <td>ok</td></tr>
+<tr><td>gnome-mplayer</td>   <td>fail</td></tr>
+<tr><td>mplayer</td>        <td>ok</td></tr>
+<tr><td>mpv</td>            <td>ok</td></tr>
+<tr><td>parole</td>         <td>ok</td></tr>
+<tr><td>vlc</td>            <td>ok</td></tr>
+<tr><td>firefox</td>         <td>ok</td></tr>
+<tr><td>chromium</td>        <td>ok</td></tr>
+</table>
+
+<p>AV1 encoding is available in Debian Stable from the aom-tools
+version 1.0.0.errata1-3 package, using the aomenc tool.  The encoding
+using the package in Debian Stable is quite slow, with the frame rate
+for my 10 second test video at around 0.25 fps.  My 10 second video
+test took 16 minutes and 11 seconds on my test machine.</p>
+
+<p>I tested by first running ffmpeg and then aomenc using the recipe
+provided by the askubuntu recipe above.  I had to remove the
+'--row-mt=1' option, as it was not supported in my 1.0.0 version.  The
+encoding only used a single thread, according to <tt>top</tt>.</p>
+
+<blockquote><pre>
+ffmpeg -i some-old-video.ogv -t 10 -pix_fmt yuv420p video.y4m
+aomenc --fps=24/1 -u 0 --codec=av1 --target-bitrate=1000 \
+  --lag-in-frames=25 --auto-alt-ref=1 -t 24 --cpu-used=8 \
+  --tile-columns=2 --tile-rows=2 -o output.webm video.y4m
+</pre></blockquote>
+
+<p>As version 1.0.0 currently have several
+<a href="https://security-tracker.debian.org/tracker/source-package/aom">unsolved
+security issues in Debian Stable</a>, and to see if the recent
+backport <a href="https://tracker.debian.org/pkg/aom">provided in
+Debian</a> is any quicker, I ran <tt>apt -t bullseye-backports install
+aom-tools</tt> to fetch the backported version and re-encoded the
+video using the latest version.  This time the '--row-mt=1' option
+worked, and the encoding was done in 46 seconds with a frame rate of
+around 5.22 fps.  This time it seem to be using all my four cores to
+encode.  Encoding speed is still too low for streaming and real time,
+which would require frame rates above 25 fps, but might be good enough
+for offline encoding.</p>
+
+<p>I am very happy to see AV1 playback working so well with the
+default tools in Debian Stable.  I hope the encoding situation improve
+too, allowing even a slow old computer like my 10 year old laptop to
+be used for encoding.</p>
+
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>