Log in

View Full Version : DelayAudio() freezes when given positive delays


jimbobuk
31st December 2003, 22:37
I've been trying to get a workable out of phase correction working for my PAL MPEG2 PVR captures.. Its now possible to work in realtime on my machine with sound.. with the following type of script


LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MPEG2Dec3dg.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb510.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mpasource.dll")

v = MPEG2Source("test.d2v")
a = MPASource("test MPA T01 DELAY 0ms.mpa", normalize=false)
m = AudioDub(v, a)
DelayAudio(m, 5.0)

Telecide(order=1, post=0, guide=2)


Basically when the DelayAudio() has a positive delay the video opens in windows media player and just sits on the first frame.. nothing happens, the CPU is hammered the time in the player doesn't increase.. its frozen..

Passing a negative delay in and everything works as expected... properly delayed... I'm using the fixed dvd2avi and mpasource from donald gnuth's site...

Anyone know what's wrong with this!?

WarpEnterprises
1st January 2004, 22:12
this could be a problem with MPASource (missing checks for bad sample requests)
I will take a look.

sh0dan
1st January 2004, 22:27
If it is, upgrading to the latest AviSynth CVS binary should fix the problem.

Btw - I heard rumors of a float precision mpasource is in the works - any news? ;)

jimbobuk
1st January 2004, 23:11
Ok.. latest cvs binary and it all works fine.. wow, thanks guys...

I'm not sure how latest avisynth can fix a potential problem with MPAsource.. or is it just some checks in the core of avisynth stopping it from locking up..

Anyways its not ideal but i can now rip a PVR capture with DVD2AVI and use an .avs script to play it with Telecide to remove the pal out of phase business.. its not exactly ideal and requires as much space as the video (dont want to add any extras to my PVR directory so i have to copy the file to begin with) but its nice to be able to fix it if i absolutely HAVE to watch it on my progressive display..

I was going to post something else but bizarrely it appears to have gone away.. basically i installed everything on my other WindowsXP machine.. but an avsscript that worked on one machine failed on another... loading into virtualdub complained about not having any VFW to handle YUV12 (or whichever it was) .. anyways i got round it by converting to RGB but i just undid that conversion to get the error message to put in a post here and now it works.. the script plays in windows media player and opens in virtualdub.. confusing as i changed nothing (obviously something changed but it wasn't deliberate)

ANyways in short i guess i'll leave that now as it all works everywhere.. thanks for this delay fix.. now to try and get Telecide working as dscalar or other directshow filter so i could just use it on clips as is without having to split them.. directshow source is no good as it gets decoded strangely first bob-ing the interlacing into a mess that can't be recovered from..

Thanks everyone

sh0dan
2nd January 2004, 02:09
The latest version kills off out-of-range sample requests. DelayAudio requested sound that was before sample 0.

YV12 error: Install XviD, ffvfw or DivX they all have YV12 decoding capabilities. What format are you converting to, and what encoder are you using (if not vdub(mod))?

jimbobuk
2nd January 2004, 03:00
ahh i installed the xvid encoder (had only previously got the decoder installed) that must be what had fixed it..

I was simply loading in my PVR MPEG2 file via a .d2v file as described with my script in the 1st post.. I just assumed that windows would take all colourspaces with no actual encoding.. raw files i guess.. strange that they dont..

Thanks again though.. i can handle anything i need to watch now :)

WarpEnterprises
7th January 2004, 08:46
I heard rumors
I made some code cleanup along with your float mod (works great - no clipping anymore!)
Due to a hardware and OS upgrade I can publish it only till next weekend.