头像
KazamaSion
帖子: 29
注册时间: 2016-08-22 6:36

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

[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的结果也是相同的。
NAVras
帖子: 141
注册时间: 2016-04-24 1:32

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

“601”,少了引号,另外matrix=1是指定输出的
netsky123
帖子: 53
注册时间: 2015-01-26 14:18

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

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)
头像
KazamaSion
帖子: 29
注册时间: 2016-08-22 6:36

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

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".
头像
KazamaSion
帖子: 29
注册时间: 2016-08-22 6:36

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

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中找到相关文本。
wzwenyuyu
帖子: 12
注册时间: 2016-01-03 1:50

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

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}
NAVras
帖子: 141
注册时间: 2016-04-24 1:32

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

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}
► 显示剧情透露
上次由 NAVras 在 2016-10-21 14:33,总共编辑 1 次。
头像
KazamaSion
帖子: 29
注册时间: 2016-08-22 6:36

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

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
fch1993
帖子: 213
注册时间: 2012-06-12 11:56

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

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")
wzwenyuyu
帖子: 12
注册时间: 2016-01-03 1:50

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

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

回到 “VapourSynth”