Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th November 2017, 13:53   #2841  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by lansing View Post
I have a problem applying multiple instances of the virtualdub filter neatvideo in vapoursynth, it was able to load preview but crash on preview close.

...
Interesting observation. Does it crash on script evaluation, first frame request or later? There's probably some locking/shared resource in the dll that's causing it. I'll try to debug it just to see but these things are hard to figure out without the source.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 29th November 2017, 15:25   #2842  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by Myrsloik View Post
Interesting observation. Does it crash on script evaluation, first frame request or later? There's probably some locking/shared resource in the dll that's causing it. I'll try to debug it just to see but these things are hard to figure out without the source.
It works fine on preview, I was able to navigate and seek without a problem. It crashes only when I close the preview. I tried opening benchmark while still with the preview window open, the benchmark window works fine until I tried closing it.

I tried the same actions on virtualdub filtermod, no problem on navigate and seeking. I tried running "video analysis pass" and abort it and no crash. The program only crash on close. Here's the crash info.

https://pastebin.com/3LY0zMrA
lansing is offline   Reply With Quote
Old 2nd December 2017, 18:43   #2843  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Small question: Is there a source filter which can handle movs which only link to the tracks?
On ffmpeg I can play such files by adding '-enable_drefs 1', but I don't know of any option in FFmpegSource2, LSMASHVideoSource or LWLibavVideoSource which supports this.
-> is there some to me unknown option or source filter which could be used for this?

Cu Selur

Ps.: Background: A user asked me (see: https://forum.selur.net/showthread.php?tid=162) whether I could add support for this in Hybrid which is why I'm looking into it.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 2nd December 2017, 18:45   #2844  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by Selur View Post
Small question: Is there a source filter which can handle movs which only link to the tracks?
On ffmpeg I can play such files by adding '-enable_drefs 1', but I don't know of any option in FFmpegSource2, LSMASHVideoSource or LWLibavVideoSource which supports this.
-> is there some to me unknown option or source filter which could be used for this?

Cu Selur

Ps.: Background: A user asked me (see: https://forum.selur.net/showthread.php?tid=162) whether I could add support for this in Hybrid which is why I'm looking into it.
Maybe, create an issue with this text and maybe I'll look into it later. No idea how that part of the api works.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 2nd December 2017, 18:45   #2845  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Will do. Thanks!
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 2nd December 2017, 19:34   #2846  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by Selur View Post
Will do. Thanks!
Do you have some small sample to go with it? I think it's just a simple option to change but need to be able to test it.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 2nd December 2017, 19:36   #2847  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
There's a download link (google drive) to a test folder with the files in the first post over in my board. -> https://forum.selur.net/showthread.php?tid=162

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 4th December 2017, 05:25   #2848  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Can I output image file name with imwrif base on frame number in the frame property?
lansing is offline   Reply With Quote
Old 4th December 2017, 09:42   #2849  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by lansing View Post
Can I output image file name with imwrif base on frame number in the frame property?
If you call imwri insode frameeval ypu should be able to do it.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 5th December 2017, 04:07   #2850  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
I have problem with the syntax on appending clips reading from text file. I need to reorder a clip like this:
Code:
clip[500:600] + clip[400:450] + clip[601:700]
I have looked in remapframes, but it doesn't have such function.

Right now my text read like this:
Code:
500 600
400 450
601 700
And I use a for loop to create the clips, but I always ended having to create a dummy 1 frame accumulator clip so that I can append the clips onto, and then strips that out after the loop.

Code:
clip = core.ffms2.source("abc")

accum_clip = clip[1]

with open(file) as f:
     line = f.readline()     
	
     for line in f:
          start, end = (int(x.strip()) for x in line.split())
          accum_clip += clip[start:end]

clip = core.std.Trim(accum_clip, 1)
How do I avoid doing that dummy clip?
lansing is offline   Reply With Quote
Old 5th December 2017, 05:57   #2851  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Ok that looks better than my dummy clip. Didn't know that you can pack those shortcut format into the splice function.
lansing is offline   Reply With Quote
Old 6th December 2017, 04:58   #2852  |  Link
tyee
Registered User
 
Join Date: Oct 2001
Posts: 416
Just starting to learn VS, but can't find links to any 64 bit plugins to test a script. Trying to find RemoveGrain.dll and Repair.dll to test finesharp script. Anyone got links?

update - ok, I read they are not needed anymore but I would like to know where the 64 bit plugins reside?

Last edited by tyee; 6th December 2017 at 05:12.
tyee is offline   Reply With Quote
Old 6th December 2017, 06:26   #2853  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by tyee View Post
Just starting to learn VS, but can't find links to any 64 bit plugins to test a script. Trying to find RemoveGrain.dll and Repair.dll to test finesharp script. Anyone got links?

update - ok, I read they are not needed anymore but I would like to know where the 64 bit plugins reside?
http://www.vapoursynth.com/doc/pluginlist.html
lansing is offline   Reply With Quote
Old 6th December 2017, 07:10   #2854  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Updating on my issue with loading multiple instances of a virtualdub filters. I did more testings on a few more vd filters, the problem should be coming from either avisynth or virtualdub. (I highly believe that it's avisynth)
Loading multiple instance of any vd filter in an avs script will result in an "out-of-bound memory access" crash on program close, which is the same behavior I had in vapoursynth earlier.

This will crash in avisynth:
Code:
LoadVirtualDubPlugin("Autolevels.vdf", "Autolevels", 0)

src = AVISource("sample.avi").ConvertToRGB32()
a = src.Autolevels(40, 46, 50, 0, 0, 0, 0, 0)
b = src.Autolevels(40, 80, 50, 0, 0, 0, 0, 0)

a+b
This will work:
Code:
LoadVirtualDubPlugin("Autolevels.vdf", "Autolevels", 0)
LoadVirtualDubPlugin("Autolevels_copy.vdf", "Autolevels_copy", 0)

src = AVISource("sample.avi").ConvertToRGB32()
a = src.Autolevels(40, 46, 50, 0, 0, 0, 0, 0)
b = src.Autolevels_copy(40, 80, 50, 0, 0, 0, 0, 0)

a+b
lansing is offline   Reply With Quote
Old 6th December 2017, 08:54   #2855  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by lansing View Post
Updating on my issue with loading multiple instances of a virtualdub filters. I did more testings on a few more vd filters, the problem should be coming from either avisynth or virtualdub. (I highly believe that it's avisynth)
Loading multiple instance of any vd filter in an avs script will result in an "out-of-bound memory access" crash on program close, which is the same behavior I had in vapoursynth earlier.
Yes, already reported, something like a double free at exit, don't spend any more time investigating on the vs side.

Last edited by pinterf; 6th December 2017 at 08:55. Reason: Quote too long
pinterf is offline   Reply With Quote
Old 6th December 2017, 19:01   #2856  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by pinterf View Post
Yes, already reported, something like a double free at exit, don't spend any more time investigating on the vs side.
Ok hope this get fix soon, getting it to work fills in the last missing piece of my project.
lansing is offline   Reply With Quote
Old 9th December 2017, 04:46   #2857  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Is there a function that can replace a range of frames with another range of frame of the same clip?

I want to replace frame 200-250 with frame 0-150. It's not remapping, the length of the resulting clip should be different to the original. I looked into remapframes but it doesn't have it.
lansing is offline   Reply With Quote
Old 9th December 2017, 07:28   #2858  |  Link
AzraelNewtype
Registered User
 
AzraelNewtype's Avatar
 
Join Date: Oct 2007
Posts: 135
Sure.

http://www.vapoursynth.com/doc/functions/trim.html

http://www.vapoursynth.com/doc/functions/splice.html
AzraelNewtype is offline   Reply With Quote
Old 9th December 2017, 08:20   #2859  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
I know that we can write it using those native functions. I'm just asking to see if we have something written already.

I have another question about slicing, is there a short form to get a clip of N frame to the end of the clip? "clip[50, -1]" only gets frame 50 to the second to the last frame, is there a flag that represent the last frame of the clip?
lansing is offline   Reply With Quote
Old 9th December 2017, 09:51   #2860  |  Link
AzraelNewtype
Registered User
 
AzraelNewtype's Avatar
 
Join Date: Oct 2007
Posts: 135
clip[50:]

Of course [:-1] is only giving the second to last. That's what negative slice indexes do.

As for wrapping three trims and a splice to do arbitrary replacement of unrelated clips, that kind of really small helper function isn't the sort of thing people share libraries of. A naive implementation is probably about five lines. It's barely even syntactic sugar if you have to define the trim points of the input and replacement separately.
AzraelNewtype is offline   Reply With Quote
Reply

Tags
speed, vaporware, vapoursynth

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:04.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.