分页: 1 / 2

在Spline36中指定matrix_s = "709"时报错

发表于 : 2016-08-22 6:45
KazamaSion
[Codebox=源代码]……
clip = core.lsmas.LWLibavSource(**********)
clip = core.resize.Spline36(clip, width = goal_width, height = goal_height, format=vs.YUV420P8, matrix_in = 601, matrix_s = "709")
clip.set_output()
[/Codebox]

已知在去掉matrix_s参数的时候脚本可以成功执行,但是一旦加上后就会报错:
Error getting the frame number 32544:
Resize error 2049: unrecognized matrix coefficients

注:当尝试拖动预览框的进度条时,会发现拖不动,并且弹出新报错:
Error getting the frame number 27850:
Resize error 2049: unrecognized matrix coefficients
Error getting the frame number 34033:
Resize error 2049: unrecognized matrix coefficients
Error getting the frame number 30874:
Resize error 2049: unrecognized matrix coefficients
(也就是说无论尝试跳转到哪一帧都会弹出类似的错误提示)

源视频应该没有任何问题,这里我不明白为什么报错?应该如何解决这个问题?

注:尝试matrix=1的结果也是相同的。

Re: 在Spline36中指定matrix_s = "709"时报错

发表于 : 2016-08-22 9:16
NAVras
“601”,少了引号,另外matrix=1是指定输出的

Re: 在Spline36中指定matrix_s = "709"时报错

发表于 : 2016-08-22 11:32
netsky123
matrix:
0 - rgb
1 - 709
2 - unspec
6 - smpte170m
8 - YCgCo
9 - bt2020nc
10 - bt2020c
clip = core.resize.Spline36(clip,w,h,matrix_in=6,matrix=1)

Re: 在Spline36中指定matrix_s = "709"时报错

发表于 : 2016-08-22 18:24
KazamaSion
NAVras 写了:“601”,少了引号,另外matrix=1是指定输出的
并不是我不想加引号,而是加了引号后报错。
[Codebox=]Python exception: Spline36: argument matrix_in was passed an unsupported type (expected int compatible type but got str)[/Codebox]
以及官方的说明,如果想输出BT709,以下2种方法都可行:
For example, a destination matrix of BT 709 can be specified either with matrix=1 or with matrix_s="709".

Re: 在Spline36中指定matrix_s = "709"时报错

发表于 : 2016-08-22 18:33
KazamaSion
netsky123 写了:matrix:
0 - rgb
1 - 709
2 - unspec
6 - smpte170m
8 - YCgCo
9 - bt2020nc
10 - bt2020c
clip = core.resize.Spline36(clip,w,h,matrix_in=6,matrix=1)
谢谢,这样做确实可行了。
我想问一下有关matrix的说明在哪里可以找到?我并不能从vs的doc中找到相关文本。

Re: 在Spline36中指定matrix_s = "709"时报错

发表于 : 2016-08-22 23:33
wzwenyuyu
KazamaSion 写了:
netsky123 写了:matrix:
0 - rgb
1 - 709
2 - unspec
6 - smpte170m
8 - YCgCo
9 - bt2020nc
10 - bt2020c
clip = core.resize.Spline36(clip,w,h,matrix_in=6,matrix=1)
谢谢,这样做确实可行了。
我想问一下有关matrix的说明在哪里可以找到?我并不能从vs的doc中找到相关文本。
http://www.vapoursynth.com/doc/functions/resize.html
这是什么? {:cat_18}

Re: 在Spline36中指定matrix_s = "709"时报错

发表于 : 2016-08-23 12:33
NAVras
KazamaSion 写了:Python exception: Spline36: argument matrix_in was passed an unsupported type (expected int compatible type but got str)
如果想输出BT709,以下2种方法都可行:
For example, a destination matrix of BT 709 can be specified either with matrix=1 or with matrix_s="709".
报错说不接受字符串只接收整数 {:cat_10} ,但matrix_s="709"又是这样用的(难道是作者改了用法matrix_s=709)
{:cat_11} 于是保险的方法还是同楼上使用数字代替,6是601(记得貌似ntsc和pal同matrix,primaries不同),1是709
以前在某条回复里贴过matrix对应数字,不记得丢到哪去了 {:cat_12}
► 显示剧情透露

Re: 在Spline36中指定matrix_s = "709"时报错

发表于 : 2016-08-29 20:30
KazamaSion
wzwenyuyu 写了:
KazamaSion 写了:
netsky123 写了:matrix:
0 - rgb
1 - 709
2 - unspec
6 - smpte170m
8 - YCgCo
9 - bt2020nc
10 - bt2020c
clip = core.resize.Spline36(clip,w,h,matrix_in=6,matrix=1)
谢谢,这样做确实可行了。
我想问一下有关matrix的说明在哪里可以找到?我并不能从vs的doc中找到相关文本。
http://www.vapoursynth.com/doc/functions/resize.html
这是什么? {:cat_18}
然而这篇文章中并没有指定每个数字对应哪个matrix

Re: 在Spline36中指定matrix_s = "709"时报错

发表于 : 2016-08-30 21:07
fch1993
KazamaSion 写了:[Codebox=源代码]……
clip = core.lsmas.LWLibavSource(**********)
clip = core.resize.Spline36(clip, width = goal_width, height = goal_height, format=vs.YUV420P8, matrix_in = 601, matrix_s = "709")
clip.set_output()
[/Codebox]

已知在去掉matrix_s参数的时候脚本可以成功执行,但是一旦加上后就会报错:
Error getting the frame number 32544:
Resize error 2049: unrecognized matrix coefficients

注:当尝试拖动预览框的进度条时,会发现拖不动,并且弹出新报错:
Error getting the frame number 27850:
Resize error 2049: unrecognized matrix coefficients
Error getting the frame number 34033:
Resize error 2049: unrecognized matrix coefficients
Error getting the frame number 30874:
Resize error 2049: unrecognized matrix coefficients
(也就是说无论尝试跳转到哪一帧都会弹出类似的错误提示)

源视频应该没有任何问题,这里我不明白为什么报错?应该如何解决这个问题?

注:尝试matrix=1的结果也是相同的。
你写错了,对于输入的视频的matrix要用matrix_in_s

举例:1080p 709转480p 601。

clip = core.resize.Bicubic(clip, width=720, height=480, format=vs.YUV420P16, matrix_in_s="709",matrix_s="170m")

Re: 在Spline36中指定matrix_s = "709"时报错

发表于 : 2016-09-01 22:46
wzwenyuyu
KazamaSion 写了:
wzwenyuyu 写了:
KazamaSion 写了:
谢谢,这样做确实可行了。
我想问一下有关matrix的说明在哪里可以找到?我并不能从vs的doc中找到相关文本。
http://www.vapoursynth.com/doc/functions/resize.html
这是什么? {:cat_18}
然而这篇文章中并没有指定每个数字对应哪个matrix
按顺序从0开始