1 <?xml version=
"1.0" encoding=
"ISO-8859-1"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/'
>
4 <title>Petter Reinholdtsen - Entries from April
2022</title>
5 <description>Entries from April
2022</description>
6 <link>https://people.skolelinux.org/pere/blog/
</link>
10 <title>Playing and encoding AV1 in Debian Bullseye
</title>
11 <link>https://people.skolelinux.org/pere/blog/Playing_and_encoding_AV1_in_Debian_Bullseye.html
</link>
12 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Playing_and_encoding_AV1_in_Debian_Bullseye.html
</guid>
13 <pubDate>Sat,
16 Apr
2022 08:
40:
00 +
0200</pubDate>
14 <description><p
>Inspired by the recent news of
15 <a href=
"https://slashdot.org/story/
22/
04/
03/
2039219/intel-beats-amd-and-nvidia-with-arc-gpus-full-av1-support
">AV1
16 hardware encoding support from Intel
</a
>, I decided to look into
17 the state of AV1 on Linux today. AV1 is a
18 <a href=
"https://web.archive.org/web/
20160618103850/http://www.digistan.org/open-standard:definition
">free
19 and open standard
</a
> as defined by Digistan without any royalty
20 payment requirement, unlike its much used competitor encoding
21 H
.264. While looking, I came across an
5 year
22 <a href=
"https://askubuntu.com/questions/
1061908/how-to-encode-and-playback-video-with-the-av1-codec-on-bionic-beaver-
18-
04">old
23 question on askubuntu.com
</a
> which in turn inspired me to check out
24 how things are in Debian Stable regarding AV1. The test file listed
25 in the question (askubuntu_test_aom.mp4) did not exist any more, so I
26 tracked down a different set of test files on
27 <a href=
"https://av1.webmfiles.org/
">av1.webmfiles.org
</a
> to test them
28 with the various video tools I had installed on my machine. I was
29 happy to discover that AV1 decoding and playback worked with almost
32 <table align=
"center
">
33 <tr
><td
>mediainfo
</td
> <td
>ok
</td
></tr
>
34 <tr
><td
>dragonplayer
</td
> <td
>ok
</td
></tr
>
35 <tr
><td
>ffmpeg / ffplay
</td
> <td
>ok
</td
></tr
>
36 <tr
><td
>gnome-mplayer
</td
> <td
>fail
</td
></tr
>
37 <tr
><td
>mplayer
</td
> <td
>ok
</td
></tr
>
38 <tr
><td
>mpv
</td
> <td
>ok
</td
></tr
>
39 <tr
><td
>parole
</td
> <td
>ok
</td
></tr
>
40 <tr
><td
>vlc
</td
> <td
>ok
</td
></tr
>
41 <tr
><td
>firefox
</td
> <td
>ok
</td
></tr
>
42 <tr
><td
>chromium
</td
> <td
>ok
</td
></tr
>
45 <p
>AV1 encoding is available in Debian Stable from the aom-tools
46 version
1.0.0.errata1-
3 package, using the aomenc tool. The encoding
47 using the package in Debian Stable is quite slow, with the frame rate
48 for my
10 second test video at around
0.25 fps. My
10 second video
49 test took
16 minutes and
11 seconds on my test machine.
</p
>
51 <p
>I tested by first running ffmpeg and then aomenc using the recipe
52 provided by the askubuntu recipe above. I had to remove the
53 '--row-mt=
1' option, as it was not supported in my
1.0.0 version. The
54 encoding only used a single thread, according to
<tt
>top
</tt
>.
</p
>
56 <blockquote
><pre
>
57 ffmpeg -i some-old-video.ogv -t
10 -pix_fmt yuv420p video.y4m
58 aomenc --fps=
24/
1 -u
0 --codec=av1 --target-bitrate=
1000 \
59 --lag-in-frames=
25 --auto-alt-ref=
1 -t
24 --cpu-used=
8 \
60 --tile-columns=
2 --tile-rows=
2 -o output.webm video.y4m
61 </pre
></blockquote
>
63 <p
>As version
1.0.0 currently have several
64 <a href=
"https://security-tracker.debian.org/tracker/source-package/aom
">unsolved
65 security issues in Debian Stable
</a
>, and to see if the recent
66 backport
<a href=
"https://tracker.debian.org/pkg/aom
">provided in
67 Debian
</a
> is any quicker, I ran
<tt
>apt -t bullseye-backports install
68 aom-tools
</tt
> to fetch the backported version and re-encoded the
69 video using the latest version. This time the
'--row-mt=
1' option
70 worked, and the encoding was done in
46 seconds with a frame rate of
71 around
5.22 fps. This time it seem to be using all my four cores to
72 encode. Encoding speed is still too low for streaming and real time,
73 which would require frame rates above
25 fps, but might be good enough
74 for offline encoding.
</p
>
76 <p
>I am very happy to see AV1 playback working so well with the
77 default tools in Debian Stable. I hope the encoding situation improve
78 too, allowing even a slow old computer like my
10 year old laptop to
79 be used for encoding.
</p
>
81 <p
>As usual, if you use Bitcoin and want to show your support of my
82 activities, please send Bitcoin donations to my address
83 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>