Log in

View Full Version : a couple issues with stability


actionman133
24th April 2004, 14:19
im using avisynth 2.54 and have noticed a few problems. The first (and quite odd at that) issue is with the way avisynth interprets scripts.


Video = MPEG2Source ("Causeway Chase.d2v", idct = 5)
Audio = WAVSource ("Causeway Chase.wav")
AudioDub (Video, Audio)
AssumeFPS (24, True)
FlipHorizontal
ResampleAudio (48000)


the indented lines are where the problem resides. the video is slowed down from 25 fps to 24 fps, then flipped and the audio resampled back to 48 khz. the audio comes out very crackly, with occasional slight repetition, as if the audio is being incorrectly resampled.

the odd part is if i change the last 3 lines to:


AssumeFPS (24, True)
FlipHorizontal () #Add brackets
ResampleAudio (48000)


with this the audio is clear. also, if the FlipHorizontal line is moved to:


FlipHorizontal #No brackets
AssumeFPS (24, True)
ResampleAudio (48000)


the audio is again clear. this problem occurs with any filter that has only a clip for an argument (SeparateFields, SwapUV, etc) AND is placed between AssumeFPS and ResampleAudio AND doesn't have brackets. if any one of these is fixed so is the issue.

i see this as some sort of coding bug that other people may have missed, but should be fixed because no one likes crappy audio. obviously, simply changing the order of the script works but whats to say this problem doesn't occur elsewhere...

btw im no C programmer, so dont suggest solutions to me. I'm only presenting a problem.

I used MPEG2Dec3 and wav header AC3 files and m2v's for the video in PAL format. I use windows xp on p4 2.6, in case anyone wants to know.

the other problem is more difficult. when i play my avs scripts in windows media player 9, occasionally the entire computer freezes. i dont think its media player on its own, as it only freezes on scripts. it doesn't freeze on particular frames, so i dont know what the problem is at all.

hope these help make better future versions.

Guest
24th April 2004, 15:58
Regarding the missing parentheses, I pointed out this problem long ago and the powers that have the ability to fix it apparently either disbelieved me or thought it unimportant. I even warn about it in my Decomb help file. Maybe with your corroboration the core developers will finally address this. For now, just always include empty parentheses on all invocations without parameters.

Maybe a quick fix for the core is to require the empty parentheses, as in C language syntax.

Regarding the crashes, most often it is a particular filter that is at fault, not the Avisynth core itself. When you get a crash try it with just the AVISource() command to see if it is a filter issue. Then you'll be able to direct your crash report to the right people.

sh0dan
24th April 2004, 16:22
Compressed audio must usually have an ensureVBRMp3Sync(). Here the audio cache is sometimes kicking in and saving you.

btw, you should try using SSRC instead.

actionman133
26th April 2004, 05:14
sorry sh0dan, but my understanding was the EnsureMP3Sync was only necessary for MP3's. these are AC3 dolby digital files with a wav header. i jump seek in vdub and media player with these and the sync seems good.

the filters i use are MPEG2Source (dec3 version), WAVSource, AudioDub, DelayAudio, ConvertToYUY2, LanczosResize (with its inbuilt cropping), and ResampleAudio. the script also includes several user-defined functions, Import for other scripts and several IF-THEN-ELSE conditions.

the combined size of the scripts is relatively large at 8004 bytes (over 3 separate scripts imported together), not including slack space. thats why im not including the script here...

do you think any of these could be the problem?

sh0dan
26th April 2004, 08:16
No - it it the compressed input for WAVSource. As said use EnsureVBR... after you load the AVI.