Log in

View Full Version : Audio gap in Scenarist


redguy
6th June 2006, 23:07
why does scenarist warns me of this:

Warning Audio gap is 5 frames "G:\pcm 2.0\pcm2.0 01-intro.wav".
Warning The Audio gap is filled by repeating last audio frame

when there is no such audio gap. audio and video end nicely together in the track editor.

mpucoder
6th June 2006, 23:44
Scenarist wouldn't lie about this, the audio is a little too short. Perhaps there are not enough samples to make the last audio frame complete. LPCM audio frames are 80 samples at 48K, or 160 samples at 96K. If the audio is not a multiple of 80 or 160 samples, depending on sample rate, the last samples can get discarded and replaced with the last good frame. Another way to look at it is each audio frame is 5/3ms.
So, is this PAL or NTSC?
How many video frames?
What is the duration of the audio in samples, and the sample rate?
If I have those numbers I can show you what went wrong.
Simple rule is to make the audio longer than the video and let the authoring program decide where to terminate the audio.

redguy
7th June 2006, 00:24
hah there is so much to know :)
ok here it goes

pcm 2.0= 8452800 samples long @48khz

the tricky part is of the video :(
ntsc video= 5278 frames duration in my composition in aftereffects
BUT the last frame i see of the rendered m2v opened in virtualdubmod is 5275.
Scenarist says that data end time is 2:56:01 drop frame

thank you mpu for your help :)

mpucoder
7th June 2006, 02:44
OK, well, VDubMod is probably reporting the last I picture, since 2:56:01 drop = 5278 frames.
This gives a video duration of 15849834 clock ticks (3003 * frames).
8452800 samples of LPCM audio very nicely makes 105660 audio frames (samples / 80), which run for 15849000 clock ticks (frames * 150)
as you can see, it is 834 ticks, or 5.56 audio frames, short. Scenarist is claiming it is 5 audio frames short, so it is willing to give you the fraction and start the next track's audio a little early.

I'm a little surprised that Scenarist allowed more than half an audio frame of skew (the difference between when the audio of any track should start and when it actually does) unless this is not the first track, and was already skewed forward (late). Scenarist (and all good muxers) keep track of the skew and attempt to keep it less than half an audio frame early or late.

redguy
7th June 2006, 21:06
clock ticks?? excuse my ignorance, what are they??

indeed it is the first track of the PGC

mpucoder
8th June 2006, 06:50
Timing in mpeg is by a 90KHz clock (actually the 27MHz video sample clock divided by 300). All measurements ultimately come down to ticks, or counts, of this clock.
Some common values:
1 second = 90000
1 PAL video frame = 3600
1 NTSC video frame = 3003
1 AC3 audio frame (32ms) = 2880
1 DTS audio frame (32/3ms) = 960
1 mpeg audio frame (24ms) = 2160
1 LPCM audio frame (5/3ms) = 150
The normal (10.08Mbps) mux rate is 14 bits per tick