2 个版本
0.1.3 | 2022年11月26日 |
---|---|
0.1.2 | 2022年11月26日 |
#686 在 图像
21KB
294 代码行
另一个 ssimulacra2 命令行界面
我无法停止添加功能的 ssimulacra2_bin 的分支。 哎呀
如果您需要基于 ffmpeg 的完整视频支持,请查看他们的版本。我的版本基于文件夹中的图像和完整的 Windows 兼容性。
SSIMULACRA2 的 Rust 实现的 CLI:https://github.com/rust-av/ssimulacra2
下载
从这里获取发行版本 这里
从 构建操作 获取等效的夜间构建版本
安装
Cargo Crates.io
cargo install as2c
Cargo Git
cargo install as2c --git https://github.com/BuyMyMojo/another_ssimulacra2_cli
然后您可以从终端运行 as2c
。
用法
Another ssimulacra2 cli
Usage: as2c[.exe] [OPTIONS] <SOURCE> <DISTORTED> [OUT]
Arguments:
<SOURCE> Original unmodified image
<DISTORTED> Distorted image
[OUT] Output folder or `.csv` file. Requires --folders
Options:
-t, --threads <THREADS>
Choose how many cpu threads to use. defaults to your core count!
-f, --folders
If input paths are folders, process all images in the folders. This assumes the files are named the same in both folders.
--colour-space <COLOUR_SPACE>
https://docs.rs/av-data/0.4.1/av_data/pixel/enum.ColorPrimaries.html for more info [default: bt709] [possible values: reserved0, bt709, unspecified, reserved, bt470m, bt470bg, st170m, st240m, film, bt2020, st428, p3dci, p3-display, tech3213]
--colour-transfer <COLOUR_TRANSFER>
https://docs.rs/av-data/0.4.1/av_data/pixel/enum.TransferCharacteristic.html for more info [default: srgb] [possible values: reserved0, bt1886, unspecified, reserved, bt470m, bt470bg, st170m, st240m, linear, logarithmic100, logarithmic316, xvycc, bt1361e, srgb, bt2020-ten, bt2020-twelve, perceptual-quantizer, st428, hybrid-log-gamma]
-h, --help
Print help information
-V, --version
Print version information
示例
比较单个图像/帧
as2c[.exe] ./source.png ./compressed.png
81.62440732
比较两个帧文件夹
as2c[.exe] -f ./source/ ./compressed/
Min: 44.74846668101959
Max: 57.51044138134341
Mean: 51.218276319631876
比较两个帧文件夹并输出带有每个帧结果的 CSV 文件
as2c[.exe] -f ./source/ ./compressed/ ./out.csv
或者只是
as2c[.exe] -f ./source/ ./compressed/ ./
示例 csv 表格
帧 | ssimulacra2 |
---|---|
0 | 49.924279448275605 |
1 | 53.36855269651266 |
2 | 56.70124266359252 |
3 | 54.235634583548276 |
4 | 56.10589175633655 |
颜色格式
支持 ColorPrimaries(--colour-space
)
Reserved0
BT709
Unspecified
Reserved
BT470M
BT470BG
ST170M
ST240M
Film
BT2020
ST428
P3DCI
P3Display
Tech3213
支持 TransferCharacteristic(--colour-transfer
)
Reserved0
BT1886
Unspecified
Reserved
BT470M
BT470BG
ST170M
ST240M
Linear
Logarithmic100
Logarithmic316
XVYCC
BT1361E
SRGB
BT2020Ten
BT2020Twelve
PerceptualQuantizer
ST428
HybridLogGamma
内存使用
在我的 5600x 上,当比较两个 1440p PNG 文件文件夹时,它可以使用 3-4GB 的 RAM,因为它基本上在内存中有 12 对原始 1440p 图像。
如果内存不足,请使用 --threads
降低使用的线程数。
依赖项
~22–30MB
~291K SLoC