logo Sign In

Livelock with ColourLikeFBF

Author
Time

I'm using the ColourLikeFBF() function. Whenever I render my project, I receive a livelock in VirtualDub.

Dub: I/O thread has not cycled for ten seconds -- possible livelock...

I have googled the problem extensively and tried the following things, to no avail.

  • setting priority to idle
  • adding SetMemoryMax() to the script
  • rendering to a different codec
  • updating my graphics driver
  • encoding with x264 rather than sending the script to VirtualDub

 

The livelock always occurs at the same point. The render never completes. The error message repeats every ten seconds. Has anyone experienced this problem with ColourLikeFBF()?

At first I thought it was because I was rendering to an external hard drive, but when I tried an internal one I received the same error message, as well as the following one.

Dub/IO-Video error: Unknown (80004005)

I checked the output, and it breaks off exactly where ColourLikeFBF kicks in.  I have a good computer with 16GB of RAM. There is nothing else in the script that might be causing the problem because I am using only Trim(), DeleteFrame(), DuplicateFrame() and a few colorspace conversions -- all simple operations.  Moreover, I have tried rendering only the section that uses ColourLikeFBF and experienced the same thing.

I would appreciate any help because this is driving me mad.

Author
Time
 (Edited)

what version of vdub are you using?  It sounds like the newest version has a fix for that.

EDIT: NM I didn't see that you had attempted rendering without VDUB as well.  BTW, do you have a link to any documentation on ColourlikeFBF?  I've heard of colourlike but not colourlikefbf.

Luke threw twice…maybe.

Author
Time
 (Edited)

I'm using 1.9.11, but I suppose I could try the beta.

ColourLikeFBF is a function that Antcufaalb wrote for ColourLike.

 

function ColourLikeFBF(clip c1, clip c2)
{ # Color-matches c1 to c2, frame by frame.
  # Assumes c1 and c2 are the same length and are
  # both compatible with ColourLike.
  global c1 = c1
  global c2 = c2
  return c1.ScriptClip("""
    ca = c1.Trim(current_frame, -1)
    cb = c2.Trim(current_frame, -1)
    ca.WriteHistogram("hist1.txt", 1)
    cb.WriteHistogram("hist2.txt", 1)
    ca.ColourLike("hist1.txt", "hist2.txt")
    """)
}

Author
Time

Chewtobacca: I just got your PM. I've been away, so I'm sorry for not being able to reply earlier.

Have you tried rendering with something else besides VirtualDub; e.g., avs2avi?

A picture is worth a thousand words. Post 102 is worth more.

I’m late to the party, but I think this is the best song. Enjoy!

—Teams Jetrell Fo 1, Jetrell Fo 2, and Jetrell Fo 3

Author
Time

Thanks, Antcufaalb.  I'll have a go with avs2avi; however, as I can't encode with x264 either, I'm not sure it will help.

I would also like to thank Andrea, who sent me this via PM.

I had initial problems maybe be due to the fact I used wrong avisynth.dll and/or setmemorymax/setmtmode - to be sure, I downloaded avisynth 2.6, and don't use setmemorymax/setmtmode when using colourlikeFBF.

So, yes, I definitely have not problems with colourlikeFBF.

By the way, when I had them, the picture was clearly not "colorliked" and an error message appeared on the screen.

Hope you could solve your problems soon!

I think this confirms that it's a problem on my end and not the filter/function.

Author
Time

Okay, neither the beta of Virtualdub nor avs2avi worked. 

avs2avi input.avs output.avi -c LAGS

Here's the error message.

Runtime Error!

Program...

This application has requested the Runtime to terminate in an unusual way.  Please contact the application's support team for more information.

 

Author
Time

Well, I tried rendering the script on another computer, and the same error occurs.  I guess this filter doesn't like me.  Are you guys using ColourLike_25Aug05.dll and feeding it RGB32?

Author
Time

Chewtobacca said:

Well, I tried rendering the script on another computer, and the same error occurs.  I guess this filter doesn't like me.  Are you guys using ColourLike_25Aug05.dll and feeding it RGB32?

I haven't yet had the chance to test rendering a ColourLikeFBF-containing script.

Here's a quick question: Does ColourLikeFBF work with AvsPmod's preview?

A picture is worth a thousand words. Post 102 is worth more.

I’m late to the party, but I think this is the best song. Enjoy!

—Teams Jetrell Fo 1, Jetrell Fo 2, and Jetrell Fo 3

Author
Time

AntcuFaalb said: Does ColourLikeFBF work with AvsPmod's preview?

It does.

Author
Time
 (Edited)

Chewtobacca said:

AntcuFaalb said: Does ColourLikeFBF work with AvsPmod's preview?

It does.

OK. Does it work with AvsPmod's "analysis pass"?

A picture is worth a thousand words. Post 102 is worth more.

I’m late to the party, but I think this is the best song. Enjoy!

—Teams Jetrell Fo 1, Jetrell Fo 2, and Jetrell Fo 3

Author
Time
 (Edited)

Also, are you running your script with >1 thread?

ColourLikeFBF uses hardcoded filenames and the ColourLike plugin doesn't attempt to do any file locking, so it's inherently single-threaded.

A picture is worth a thousand words. Post 102 is worth more.

I’m late to the party, but I think this is the best song. Enjoy!

—Teams Jetrell Fo 1, Jetrell Fo 2, and Jetrell Fo 3

Author
Time

AntcuFaalb said: OK. Does it work with AvsPmod's "analysis pass"?

The analysis pass begins but stops at around the same point that Virtualdub stops rendering, judging by the progress bar.

I don't use Avisynth MT, so I don't think I can be using more than one thread.

Author
Time

Chewtobacca said:

AntcuFaalb said: OK. Does it work with AvsPmod's "analysis pass"?

The analysis pass begins but stops at around the same point that Virtualdub stops rendering, judging by the progress bar.

I don't use Avisynth MT, so I don't think I can be using more than one thread.

Would you mind posting your entire script here?

This is getting very interesting...

A picture is worth a thousand words. Post 102 is worth more.

I’m late to the party, but I think this is the best song. Enjoy!

—Teams Jetrell Fo 1, Jetrell Fo 2, and Jetrell Fo 3

Author
Time

I know it sounds like I'm being a pain, but I'd rather not.  I've tried uncommenting everything but the part that applies Colourlike, and it makes no difference.

a=Avisource()

b=Avisource()

ColourLikeFBF(b,a)

The relevant part is written like that.  If there were a syntax error, I would receive an error message upon opening my script.  Is the length of the movie a possible factor?

Author
Time

Chewtobacca said:

I know it sounds like I'm being a pain, but I'd rather not.

That's fine. You're not being a pain.

Do `a' and `b' have the same number of frames? Are they both in the same color-space (RGB32)? Does a.info() and b.info() look more-or-less the same?

Try experimenting with two different (shorter!) sources. Are you still experiencing the same problem?

A picture is worth a thousand words. Post 102 is worth more.

I’m late to the party, but I think this is the best song. Enjoy!

—Teams Jetrell Fo 1, Jetrell Fo 2, and Jetrell Fo 3

Author
Time
 (Edited)

AntcuFaalb said: Do `a' and `b' have the same number of frames? Are they both in the same color-space (RGB32)? Does a.info() and b.info() look more-or-less the same?

Yes.  :)

Try experimenting with two different (shorter!) sources. Are you still experiencing the same problem?

No!  I successfully rendered a short clip, so it might be the length, but I'm starting to wonder if it's the external drive from which I'm reading.

Thanks for the help so far.

Author
Time
 (Edited)

Chewtobacca said:

No!  I successfully rendered a short clip, so it might be the length, but I'm starting to wonder if it's the external drive from which I'm reading.

Thanks for the help so far.

No problem! :-)

Try rendering with a different set of clips that are of similar length to the clips that were giving you problems.

A picture is worth a thousand words. Post 102 is worth more.

I’m late to the party, but I think this is the best song. Enjoy!

—Teams Jetrell Fo 1, Jetrell Fo 2, and Jetrell Fo 3

Author
Time
 (Edited)

I have successfully ruled out the hard drive's being the issue.  It might be the length of the clips.   I have no clips of comparable length to hand and don't fancy ripping two versions of a similar length film to my hard drive to test it out.    I'm about ready to give up, to be honest.

Author
Time

Chewtobacca said:

I have successfully ruled out the hard drive's being the issue.  It might be the length of the clips.   I have no clips of comparable length to hand and don't fancy ripping two versions of a similar length film to my hard drive to test it out.    I'm about ready to give up, to be honest.

Option: Render with ColourLikeFBF in several (2? 3?) smaller pieces to an intermediate lossless format (e.g., Lagarith) and then do a second render that includes joining the pieces together.

A picture is worth a thousand words. Post 102 is worth more.

I’m late to the party, but I think this is the best song. Enjoy!

—Teams Jetrell Fo 1, Jetrell Fo 2, and Jetrell Fo 3

Author
Time

Thanks, but I thought of that. It doesn't work either. At this point, I'm giving up with ColourLike() and ColourLikeFBF() for anything other than short clips.  It's simply not worth spending any more time on this.

Thanks for all your help.

Author
Time

I have made progress of sorts in that I have rendered very short clips successfully.  This demonstrates that there is nothing inherently wrong with my source files or script.  Unfortunately, the clips have to be very short – around four thousand frames – and the length after which livelock occurs does not seem to be predictable, so I cannot simply break the film into manageable chunks.

Would someone be kind enough to try to render a film of any length using ColourLikeFBF() and report any problems?