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 22nd August 2013, 20:06   #81  |  Link
opteronup
Registered User
 
Join Date: Aug 2013
Posts: 5
I managed to compile d2vsource with ffmpeg 2.0.1.

Thanks, jackoneill.

The problem with git version of ffmpeg was that my vapoursynth was built with ffmpeg 1.2.1.
I didn't know that I must use the same ffmpeg for compile vapoursynth and d2vsource.
Then I tried to build vapoursynth with ffmpeg git but I also received errors.
And now I used ffmpeg 2.0.1 to compile vapoursynth and d2vsource and everything works fine.

Last edited by opteronup; 22nd August 2013 at 20:15.
opteronup is offline   Reply With Quote
Old 17th November 2013, 15:40   #82  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
Please read several posts starting from this one:
http://forum.doom9.org/showthread.ph...50#post1653750
Not sure, but it seems that d2v.Source hangs if requested a frame with number beyond the real source length.
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 17th November 2013, 16:40   #83  |  Link
handaimaoh
Guest
 
Posts: n/a
Yeah, the filter simply doesn't handle such a case. It seems to just assume that any frame number it is given is in the valid range. I'll send them a pull request real fast with a fix.

If you want a compile a test version to try the fix I have it here. If it works, I'll do the pull request up. Fix in the getframe functions was to add:

Code:
    if (n >= d->d2v->frames.size()) {
        n = d->d2v->frames.size() - 1;
    }

Last edited by handaimaoh; 17th November 2013 at 17:00.
  Reply With Quote
Old 17th November 2013, 16:57   #84  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by handaimaoh View Post
Yeah, the filter simply doesn't handle such a case. It seems to just assume that any frame number it is given is in the valid range.
Normally, the Avisynth cache filter (inserted automatically after all script filters) will ensure that all frame requests actually received by your filter are in range.

However, I guess that does not apply in Vapoursynth. (?)
(and it's still bad practice anyway for a source filter)
__________________
GScript and GRunT - complex Avisynth scripting made easier

Last edited by Gavino; 17th November 2013 at 17:00.
Gavino is offline   Reply With Quote
Old 17th November 2013, 17:01   #85  |  Link
handaimaoh
Guest
 
Posts: n/a
Well it's just a quirk of the API like Myrsloik says. It's such a simple thing to check for though. And as he says, it's going to be changed.

Quote:
Originally Posted by Myrsloik View Post
I'm going to change it for r22, that's why I didn't notice all the crashes you were getting.
Also, I've fixed the check once again to be a ">=" as it was originally.
  Reply With Quote
Old 17th November 2013, 17:58   #86  |  Link
handaimaoh
Guest
 
Posts: n/a
I've created a pull request that fixes this issue and set it off.
  Reply With Quote
Old 17th November 2013, 18:03   #87  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Code:
n  = (n<0)	? 0 : (n>= vi.num_frames) ? vi.num_frames - 1 : n;		// Range limit frame n
In Avisynth speak.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 18th November 2013 at 02:57. Reason: added SPACE
StainlessS is offline   Reply With Quote
Old 17th November 2013, 18:08   #88  |  Link
handaimaoh
Guest
 
Posts: n/a
Quote:
Originally Posted by StainlessS View Post
Code:
n  = (n<0)	? 0 : (n>= vi.num_frames) ? vi.num_frames -1 : n;		// Range limit frame n
In Avisynth speak.
Yeah that would work as well. I just forgot about using the VSVideoInfo. Probably more elegant that way too. Fixed up the pull request to be like this instead. Looks like:

Code:
// Range limit n
n  = (n < 0) ? 0 : (n >= d->vi.numFrames) ? d->vi.numFrames - 1 : n;

Last edited by handaimaoh; 17th November 2013 at 18:22.
  Reply With Quote
Old 17th November 2013, 18:58   #89  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by handaimaoh View Post
Probably more elegant that way too.
Even more elegant is

n = min(vi.num_frames-1, max(0,n));

which is what the Avisynth Cache filter uses.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 17th November 2013, 20:00   #90  |  Link
Daemon404
Registered User
 
Join Date: Mar 2005
Posts: 128
Please see: https://github.com/dwbuiten/d2vsourc...mment-28655105
Daemon404 is offline   Reply With Quote
Old 17th November 2013, 21:39   #91  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
In my opinion it is not wise to omit a guard based on assumption that it won't be needed in the next release. It might be broken later. Or some other software might misuse the library interface. Since the check is only made once per frame - 'tis a quite welcome and non-hindering precaution.
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 17th November 2013, 21:55   #92  |  Link
Daemon404
Registered User
 
Join Date: Mar 2005
Posts: 128
Quote:
Originally Posted by Mystery Keeper View Post
In my opinion it is not wise to omit a guard based on assumption that it won't be needed in the next release. It might be broken later. Or some other software might misuse the library interface. Since the check is only made once per frame - 'tis a quite welcome and non-hindering precaution.
Sorry, scattering basic sanity checks over every single plugin for VapourSynth, because it was once a bug in the core, is retarded. It negates the point of a framework. It's a hack.

Maybe I should also add a check to make sure water is wet too.
Daemon404 is offline   Reply With Quote
Old 17th November 2013, 22:04   #93  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by Mystery Keeper View Post
In my opinion it is not wise to omit a guard based on assumption that it won't be needed in the next release. It might be broken later. Or some other software might misuse the library interface. Since the check is only made once per frame - 'tis a quite welcome and non-hindering precaution.
I don't intend to change the behavior back ever. This change is permanent since it makes sense and slightly simplifies plugin writing. It also means that not all plugins have to be littered with the same check again and again. Or more exactly as many different versions of the check as there are coders on doom9.

On the subject of backseat coders (which we've been having quite a few of recently), the correct answer is:
Code:
if (d->vi->numFrames && d->vi->numFrames <= n)
  n = d->vi->numFrames -1;
Number of people posting in this this thread who got it right: 0
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet

Last edited by Myrsloik; 17th November 2013 at 22:12.
Myrsloik is offline   Reply With Quote
Old 17th November 2013, 22:43   #94  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Best place for check on having video is in constructor, not getframe. Guess it means -ve n is ok then.

Quote:
Originally Posted by Myrsloik View Post
Number of people posting in this this thread who got it right: 0
Maybe so.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 17th November 2013, 22:54   #95  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
may we be expecting a 64bit version soon?
lansing is offline   Reply With Quote
Old 18th November 2013, 15:13   #96  |  Link
Daemon404
Registered User
 
Join Date: Mar 2005
Posts: 128
Quote:
Originally Posted by lansing View Post
may we be expecting a 64bit version soon?
Done. As of Beta 6, the windows zip contains both 32bit and 64bit builds.

ChangeLog here.

I also SHOULD get to writing the d2v creation utility... life is busy. Meh. There's still this, though.
Daemon404 is offline   Reply With Quote
Old 19th November 2013, 19:53   #97  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
This video makes VapourSynth crash near the end when loaded with D2V Source. Other d2v projects don't, so the bug most likely is not in VS.
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 23rd November 2013, 22:58   #98  |  Link
Daemon404
Registered User
 
Join Date: Mar 2005
Posts: 128
Quote:
Originally Posted by Mystery Keeper View Post
This video makes VapourSynth crash near the end when loaded with D2V Source. Other d2v projects don't, so the bug most likely is not in VS.
I'll look into it on Monday.
Daemon404 is offline   Reply With Quote
Old 29th November 2013, 02:23   #99  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
Hope this crash report can help.
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 29th November 2013, 11:22   #100  |  Link
Daemon404
Registered User
 
Join Date: Mar 2005
Posts: 128
Quote:
Originally Posted by Mystery Keeper View Post
Hope this crash report can help.
Sorry, I've been busier this week than expected. I've filed an issue for it, and will poke it this weekend (I am currently on a transatlantic flight after a week of work).
Daemon404 is offline   Reply With Quote
Reply

Tags
d2v, dgindex, 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 05:56.


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