| Printable Version of Topic
Click here to view this topic in its original format |
| Unofficial VirtualDub Support Forums > Newbie Questions > [speeding Up Video] Error Avysinth Code |
| Posted by: tigretones Feb 19 2014, 07:55 PM | ||
| Hi everybody, I'm trying to speed up just some parts of a video, and I found great help in http://forums.virtualdub.org/index.php?act=ST&f=4&t=21806&st=0 in the forum. But unfortunately I can't get my code to work, VirtualDub always shows me the same warning message: AvySinth open failure: Evaluate: operands of '+' must both be numbers, strings or clips (C:\Documents and Settings\Pc1\Escritorio\Tapon14-02-17\Nuevo Avysinth Script.avs, line 11) The code is:
As you can see, I'm trying to speed up the video from the beggining to frame 26464, then return to normal speed until frame 26883, and finally speed up again the video until the end. Any ideas about what am I doing wrong? Thanks in advance. |
| Posted by: dloneranger Feb 19 2014, 08:05 PM |
| the function doesn't return anything add return newvid at the end ....then you'll get a framerates don't match error instead |
| Posted by: malky Feb 19 2014, 10:42 PM |
| newVid = AssumeFPS(c, oldRate * factor) return AudioDub(ChangeFPS(newVid, c, linear=false),c.TimeStretch(tempo=100*factor)) } I inserted the "return Audiodub" line. The 'linear=false' is required when the float factor is more than 10;your scripts shows a factor of 50. |
| Posted by: tigretones Feb 20 2014, 10:37 AM | ||
| Thank you very much for your answers guys, I really appreciate your help. @Malky: the video has no audio. If I include the "return Audiodub" line in the code, VirtualDub returns me the following error message: Avysinth open failure: AudioDub: need an audio and a video track So I decided to delete that line, now I see that was a bit radical, the function needs an end. @Dlonerange: I've just added the end of function you suggest, and it works... partially, because now I get a new error message: Avysinth open failure: Splice: video framerate doesn't match (C:\Documents and Settings\Pc1\Escritorio\Tapon14-02-17\Nuevo Avysinth Script.avs, line 11) At this point, the code is
Anyone knows where's the new mistake? |
| Posted by: dloneranger Feb 20 2014, 12:55 PM |
| It's not a mistake, just a limit on joining video together Avisynth will only join them if they're the same size and fps You should be able to just remove the audiodub from malky's suggestion (I don't have avisynth here atm so can't check) newVid = AssumeFPS(c, oldRate * factor) return ChangeFPS(newVid, c, linear=false) } |
| Posted by: raffriff42 Feb 20 2014, 01:29 PM | ||
| Sorry, that code was written in a hurry, and not tested at the extremes. Thanks for the input. Here's a new, improved function that blends frames when possible. It handles video-only clips and any reasonable conversion factor: EDIT: additional debugging; pitch correction now optional; added frame blending in fast forward.
|
| Posted by: tigretones Feb 20 2014, 07:52 PM | ||
| @Dloneranger: It worked! I added those new lines and the video loaded in VirtualDub, with no errors and the speed changes I wanted! Thank you sooooooooooo much, that script has saved me a lot of time! I copy the right code here, just in case it may be useful to any newbie like me:
@raffriff42:Thanks to you too! I can't tell you if the new code works because I haven't tested it yet. I'll need some time to understand it, seems quite more difficult... |