tmux Sixel でリモート画像を表示して遊ぶ

ターミナルマルチプレクサのtmux がSixel に対応し,グラフィックが使えるようになりました.これで少し遊んでみました.

tmux sixel live rain sayaka

ターミナルマルチプレクサでSixel が使えるようになったということで,リモートの端末でグラフックを扱い,それを必要な時だけ閲覧といったことが可能となります.
例えばライブカメラの映像の最新を取得して表示,

10分+動作時間毎にYoutubeLiveの最新1コマをダウンロードしてpng画像に変換,Sixel で表示し続ける.(画像左)
$ while true; do ffmpeg -i "$(yt-dlp --quiet -f 'bestvideo[height<=640]' -g IWPSU_aXdIE | head -n 1 )" -loglevel -8 -vframes 1 -c:v png -f image2 - | img2sixel ;sleep 60; done

雨雲レーダーの情報をウェブブラウザで取得して表示,

10分+動作時間毎に国土交通省 川の防災情報ページのスクリーンショットを取得して表示(右上)
$ while true; do chromium --headless --hide-scrollbars --window-size=800,500 --screenshot=/tmp/screenshot-rain.png  'https://www.river.go.jp/kawabou/mb?zm=11&fld=0&clat=31.24891059083941&clon=130.67756652832034&mapType=0&viewGrpStg=0&viewRd=1&viewRW=1&viewRiver=1&viewPoint=1&knd=rn' 2>/dev/null ;img2sixel /tmp/screenshot-rain.png ;sleep 600; done
Misskey のローカルタイムラインを表示(右下)
while true; do sayaka --local misskey.io ;sleep 5; done

しかし,RAMの少ないVPS で調子に乗って色々動かして遊んでいたらメモリ不足になりMariaDB を落としてしまいました.リソースと相談しながら遊びましょう…….

server環境
$ tmux -V
tmux next-3.4
$ git -C ~/src/tmux/ log -1 | grep -e ^commit -e ^Date:
commit 381c00a74ea1eb136a97c86da9a7713190b10a62
Date:   Thu Nov 2 22:58:45 2023 +0000
$ sayaka --version
sayaka version 3.7.2 (2023/10/19)
$ dpkg-query -W yt-dlp ffmpeg libsixel-bin ffmpeg chromium
chromium        116.0.5845.180-1~deb12u1
ffmpeg  7:5.1.3-1
libsixel-bin    1.10.3-3
yt-dlp  2023.03.04-1
$ lsb_release -dr
No LSB modules are available.
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
$ arch
x86_64
client環境
$ dpkg-query -W mlterm
mlterm  3.9.3-1
$ lsb_release -dr
No LSB modules are available.
Description:    Debian GNU/Linux trixie/sid
Release:        n/a
$ arch
x86_64

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)