summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--mkvlib/c/README.md6
-rw-r--r--mkvlib/c/exports.go10
3 files changed, 22 insertions, 0 deletions
diff --git a/README.md b/README.md
index 2b9e1c0..9e05828 100644
--- a/README.md
+++ b/README.md
@@ -63,6 +63,7 @@ ASS字幕字体子集化 MKV批量提取/生成
- 2022.03新增的ASS转PGS说明
```shell
mkvtool -a2p -apc -pr 1080 -pf 23 ...xxx...
+
#-a2p: 启用ass转pgs(win64专属功能且依赖spp2pgs)
#-apc: 使pgs字幕与子集化后的ass字幕共存(该选项会影响混流行为)
#-pr: 设置psg字幕的分辨率(有"480,576,720,1080,2160"可选)
@@ -72,6 +73,7 @@ ASS字幕字体子集化 MKV批量提取/生成
- 标准工作流
```shell
mkvtool -s bangumi
+
#从${bangumi}文件夹抽取所有mkv文件的字幕和字体,
#遇到ass字幕就自动进行子集化,
#输出替换字幕和字体后的新mkv文件.
@@ -166,6 +168,10 @@ ASS字幕字体子集化 MKV批量提取/生成
#*当"-ans"参数存在时输出文件夹为"${output}",否则为${output}/subsetted".
#*由于会预先清空${output}文件夹,为了安全请慎用"-ans".
```
+- 取得一个目录里所有ass字幕文件所需要的全部字体
+ ```shell
+ mkvtool -l -s input #{input}获取
+ ```
### 一些碎碎念
diff --git a/mkvlib/c/README.md b/mkvlib/c/README.md
index 7295b5c..3d9a00b 100644
--- a/mkvlib/c/README.md
+++ b/mkvlib/c/README.md
@@ -115,4 +115,10 @@
//output: 成品输出文件夹路径
//dirSafe: 是否把成品输出到"${output}/subsetted"文件夹里(为了安全建议设置为true)
//return: 是否全程无错
+ ```
+ - ```c
+ char* CreateMKVs(char* dir, logCallback lcb);
+ //取得指定目录内所有字幕需要的全部字体
+ //dir: 字幕文件所在的目录
+ //return: json格式的数组
``` \ No newline at end of file
diff --git a/mkvlib/c/exports.go b/mkvlib/c/exports.go
index 2ad4471..c79431e 100644
--- a/mkvlib/c/exports.go
+++ b/mkvlib/c/exports.go
@@ -131,6 +131,16 @@ func A2P(a2p, apc bool, pr, pf int) {
getter.GetProcessorInstance().A2P(a2p, apc, pr, pf)
}
+//export GetFontsList
+func GetFontsList(dir *C.char, lcb C.logCallback) *C.char {
+ if !checkInstance() {
+ return cs("")
+ }
+ list := getter.GetProcessorInstance().GetFontsList(gs(dir), _lcb(lcb))
+ data, _ := json.Marshal(list)
+ return cs(string(data))
+}
+
func cs(gs string) *C.char {
return C.CString(gs)
}