Log in

View Full Version : Nic's MPEGDecoder, NTSC, Audio Sync


DDogg
3rd June 2003, 14:29
I have been having dialogs with Nic for sometime and I think I may have us both confused. Specifically I would like to get a answer to these questions, but please, only from NTSC users:

1> Has anybody ever got a multipass NTSC encode using MPEGDecoder to be in audio sync?
2> If so, were you using the inbuilt D2V builder, or were you able to use a existing prebuilt D2V from DVD2AVI 1.76?
3> If so, what encoder were you using?
4> Has anybody used MPEGDecoder and CCE multipass to achieve an in sync encode?

This question is as much for Nic as myself, so please take a few moments and answer if you have use MPEGDecoder for multiple NTSC encodes that are in sync.

fastchef
3rd June 2003, 15:42
i've had a ntsc film that's audio was sync.
from a d2v created by dvd2avi 1.76

loadplugin("G:\avs2.51\mpegdecoder_25_dll_20030216\mpegdecoder.dll")
loadplugin("G:\avs2.51\UnDot\undot.dll")
loadplugin("G:\avs2.51\asharp v0.95\asharp.dll")
loadplugin("G:\dvd stuff\AviSynth_250_plugins\FluxSmooth-1.0\fluxsmooth-2.5.dll")
mpegsource("G:\barton fink\BF.d2v")
BilinearResize(480,388,28,0,664,478)
fluxsmooth(7,7)
asharp(2,4,hqbf=true)
undot()
AddBorders(0,46,0,46)
converttoYUY2(interlaced=false)
addaudio()

i used cce 2.67 with eclCCE support multipass(3 passes)

DDogg
3rd June 2003, 19:36
fastchef, thanks for the reply.

1> Did you used forced film when you created the D2V file? COuld you verify that the raw mpv file plays back at 23.97 in WMP 6.4 (only) using the statistics view?
2> Did you then run pulldown.exe on the raw MPV? Could you verify as above (statistics) that this file plays back at Frame rate 29.97 with an actual of 23.976?

I hope you do not mind me asking for this information and I hope you might still have the files as you had the script.

fastchef
4th June 2003, 01:32
i don't have the raw mpv anymore, but i do keep most of avs scripts for some reason(not sure why) i'd have to demux the mpg. i do plan on trying out mpegdecoder on my next encode so i can post the results by tomorrow :)

-i did use force film in dvd2avi and i did use pulldown on the mpv

fastchef
4th June 2003, 15:55
ok, displaying stats in wmp 6.4 raw mpv before pulldown:
frame rate=23.97
actual framerate=23.99

after pulldown:

frame rate=29.97
actual framerate=23.97
verified that the audio was sync after muxing with bbmpeg

avs script:
loadplugin("G:\avs2.51\mpegdecoder_25_dll_20030216\mpegdecoder.dll")
LoadPlugin("G:\avs2.51\cnr2_25_dll_20030205\cnr2.dll")
loadplugin("G:\avs2.51\convolution3dyv12\convolution3dyv12.dll")
mpegsource("G:\PD\pd.d2v")
crop(0,8,716,462)

BilinearResize(480,352)
Convolution3D(0, 3, 4, 3, 4, 3, 0)
CNR2()
TemporalSoften(1,5,0,7,2)
AddBorders(0,64,0,64)
converttoYUY2(interlaced=false)

addaudio()

DDogg
5th June 2003, 16:01
fastchef, again thanks for your information. OK, sounds like, yet again, there must be something on my machine causing a problem. I say this because I have never been able to get an in sync encode from MPEGDecoder.

As well as tests with CCE which resulted in out of sync audio, one of my tests was to do an entire GKnot Divx encode using mpeg2dec3.dll (Mpeg2Source) which was in sync, and then just remove the "2" to change the one line to MpegSource and redo the encode. It was not in sync. The audio gradually fell more and more out of sync. I felt this must show MPEGDecoder was having problems using an existing D2v file.

However, the fact that you are having no problems must indicate a machine or source specific problem although at this stage that is certainly confusing as mpeg2dec3 always works perfectly. Why one would work and the other will not on this machine is a head scratcher. I am starting to wonder if my source for those tests may have been hybrid as I think I remember something about that being a problem for MPEGDecoder. If so that might explain it.

DDogg
5th June 2003, 18:22
On a slightly related subject is the seemingly large difference in size between an encode using MpegDecoder (larger) and Mpeg2dec3.

In a CCE 2.67.00.10 one pass vbr encode using the test sizing script below MpegDecoder returned a file size (from properties) of 15.3 MB (16,097,996 bytes)whereas mpeg2dec3 returned a file size of 14.0 MB (14,717,152 bytes). Assuming linearity, I think that would make the MPEGDecoder encode a hundred meg larger for the full encode? Heh, that doesn't make a whole lot of sense to me. fastchef, perhaps if you feel like messing around with this, you might want to check this on your end.

========================================
mpeg2source("D:\startrek\DVD2AV~2.D2V")#remove "2" for MpegDecoder test
undot()
LanczosResize(480,288,21,56,678,362)
undot()
AddBorders(0,96,0,96)
selectrangeevery(1500,15)
========================================

RB
5th June 2003, 18:32
I think Nic said it recently elsewhere, MPEGDecoder does not handle seeking and jumping to specific frames very well, it is only intended to decode the video from start to end in a linear fashion. Just try seeking in the AVS in the CCE chapter settings dialog, you'll notice you sometimes get different frames at the same position or even decoding errors. I think SelectRangeEvery() can't be used reliably with MPEGDecoder.

DDogg
5th June 2003, 22:09
RB, thanks, that makes perfect sense and I should have remembered that. I verified it by doing the full encode. Mpegdecoder actually yielded a file size slightly smaller (5 megs) than the mpeg2dec3 encode.

fastchef
7th June 2003, 04:48
i did a test using both decoders and the file size was the same, the quality was the same, the speed was 20% faster with mpegdecoder.dll i did not add the the selectrangeevery() both files audio were sync.