最近 AV1 的支援度

HN 上「AV1 video codec gains broader hardware support (fullystacked.net)」這篇在說 AV1 的支援度變得更好了,原文不長,在「The AV1 video codec gains broader hardware support」這邊。

Can I Use 上的 AV1 video format 可以看的比較清楚:

不過在瀏覽器上離直接取代掉其他的 video codec 還早,但算是個起頭,至少 iPhone 15 Pro 與 iPhone 15 Pro Max 上的 Safari 支援了,接下來就是看桌機的 Edge 什麼時候才又想到要把 AV1 開回來:

Edge has stopped supporting AV1 completely at some point prior to version 116 (additional information required).

德國法院認為 DNT header 具有法律的告知效力

HN 上面看到「German court declares Do Not Track to be legally binding (vzbv.de)」這個消息,原文是德文:「Gericht untersagt Datenschutzverstöße von LinkedIn」,Google Translation 翻譯的結果:「Court bans LinkedIn data protection violations」。

LinkedIn 告知使用者他們不會理會 DNT,德國法院則是認為 DNT header 是已經告知對方不願意被追蹤了:

„Wenn Verbraucher:innen die ,Do-Not-Track‘-Funktion ihres Browsers aktivieren, ist das eine klare Botschaft: Sie wollen nicht, dass ihr Surfverhalten für Werbe- und andere Zwecke ausgespäht wird“, sagt Rosemarie Rodden, Rechtsreferenin beim vzbv. „Webseitenbetreiber müssen dieses Signal respektieren.“

“When consumers activate the 'Do Not Track' function of their browser, it sends a clear message: They do not want their surfing behavior to be spied on for advertising and other purposes,” says Rosemarie Rodden, legal officer at vzbv. “Website operators must respect this signal.”

這好像是第一次看到 DNT 相關的法律判決?可以看看後續有沒有新的消息 (上訴之類的),來看看最終的判決會是怎麼樣。

從 Google Groups 送出來的 spam 數量稍微下降...

先前在「Google Groups 的巨量 spam」這邊提到從 Google Groups 倒進 usenet 大量的 spam,最近看起來稍微緩解了一些。

這是 10/22 的量:

這是 10/29 的量:

可以看出來整體被 Perl filter 擋下來的量大幅降低了,在 comp.lang.c 也可以看出來 10/28 後似乎暫時停了...?

只能繼續觀察看看了...

擋 YouTube 短影音的設定

短影音類的影片因為沒有知識量 (沒有 reference 可以確認正確性),我完全不會看... 但 YouTube 上一般的影音我會翻,所以就會冒出這個需求了。

YouTube 的短影音有幾個地方會出現 (補充一下,我這邊是用英文版介面):

  • 首頁的左邊,會有一個 Shorts 的連結可以點進 Shorts 看。
  • 首頁的推薦裡面也會有 Shorts 的 section。

這兩個情況用這兩條擋:

www.youtube.com##a[title="Shorts"]
www.youtube.com##ytd-rich-section-renderer

這邊要注意的是,後者除了擋掉 Shorts 以外,還會擋掉各種 YouTube 的推銷 (像是電影之類的),這個也是我要擋的,所以我這邊直接用了 ytd-rich-section-renderer 這個元素來擋。

再來是各種穿插在頁面裡面的 Shorts 內容,像是首頁、訂閱頁與搜尋結果頁,這些就要找出對應的元素來擋:

www.youtube.com##ytd-reel-shelf-renderer
www.youtube.com##ytd-video-renderer:has(a[href*="/shorts/"])

另外一個跟短影音無關,但還是很影響專注度的是,YouTube 的搜尋結果會給你一堆很干擾結果的推薦,像是「People also watched」、「For you」、「Previously watched」以及「From related searches」,也可以設定擋掉:

www.youtube.com##:matches-path(/results) ytd-shelf-renderer[thumbnail-style]

目前用的差不多是這些...

最近 YouTube 在阻擋擋廣告軟體的事情

最近用 uBlock Origin 或是其他擋廣告軟體的都加減會遇到 YouTube 阻擋擋廣告軟體的事情,然後在 HN 上面看到「Youtube’s Anti-adblock and uBlock Origin」,對應的討論在「YouTube's Anti-Adblock and uBlock Origin (andadinosaur.com)」這邊。

先說一下目前的解法可以參考「YouTube Anti-Adblock and Ads - October 16, 2023 (Weekly Thread)」這篇說明,目前的建議就是每天睡醒後更新一下清單 (block list),讓清單是最新的。

這邊的清單不需要全部更新,只需要針對「uBlock filters – Quick fixes」這組就可以了,方法是點一下他的時鐘部分,然後再按上面的 Update Now 更新就可以了 (我是英文版介面,中文版的話應該是中文的...):

基本上就是個貓抓老鼠的過程,最近更新的會很頻繁。

另外一個最近開始用,也很推薦的套件「SponsorBlock for YouTube - Skip Sponsorships」,可以跳過業配片段。

Raspberry Pi 5 拿掉硬體的 H.264 encoding

HN 上看到「Raspberry Pi 5 has no hardware video encoding and only HEVC decoding (raspberrypi.com)」,原文指到 Gordon Hollingworth 的回覆這邊,可以看到這是上個月的消息了。

Raspberry Pi 一直都有硬體 H.264 encoding 的能力,不過這個在 Raspberry Pi 5 上被拿掉了,所以得用軟體壓。

官方有提到 Raspberry Pi 5 的 CPU 因為比之前快很多,單顆就有辦法做到 1080p60 (而 RPi5 有 4 CPU),所以除了 power consumption 以外應該不是大問題:

Obviously, the bad thing is the power consumption, but actually it only takes around 1 processor to encode 1080p60 with our default settings (which is still better quality than the PI 4 hardware encoder).

不過 HN 上猜是授權費用之類的問題,我在想是不是新的晶片組的 encoding license 都綁在一起,H.264 + H.265 得一包一起買,而 H.265 的授權費是眾所皆知的貴...

當 desktop 應該是還好,但就心裡有個底...

USB PD 的誘騙器

先在 HN 上看到「USB Power Delivery for Hobby Projects (flameeyes.blog)」這則,原文是「USB Power Delivery For Hobby Projects」,裡面提到了很多想要從 USB-PD 裡面取出電流的搞法,不過在 HN 的 id=38057797 裡面有提到這搞的有點複雜,可以直接買 USB-PD 的誘騙器輸出對應的電壓:

Most of the rest seems to be over-engineering. You can get a ready-made "PD Trigger" board for literally $1 [0], which will allow you to select the desired voltage using jumpers. It even has support for the non-standard (although still common) 12V profile. Or, if you really want to do it using software, grab a $6 one from Adafruit [1] which comes with a tutorial and Arduino library.

其中的 [0] 是「PD/QC/AFC fast charge decoy trigger support 5V 9V 12V 15V 20V fixed voltage output」這個,可以直接調整 switch S1 S2 S3 選擇輸出的電壓:

不過不知道遇到沒有支援的電壓輸出時會怎麼樣 (像是有些變壓器只支援 5V 與 9V),我猜就是輸出 5V 而且不足電流,然後導致後面的設備不會動?另外比較大的問題就是不知道最大的電流與保護 XDDD

而 [1] 則是「Adafruit USB Type C Power Delivery Dummy Breakout - I2C or Fixed - HUSB238」,除了可以自己改線路設定電壓與最大電流外 (看起來直接一坨錫連過去,或是劃開預設的 5V 1A 的設定導線),也可以用 I²C 動態設定 decoy trigger:

這個看起來至少有個上限擋著?

X (Twitter) 的工程團隊列出了最近做的事情

Hacker News 上看到的討論,在 Elon Musk 接手後的 X (Twitter),工程團隊做了什麼事情:「X Engineering Year Retrospective (twitter.com/xeng)」,原推在:

其中裡面有些蠻有趣的,出現了一些平常不太會出現的數字資訊。

我比較有興趣的關掉了加州 Sacramento DC 的這個部分,而光是這個 DC 就有 148k 台 server (是 server,不是 VM 或是 container),而且也提到電力少了 48MW,看起來是把這些 server 廢掉,而不是轉到其他機房?

- Shutdown the Sacramento data center and re-provisioned the 5,200 racks and 148,000 servers, which generated more than $100M in annual savings. In total, we freed up 48 MW of capacity and tore down 60k lbs. of network ladder rack before re-provisioning it to other data centers.

話說一個 Twitter 機房用 48MW... 查了一下台電網站,核三的一個機組的供電量也才 951MW:

而且 Twitter 服務要用到 148k server,hmmm...

Google SRE 團隊整理出過去二十年的十一條心得

Google 的 SRE 團隊整理出過去二十年的心得,當看故事的心態在看的:「Lessons Learned from Twenty Years of Site Reliability Engineering」,在 Hacker News 上也有討論:「Lessons Learned from Twenty Years of Site Reliability Engineering (sre.google)」。

裡面的項目大多都會在公司成長時不斷的導入,都是夠大就會遇到的。

比較有趣的是第六條,這是唯一一條全部都用大寫字母列出來的:

COMMUNICATION CHANNELS! AND BACKUP CHANNELS!! AND BACKUPS FOR THOSE BACKUP CHANNELS!!!

到 Google 這個規模的架構,這邊就會規劃找完全獨立於 Google 架構的方案來用;我猜應該是傳統的 colocation 機房 (像是 AT&T 之類的),上面跑 IRC server 之類的?

在 Hacker News 上面也有其他人提到 Netflix 也有類似的規劃,需要有一個備援的管道是完全獨立於 AWS 的;另外同一則 comment 裡也有提到 Reddit 的作法是在辦公室裡面放 IRC server 備援:

Yes! At Netflix, when we picked vendors for systems that we used during an outage, we always had to make sure they were not on AWS. At reddit we had a server in the office with a backup IRC server in case the main one we used was unavailable.

IRC 還是很好用的 XD

ACM 宣佈停止發行紙本 (Journal 與 Transaction)

Hacker News 上看到 ACM 宣佈停止發行紙本:「Ceasing print publication of ACM journals and transactions (acm.org)」,原公告在「Ceasing Print Publication of ACM Journals and Transactions」。

從 2024 年一月開始停止紙本版本的發行,除了列出來的例外:

ACM has made the decision to cease print publication for ACM’s journals and transactions as of January 2024. The magazines Communications of the ACM, ACM InRoads, interactions, and XRDS: Crossroads will continue in print.

一方面降低成本,而替代方案就是有需要的人可以自己印,挑自己習慣的方式閱讀...