Changing 24 to 29.97 and sync audio..

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
User avatar
Hofuzz
Joined: Thu Jul 10, 2003 6:25 pm
Contact:
Org Profile

Changing 24 to 29.97 and sync audio..

Post by Hofuzz » Tue Apr 27, 2010 10:26 am

Hello,

Still stuck after some reading and trial & error..
I'm trying to change my 24 fps video source to 29.97 and sync the original audio track with it:

First I tried:
Video=mpeg2source("myVid.d2v",cpu=6)
Audio=WAVSource("myWav.wav")
AudioDub(Video,Audio)
assumeFps(29.97,sync_audio=true)
trim(0,400)
This works well but the audio is "sped up"

Then
Video=mpeg2source("myVid.d2v",cpu=6)
Audio=WAVSource("myWav.wav")
AudioDub(Video,Audio)
changefps(29.97)
trim(0,400)
The audio is out of sync by a second, how should I correct it to have the fps changed and audio at correct pace?

Thank you very much.
"Of all the things I've lost, I miss my mind the most"

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Changing 24 to 29.97 and sync audio..

Post by mirkosp » Tue Apr 27, 2010 11:16 am

cpu=6 is pretty high, imho...
But that aside, and to answer your question, you could try to change the framerate before getting audio and video together. If that still fails, you could use a delayaudio() to manually adjust it before trimming it, I guess... I rarely work with audio inside avisynth, I prefer to avoid extra recompressions if any at all are needed...
Image

User avatar
Hofuzz
Joined: Thu Jul 10, 2003 6:25 pm
Contact:
Org Profile

Re: Changing 24 to 29.97 and sync audio..

Post by Hofuzz » Tue Apr 27, 2010 11:48 am

mirkosp wrote:cpu=6 is pretty high, imho...
That's one of the things that as a n00b I dont quite get even after reading the A/V Tech guide (not that the guide isn't detailed enough)
so I just follow the examples...
mirkosp wrote:But that aside, and to answer your question, you could try to change the framerate before getting audio and video together. If that still fails, you could use a delayaudio() to manually adjust it before trimming it, I guess... I rarely work with audio inside avisynth, I prefer to avoid extra recompressions if any at all are needed...
Thanks, I'll try that approach, I haven't ever tried using audio in Avisynth as well but I want to use a small part of the dialog from the Anime to lead into the song... and submission has to be in NTSC...
"Of all the things I've lost, I miss my mind the most"

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Changing 24 to 29.97 and sync audio..

Post by mirkosp » Tue Apr 27, 2010 11:56 am

Hofuzz wrote:
mirkosp wrote:cpu=6 is pretty high, imho...
That's one of the things that as a n00b I dont quite get even after reading the A/V Tech guide (not that the guide isn't detailed enough)
so I just follow the examples...
cpu is a deblocking/derining parameter... the higher it is, the more it acts. Cpu=6 is really high and tends to kill detail and blur the image overall. Cpu=4 is probably as high as you'll ever want to go, but generally you would want to use cpu=0 and just deblock/dering with something else, if necessary at all.
mirkosp wrote:But that aside, and to answer your question, you could try to change the framerate before getting audio and video together. If that still fails, you could use a delayaudio() to manually adjust it before trimming it, I guess... I rarely work with audio inside avisynth, I prefer to avoid extra recompressions if any at all are needed...
Thanks, I'll try that approach, I haven't ever tried using audio in Avisynth as well but I want to use a small part of the dialog from the Anime to lead into the song... and submission has to be in NTSC...
Well, in that case using avisynth for audio is probably fine, then. You'd have to re-encode anyway. :P
Image

User avatar
Hofuzz
Joined: Thu Jul 10, 2003 6:25 pm
Contact:
Org Profile

Re: Changing 24 to 29.97 and sync audio..

Post by Hofuzz » Tue Apr 27, 2010 12:33 pm

mirkosp wrote: cpu is a deblocking/derining parameter... the higher it is, the more it acts. Cpu=6 is really high and tends to kill detail and blur the image overall. Cpu=4 is probably as high as you'll ever want to go, but generally you would want to use cpu=0 and just deblock/dering with
Hmm, learnt something on the side! Thx! (changes to Cpu=0)
"Of all the things I've lost, I miss my mind the most"

User avatar
Scintilla
(for EXTREME)
Joined: Mon Mar 31, 2003 8:47 pm
Status: Quo
Location: New Jersey
Contact:
Org Profile

Re: Changing 24 to 29.97 and sync audio..

Post by Scintilla » Tue Apr 27, 2010 5:24 pm

mirkosp wrote:
Hofuzz wrote:
mirkosp wrote:cpu=6 is pretty high, imho...
That's one of the things that as a n00b I dont quite get even after reading the A/V Tech guide (not that the guide isn't detailed enough)
so I just follow the examples...
cpu is a deblocking/derining parameter... the higher it is, the more it acts. Cpu=6 is really high and tends to kill detail and blur the image overall. Cpu=4 is probably as high as you'll ever want to go, but generally you would want to use cpu=0 and just deblock/dering with something else, if necessary at all.
I thought the great advantage of using the postprocessing in MPEG2Source rather than using some other deblocker was that MPEG2Source can read the quantization coefficients directly from the MPEG-2 stream, for more intelligent dynamic deblocking/deringing?
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

User avatar
kickass331
Joined: Sat Apr 21, 2007 8:11 pm
Status: Infamous
Location: West Chester, PA
Contact:
Org Profile

Re: Changing 24 to 29.97 and sync audio..

Post by kickass331 » Tue Apr 27, 2010 6:12 pm

if you have to output the video as ntsc, rerip the dvd and this time don't ivtc it. That way you can skip 2 re-encodes.
ImageImageImageImageImage

User avatar
kickass331
Joined: Sat Apr 21, 2007 8:11 pm
Status: Infamous
Location: West Chester, PA
Contact:
Org Profile

Re: Changing 24 to 29.97 and sync audio..

Post by kickass331 » Tue Apr 27, 2010 6:15 pm

alalso, if the reasoning for the framerate is due to you needing a dvd for a convention, or exhibition purposes, the dvd-video standard supports 24fps progressive scan. If you are doing an mep, then you can use an adaptive decimator when you ivtc, and specify a custom framerate in the parameters.
ImageImageImageImageImage

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Changing 24 to 29.97 and sync audio..

Post by mirkosp » Tue Apr 27, 2010 7:07 pm

Scintilla wrote:I thought the great advantage of using the postprocessing in MPEG2Source rather than using some other deblocker was that MPEG2Source can read the quantization coefficients directly from the MPEG-2 stream, for more intelligent dynamic deblocking/deringing?
Years bring up better filters so the more intelligent deblocking doesn't hold up with them. I do honestly suggest you to try Deblock_QED and comparing results. In my experience it ends up being better. Although tbh, I rarely have to do deblocking at all...
Image

User avatar
kickass331
Joined: Sat Apr 21, 2007 8:11 pm
Status: Infamous
Location: West Chester, PA
Contact:
Org Profile

Re: Changing 24 to 29.97 and sync audio..

Post by kickass331 » Tue Apr 27, 2010 7:53 pm

I never thought I'd see the day when mirkosp would beat Scintilla. Scintilla has always had the upper hand. You may have won the battle mirk, but Scint is still leading the charge to victory.
ImageImageImageImageImage

Locked

Return to “AviSynth Help”