圧縮済みの2つの動画を比較してSSIMULACRA2(ssimu2)、Butteraugli(butter)のスコアを調べる。ハードウェア支援にNVIDIAと、AMDが使えるのでCPUを使ったvmafスコアよりも桁違いに速度が出る。
新しい映像の品質評価 libvmaf
Line-fr/Vship: A high-performance CLI or VapourSynth plugin for GPU-accelerated visual fidelity metrics, focusing on SSIMULACRA2 & Butteraugli.
適宜GPU環境に合わせてFFVship_nvidia.zip、FFVship_amd.zipを展開し、vship_nvidia.dll、vship_amd.dllを同じフォルダ内に置く。
基本コマンド
SSIMULACRA2を計算する。jsonファイルが不要ならjsonはつけなくてもよい。
FFVship --source orig.mp4 --encoded enc.mp4 --json output.json
Butteraugliを計算する。
FFVship --source orig.mp4 --encoded enc.mp4 --json output.json -m Butteraugli
オプション
- -h, –help:ヘルプの表示
- –source, -s:参照映像の指定
- –encoded, -e:参照映像を元にスコアを調べる映像の指定
- –metric, -m:使うメトリクスの指定。[SSIMULACRA2, Butteraugli]
- –json:出力するjsonの指定。無指定なら出力しない
- –start:開始フレームの指定。無指定は0
- –end:出力するフレーム数の指定。無指定は最後まで
- –encoded-offset:encodedのオフセットフレーム数の指定。指定フレーム数だけずれるので開始位置が異なるときに指定する
- –every:間引くフレーム間隔の指定
- –intensity-target:Butteraugliの目標nitの指定
- –threads, -t:デコードプロセス数の指定。推奨値は2
- –gpu-threads, -g:GPUスレッド数の指定。推奨値は3
- –gpu-id:GPUインデックスの指定。複数GPUがあるときに指定
- –list-gpu:GPUインデックスの表示
数値の評価
SSIMULACRA2の数値は以下より。平均して80程度あるとサイズとの画質のバランスがよさそう。アーカイブ目的になると平均85以上は欲しいかも。
cloudinary/ssimulacra2: SSIMULACRA 2. Perceptual metric.
- negative scores: extremely low quality, very strong distortion.
- 10 = very low quality. MOS score close to 1 (‘bad’) in a BT.500 ACR test. Very obvious and annoying artifacts. This corresponds to the typical output of cjxl -d 14 / -q 12 or libjpeg-turbo 4:2:0 quality 14.
- 30 = low quality. MOS score around 2 (‘poor’) in a BT.500 ACR test. Obvious and annoying artifacts. This corresponds to the typical output of cjxl -d 9 / -q 20 or libjpeg-turbo 4:2:0 quality 20.
- 50 = medium quality. MOS score around 3 (‘fair’) in a BT.500 ACR test. Slightly annoying artifacts. This corresponds to the typical output of cjxl -d 5 / -q 45 or libjpeg-turbo 4:2:0 quality 35.
- 70 = high quality. MOS score around 4 (‘good’) in a BT.500 ACR test. Artifacts are perceptible, but not annoying. Distortion barely noticeable by an average observer in a side-by-side comparison at 1:1 from a normal viewing distance. Without reference to the original image, an average observer does not notice artifacts. This corresponds to the typical output of cjxl -d 2.5 / -q 73 or libjpeg-turbo 4:2:0 quality 70.
- 80 = very high quality. Distortion not noticeable by an average observer in a side-by-side comparison at 1:1 from a normal viewing distance. This corresponds to the typical output of cjxl -d 1.5 / -q 85 or libjpeg-turbo 4:2:2 quality 85.
- 85 = excellent quality. Distortion not noticeable by an average observer in the condition of in-place comparison at 1:1 from a normal viewing distance. This corresponds to the typical output of cjxl -d 1 / -q 90 or libjpeg-turbo 4:4:4 quality 90.
- 90 = visually lossless. Distortion not noticeable by an average observer in a flicker test at 1:1 from a normal viewing distance. This corresponds to the typical output of cjxl -d 0.5 / -q 95 or libjpeg-turbo 4:4:4 quality 95.
- 100 = mathematically lossless.
Butteraugliは0に近いほどきれいなのはわかったが、FFVshipのログの見方がよくわからなかったのでCopilotで調べた。
スコア範囲 | 品質の目安 |
0.0 ~ 1.0 | 非常に高品質。人間にはほぼ違いが分からない。 |
1.0 ~ 2.0 | 高品質。違いはほとんど気にならない。 |
2.0 ~ 3.0 | 中品質。違いが少し気になる可能性あり。 |
3.0 ~ 5.0 | 低品質。違いが明確に分かる。 |
5.0 以上 | 非常に低品質。視覚的に大きな違いがある。 |
Norm | 特徴 | 向いている用途 |
2Norm | 全体的な平均的違いを捉える | 一般的な品質評価 |
3Norm | 中間的な感度 | バランスの取れた評価 |
INFNorm | 最大の違いに敏感 | 局所的な劣化やアーティファクトの検出 |
- 2Norm(L2ノルム)
- 定義:差異の二乗和の平方根(ユークリッド距離)
- 特徴:全体的な違いを平均的に捉える。小さな違いが多数ある場合に敏感。
- 用途:一般的な品質評価に適している。
- 3Norm(L3ノルム)
- 定義:差異の三乗和の立方根
- 特徴:2Normよりも大きな違いに対して少し敏感。中間的なバランス。
- 用途:2NormとINFNormの中間的な評価をしたい場合に使う。
- INFNorm(MaxNorm)
- 定義:最大差異(画像内で最も大きな違い)
- 特徴:最も目立つ違いに敏感。局所的な劣化がある場合に強く反応。
- 用途:視覚的に最も気になる部分を評価したいときに有効。