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>http://www.hungry.com/~pere/blog/
</link>
10 <title>geteltorito make CD firmware upgrades a breeze
</title>
11 <link>http://www.hungry.com/~pere/blog/geteltorito_make_CD_firmware_upgrades_a_breeze.html
</link>
12 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/geteltorito_make_CD_firmware_upgrades_a_breeze.html
</guid>
13 <pubDate>Wed,
20 Apr
2022 11:
50:
00 +
0200</pubDate>
14 <description><p
>Recently I wanted to upgrade the firmware of my thinkpad, and
15 located the firmware download page from Lenovo (which annoyingly do
16 not allow access via Tor, forcing me to hand them more personal
17 information that I would like). The
18 <a href=
"https://support.lenovo.com/no/en/search?query=thinkpad firmware bios upgrade iso
&SearchType=Customer search
&searchLocation=Masthead
">download
19 from Lenovo
</a
> is a bootable ISO image, which is a bit of a problem
20 when all I got available is a USB memory stick. I tried booting the
21 ISO as a USB stick, but this did not work. But genisoimage came to
24 <P
>The geteltorito program in
25 <a href=
"http://tracker.debian.org/cdrkit
">the genisoimage binary
26 package
</a
> is able to convert the bootable ISO image to a bootable
27 USB stick using a simple command line recipe, which I then can write
28 to the most recently inserted USB stick:
</p
>
30 <blockquote
><pre
>
31 geteltorito -o usbstick.img lenovo-firmware.iso
32 sudo dd bs=
10M if=usbstick.img of=$(ls -tr /dev/sd?|tail -
1)
33 </pre
></blockquote
>
35 <p
>This USB stick booted the firmware upgrader just fine, and in a few
36 minutes my machine had the latest and greatest BIOS firmware in place.
</p
>
41 <title>Playing and encoding AV1 in Debian Bullseye
</title>
42 <link>http://www.hungry.com/~pere/blog/Playing_and_encoding_AV1_in_Debian_Bullseye.html
</link>
43 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Playing_and_encoding_AV1_in_Debian_Bullseye.html
</guid>
44 <pubDate>Sat,
16 Apr
2022 08:
40:
00 +
0200</pubDate>
45 <description><p
>Inspired by the recent news of
46 <a href=
"https://slashdot.org/story/
22/
04/
03/
2039219/intel-beats-amd-and-nvidia-with-arc-gpus-full-av1-support
">AV1
47 hardware encoding support from Intel
</a
>, I decided to look into
48 the state of AV1 on Linux today. AV1 is a
49 <a href=
"https://web.archive.org/web/
20160618103850/http://www.digistan.org/open-standard:definition
">free
50 and open standard
</a
> as defined by Digistan without any royalty
51 payment requirement, unlike its much used competitor encoding
52 H
.264. While looking, I came across an
5 year
53 <a href=
"https://askubuntu.com/questions/
1061908/how-to-encode-and-playback-video-with-the-av1-codec-on-bionic-beaver-
18-
04">old
54 question on askubuntu.com
</a
> which in turn inspired me to check out
55 how things are in Debian Stable regarding AV1. The test file listed
56 in the question (askubuntu_test_aom.mp4) did not exist any more, so I
57 tracked down a different set of test files on
58 <a href=
"https://av1.webmfiles.org/
">av1.webmfiles.org
</a
> to test them
59 with the various video tools I had installed on my machine. I was
60 happy to discover that AV1 decoding and playback worked with almost
63 <table align=
"center
">
64 <tr
><td
>mediainfo
</td
> <td
>ok
</td
></tr
>
65 <tr
><td
>dragonplayer
</td
> <td
>ok
</td
></tr
>
66 <tr
><td
>ffmpeg / ffplay
</td
> <td
>ok
</td
></tr
>
67 <tr
><td
>gnome-mplayer
</td
> <td
>fail
</td
></tr
>
68 <tr
><td
>mplayer
</td
> <td
>ok
</td
></tr
>
69 <tr
><td
>mpv
</td
> <td
>ok
</td
></tr
>
70 <tr
><td
>parole
</td
> <td
>ok
</td
></tr
>
71 <tr
><td
>vlc
</td
> <td
>ok
</td
></tr
>
72 <tr
><td
>firefox
</td
> <td
>ok
</td
></tr
>
73 <tr
><td
>chromium
</td
> <td
>ok
</td
></tr
>
76 <p
>AV1 encoding is available in Debian Stable from the aom-tools
77 version
1.0.0.errata1-
3 package, using the aomenc tool. The encoding
78 using the package in Debian Stable is quite slow, with the frame rate
79 for my
10 second test video at around
0.25 fps. My
10 second video
80 test took
16 minutes and
11 seconds on my test machine.
</p
>
82 <p
>I tested by first running ffmpeg and then aomenc using the recipe
83 provided by the askubuntu recipe above. I had to remove the
84 '--row-mt=
1' option, as it was not supported in my
1.0.0 version. The
85 encoding only used a single thread, according to
<tt
>top
</tt
>.
</p
>
87 <blockquote
><pre
>
88 ffmpeg -i some-old-video.ogv -t
10 -pix_fmt yuv420p video.y4m
89 aomenc --fps=
24/
1 -u
0 --codec=av1 --target-bitrate=
1000 \
90 --lag-in-frames=
25 --auto-alt-ref=
1 -t
24 --cpu-used=
8 \
91 --tile-columns=
2 --tile-rows=
2 -o output.webm video.y4m
92 </pre
></blockquote
>
94 <p
>As version
1.0.0 currently have several
95 <a href=
"https://security-tracker.debian.org/tracker/source-package/aom
">unsolved
96 security issues in Debian Stable
</a
>, and to see if the recent
97 backport
<a href=
"https://tracker.debian.org/pkg/aom
">provided in
98 Debian
</a
> is any quicker, I ran
<tt
>apt -t bullseye-backports install
99 aom-tools
</tt
> to fetch the backported version and re-encoded the
100 video using the latest version. This time the
'--row-mt=
1' option
101 worked, and the encoding was done in
46 seconds with a frame rate of
102 around
5.22 fps. This time it seem to be using all my four cores to
103 encode. Encoding speed is still too low for streaming and real time,
104 which would require frame rates above
25 fps, but might be good enough
105 for offline encoding.
</p
>
107 <p
>I am very happy to see AV1 playback working so well with the
108 default tools in Debian Stable. I hope the encoding situation improve
109 too, allowing even a slow old computer like my
10 year old laptop to
110 be used for encoding.
</p
>
112 <p
>As usual, if you use Bitcoin and want to show your support of my
113 activities, please send Bitcoin donations to my address
114 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>