Avisynth 处理奇偶对帧

发布于 2024-09-16 10:04:51 字数 277 浏览 8 评论 0原文

我需要用 avisynth 读取成对的帧并处理它们。

eg
frame1 + frame2 => result1    
frame2 + frame3 => result2
frame3 + frame4 => result3

我知道 selecteven() 和 selectodd() 命令,但它们给我frame1和2,然后是frame3和4。
无法执行“if()”来确定我正在进行哪一步或推回抓取的框架。

知道如何实现吗?

I need to read pairs of frames with avisynth and process them.

eg
frame1 + frame2 => result1    
frame2 + frame3 => result2
frame3 + frame4 => result3

I know the selecteven() and selectodd() commands but they give me frame1 and 2 then frame3 and 4.
There is no way of doing an "if()" to work out which step I'm on or pushing back a grabbed frame.

Any idea how to implement this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓝眸 2024-09-23 10:04:51
//assuming video is the input

even = SelectEven(video)     
odd = SelectOdd(video)    

// should produce 0,1 1,2 2,3 ....
// seems bad to have to split into odd and even then interleave them back together 
//  but Select only works with interleaved sources

interleave(even,odd)    
SelectEvery(2,0,-1,0,1)    
trim(2,0)    

right = SelectEven()   
left = SelectOdd()   

将给出 0,1 1,2 2,3 3,4 4,5 5,6 等

avisynth 中的 ps 注释不是 // 但它破坏了 SO 格式。
pps 不知道为什么它的语法会突出显示某些位,也不知道它是如何猜测哪种语言的。

//assuming video is the input

even = SelectEven(video)     
odd = SelectOdd(video)    

// should produce 0,1 1,2 2,3 ....
// seems bad to have to split into odd and even then interleave them back together 
//  but Select only works with interleaved sources

interleave(even,odd)    
SelectEvery(2,0,-1,0,1)    
trim(2,0)    

right = SelectEven()   
left = SelectOdd()   

will give 0,1 1,2 2,3 3,4 4,5 5,6 etc

ps comments in avisynth are # not // but it breaks the SO formatting.
pps don't know why it is syntax highlighting some bits or how it has guessed which language.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文