View Full Version : Big Noob Questions about AviSynth
dlflannery
17th December 2006, 08:25
Just installed AviSynth and wanting to test its operation on an mpeg2 and a DivX file.
I'm just doing simple .avs files and loading them into WMP and MPC (6.4.90), i.e., real-time serving the frames to the players.
I can source the mpeg2 with either MPEGDecoderSource or DirectShowSource. I can source the DivX with AVISource.
I've also tried adding a crop removing the top and bottom 64 lines (all are 480 line videos) -- just as a test.
The DivX plays fine unless I crop it then there are audio and video glitches.
The mpg plays ok with DirectShow sourcing but has audio sync problems. With MPEGDecoder sourcing the video is totally bad, looks like terrible horizontal sync problem on a TV set. This mpg is 720x480, interlaced TFF, with AC3 audio. Maybe I need to do something to handle the interlace (?).
The cropping seems to work as expected.
(BTW both the DivX and the mpg play fine when loaded into WMP or MPC.)
Should I be expecting good audio sync testing this way or is this just not a valid way to test AviSynth? MPC reports the audio coming from AviSynth is LPC so it would not surprise me if that conversion is leading to sync problems when trying to play real time.
Maybe I have to serve it to VirtualDubMod and save the file before expecting audio sync (?).
Thanks for any help.....
dlflannery
17th December 2006, 10:23
Additional info: I served the mpeg into VirtualDubMod and created an AVI output (actually DivX with mp3 audio). I had to advance the audio 1500 ms (in the interleave settings panel) to get it synced! Other than that all seemed to go well -- but this is only a 5 min clip.
Guest
17th December 2006, 14:57
VirtualDub is not intended as a player, and Avisynth delivers uncompressed video, which can have a high data rate, challenging your system. You have to assess sync in the final encode, as you suggested.
dlflannery
17th December 2006, 17:47
VirtualDub is not intended as a player, and Avisynth delivers uncompressed video, which can have a high data rate, challenging your system. You have to assess sync in the final encode, as you suggested.
Thanks for the response.
What I meant was I had to advance the audio by 1500 ms in VirtualDub so that the AVI output file was properly synced when played in a software player, i.e., I was assessing sync in the final encode. Does this seem OK or does it indicate a problem somewhere? Or are you saying the sync problem probably results from my system not keeping up with the AviSynth uncompressed video? Is my approach (adjusting audio delay in the interleave settings) the best way to control sync or is there a preferred technique?
Also, still wondering if the video scramble I had when serving the mpeg to software players using the MPEGSource (MPEGDecoder.dll) was likely caused by interlace not being handled in my .avs ?
My system is a 3 GHz P4, hyper-threaded, with 1 GB RAM and nVidia GeForce 5200 video card with 128MB. Would it be normal to expect problems not keeping up with AviSynth when serving directly to a software player with this system?
Guest
17th December 2006, 18:27
What I meant was I had to advance the audio by 1500 ms in VirtualDub so that the AVI output file was properly synced when played in a software player, i.e., I was assessing sync in the final encode. Does this seem OK or does it indicate a problem somewhere? 1500ms is a lot, but since you haven't told us about the MPEG file and how it was made, I can't comment further about it. You do what you have to as far as audio offset is concerned. If making that offset keeps it in sync throughout then be happy.
Or are you saying the sync problem probably results from my system not keeping up with the AviSynth uncompressed video? No, I am not saying that.
Is my approach (adjusting audio delay in the interleave settings) the best way to control sync or is there a preferred technique? There is no best, per forum rule 12. It all depends on what your process is. For what you are doing, it is a perfectly reasonable approach. If you were just muxing existing M2V and AC3, for example, that method would not apply.
Also, still wondering if the video scramble I had when serving the mpeg to software players using the MPEGSource (MPEGDecoder.dll) was likely caused by interlace not being handled in my .avs? I believe that filter does not handle RFF. You need to use a solution that does (such as DGMPGDec or VirtualDub MPEG2), handle it properly in your script, and set the right option for your encoder. The correct process depends upon whether you are targeting a progressive display or an interlaced display.
My system is a 3 GHz P4, hyper-threaded, with 1 GB RAM and nVidia GeForce 5200 video card with 128MB. Would it be normal to expect problems not keeping up with AviSynth when serving directly to a software player with this system? It depends upon too many things to answer that. Just don't expect to always be able to play AVS scripts in real time.
dlflannery
17th December 2006, 21:10
@neuron2: Thanks -- your replies have been very helpful!
If I were muxing m2v and ac3 ES what would be the preferred approach -- in broad terms? (Or in exact terms if you have the time -- or is there a guide for this?)
dlflannery
18th December 2006, 01:54
@neuron2: Thanks -- your replies have been very helpful!
If I were muxing m2v and ac3 ES what would be the preferred approach -- in broad terms? (Or in exact terms if you have the time -- or is there a guide for this?)
Found your website neuron2....this should hold off my noobie questions for a while.
Guest
18th December 2006, 02:53
If I were muxing m2v and ac3 ES what would be the preferred approach -- in broad terms? (Or in exact terms if you have the time -- or is there a guide for this?) The usual approach is to delete AC3 frames or to add silent frames as needed. There is a freeware called AC3 Delay Corrector that does this.
jel
18th December 2006, 03:49
in addition to ac3 delay corrector, i would also highly recommend jsoto's tool: delaycut.
http://jsoto.posunplugged.com/audiotools.htm
dlflannery
19th December 2006, 01:52
@neuron2 and @jel:
Thanks!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.