Log in

View Full Version : Script enhancement advice?


Knoxy
7th January 2004, 21:22
Hi Guys,

I was wondering if you could advise me on ways to remove ghosting/artefacts from the Divx/Xvid movies that I convert from NTSC>PAL DVD format. The biggest majority of the films that I convert are from 23.976fps to 25fps. The resultant quality is often very good other than the fact that you see ghosting during character movement. I know this is due to frame duplication!

Is there anyway to reduce the ghosting or have I just got to live with the fact that conversion from 23fps to 25fps is going to create this problem?

Find below a typical basic Avisynth script file that I would normally load into Mainconcept:

video = AVIsource("C:\DVD\AAA.avi")
audio = WAVsource("C:\DVD\AAA.wav")
audiodub(video,audio)
ConvertToYUY2()
convertfps(25)

Can anyone advise adding any methods/filters to the above script to help with the above issue?

I'm using ver 2.5!


:confused:

mf
7th January 2004, 21:25
Just speed up the clip with AssumeFPS(25).ResampleAudio(4800) . I think that's it iirc.

Knoxy
7th January 2004, 22:14
Originally posted by mf
Just speed up the clip with AssumeFPS(25).ResampleAudio(4800) . I think that's it iirc.

Hi mf,

What you have advised doesnt help me, when I use assumefps(25)I end up with the video and audio well out of sync!

Thanks for your quick response though!

Rgds

mf
7th January 2004, 23:33
That was what the resample thingie was for -.-a

Knoxy
8th January 2004, 00:16
Originally posted by mf
That was what the resample thingie was for -.-a

I tried it with AssumeFPS(25).ResampleAudio(4800) as well as just
AssumeFPS(25)and both methods still result in the video and audio out of sync.

:(

albertgasset
8th January 2004, 11:42
Hi,

I've tested it and I've found the problem: "sync_audio" is false by default. So to have the audio synchronized use AssumeFPS(25, sync_audio=true).ResampleAudio(48000).

mf
8th January 2004, 12:00
Ah. I've never sped up things in that way, the suggestion was from something I read from another post. I always just use AssumeFPS(24) and then use BeSweet to convert the audio.

Knoxy
8th January 2004, 13:46
Originally posted by albertgasset
Hi,

I've tested it and I've found the problem: "sync_audio" is false by default. So to have the audio synchronized use AssumeFPS(25, sync_audio=true).ResampleAudio(48000).

Hi albertgasset,

What you have advised seems to be working e.g. audio and video is in sync so I'm going to try this out with my next movie and see how the final product looks. Hopefully the ghosting wont be so bad!

Just one final question for you, what is the .ResampleAudio(48000) statement for? as I have tried previewing my movie with and without this statement and both the audio and video are still in sync.

Was the .ResampleAudio(48000) statement not used in the older versions of Avisynth due to an old Avisynth bug?

Thanks for your help guys :D

mf
8th January 2004, 13:49
Originally posted by Knoxy
Hi albertgasset,

What you have advised seems to be working e.g. audio and video is in sync so I'm going to try this out with my next movie and see how the final product looks. Hopefully the ghosting wont be so bad!

Just one final question for you, what is the .ResampleAudio(48000) statement for? as I have tried previewing my movie with and without this statement and both the audio and video are still in sync.

Was the .ResampleAudio(48000) statement not used in the older versions of Avisynth due to an old Avisynth bug?

Thanks for your help guys :D
I think sync=true creates a weird samplerate like 50050Hz, so resampleaudio would put that back to a standard rate. I'm not sure so you might wanna investigate.

albertgasset
8th January 2004, 15:40
[edit] error when posting, replay in next post

albertgasset
8th January 2004, 15:45
Originally posted by mf
I think sync=true creates a weird samplerate like 50050Hz, so resampleaudio would put that back to a standard rate. I'm not sure so you might wanna investigate.

Yes, sync=true changes the samplerate to match video and audio time length, so the audio has to be resampled to a "standard" samplerate.

Originally posted by Knoxy
Was the .ResampleAudio(48000) statement not used in the older versions of Avisynth due to an old Avisynth bug?

I also had problems in the past with ResampleAudio (I don't remember in which Avisynth version). The SSRC resampler wil be included in Avisynth 2.5.4 (better audio quality and it's faster). So wait until next stable release (or download an alpha version), or resample the audio with BeSweet or another tool after processing the clip in Avisynth if ResampleAudio doesn't work well.