Log in

View Full Version : Audio ofsync after silent areas.


zzattack
18th October 2005, 09:29
Hi, first of all, if I'm posting in the wrong forum I apologize. It's quite possible I am.

Every day when I get home I download episodes of some tv series and encode them for my pda. If I play the avs in MPC the audio does not get offsync after "where the commercial would be". So after what I call part one there's about 50 seconds of nothing, just black screen and no sound. Straight after that the audio is way offsync, sometimes even 20 seconds. Before the black silence it was absolutely all in sync. I tried several things to fix this, like adding audio later using Avimux/Nandub/VDubMod, wav audio, but in fact the audio never really was offsync, it was rather as if the video got offsync (never knew that was possible). I tried Trim()'ing the video so the black screen got cut off and it was allright, but it's a little bit time consuming for me. Is there some sort of program that can find these silences? Or maybe is there a way not to get the video offsync? Any help would be appreciated.

I encode using VirtualdubMod, to single pass xvid, 208*176 in RGB format. Avisynth is only used for DirectShowSource() and resizing/cropping (it's a wmv file), in case that could be of any help. I tried DivX 6 encoding, but that had the same problems.

sh0dan
18th October 2005, 13:32
:script:

Wilbert
18th October 2005, 14:05
Every day when I get home I download episodes of some tv series and encode them for my pda.
Sorry, we can't help you with that. Check the forum rules (rule 6) next time.

edit: i reopened the thread on request. The OP was refering to shows of Paradise Hotel which are freely available.

zzattack
19th October 2005, 16:56
:script:
DirectShowSource("01.wmv")
LanczosResize(208,176,0,60,640,356)

But I doubt that helps.

IanB
20th October 2005, 14:10
Try

DirectShowSource("01.wmv", seek=false, convertfps=true, fps={29.97 or 25 or 23.976}) # choose right fps value.

You might get away with using seekzero=true rather than the more brutal seek=false. You will need 2.5.6 for these features.

zzattack
20th October 2005, 14:28
Thanks for the help, I'll see if it works right away.
One more question though: my source is 30fps, and my target is 15fps. Should I do that with DirectShowSource() or not? When I encode to 30fps there's the problem, when I add ChangeFPS(15) too, and when I use ConvertToYUY2() & ConvertFPS(15) I also have the offsync.

IanB
20th October 2005, 14:55
DirectShowSource(..., fps=15, convertfps=true, ...) is the same as ChangeFPS(15), i.e. both drop/duplcate frames to achive to conversion. Doing it within DSS helps keep the audio synced by considering the ASF timecodes embeded in the source.

ConvertFPS(15) uses clever switching/blending to do the job. It's going to be personal choice as to which effect you prefer. I prefer the ChangeFPS() style conversion going from 30->15 fps.

zzattack
20th October 2005, 15:31
It worked somehow! But, I used avs2avi this time, then stripped the audio using an avisynth script and vdubmod to uncompress it, and then remuxed. Is there a way I can automate this using commandline tools? So one for demuxing, encoding would be besweet, and remuxing? And last question: instead of


DirectShowSource("01.wmv", seek=false, convertfps=true, fps=30)
ChangeFPS(15)


I can just use


DirectShowSource("01.wmv",seek=false, convertfps=true, fps=15)

IanB
21st October 2005, 03:26
DirectShowSource("01.wmv",seek=false, convertfps=true, fps=15)

Yes thats the one. The effect is the same, but it is faster and handles ASF variable framerate issue a little more gracefully.

Also experiment with seekzero=true instead of seek=false with your wmv files to see if you really need the largest hammer.