Log in

View Full Version : Mpegdecoder tracking with virtual dub


Tabriz
20th February 2003, 20:28
I hope one of you gentlemen can offer an explanation for the following:
I loaded a large vob file into mpegdecoder using Avisynth 2.5.
The audio was extracted using Besweet with the "vob" plugin.
Frame count was confirmed and inserted.
The file plays in virtual dub but if I move the track bar to a new position the audio is out of sync. This has never happened before using earlier versions of Avisynth and virtual dub.
The file encodes correctly with audio and video in sync.

Incidently I then added a second file for encoding with CCE (2.66.01). The encode was correct up to 65% and then CCE locked. I tried again and CCE locked at the same point.

The script follows: -
Loadplugin("g:\dvd\avisynth 2.5\plugins\mpegdecoder.dll")

video1=mpegsource("h:\movie\disc 1\part1_1.vob",72125)
video2=mpegsource("h:\movie\disc 2\part2_1.vob",76712)
video=video1++video2

audio1=wavsource("h:\movie\disc 1\part1_1.wav")
audio2=wavsource("h:\movie\disc 2\part2_1.wav")
audio=(audio1)+(audio2)
audiodub(video,audio)
bicubicresize(480,576)
converttoyuy2

Any suggetion relating to the above much appreciated.
regards
Tabriz

sh0dan
20th February 2003, 21:11
1) Dub audio before splice. Use unaligned splice - single '+'

2) When using the MPEGDecoder I think you are only capable of having one instance per script - matbe MPEG2DEC3 can help you there.

Nic
20th February 2003, 22:20
@As it should say in the help, (but I probably forgot to put it there :) ) Ignore MPEGDecoder's seeking. Its actually quite easy to make it frame accurate (the same way MPEG2Dec does it) but I havent implemented it as MPEGDecoder should really only be used for encoding. When encoding everything will stay in sync

As for having multiple instances per script. I honestly dont know. Your best bet is using:
video = mpegsource("h:\movie\disc 1\part1_1.vob+h:\movie\disc 2\part2_1.vob", 148837)

CCE is a fickle mistress at the best of times. I dont know what in your script would have made it stop.

-Nic

scorchED
21st February 2003, 18:10
Originally posted by Nic
@As it should say in the help, (but I probably forgot to put it there :) ) Ignore MPEGDecoder's seeking.

thats the thing i get as result after some testencode with oceans11. ti make it frame accurate i used "trim" with mpeg2dec3. and after trim-setting were setup correctly, i used Nic's mpegdecoder for encoding.

Tabriz
21st February 2003, 19:49
Many thanks for the advice. Since posting I have carried out a number of trials with the same source.

1. There does not seem to be a problem with the spliced files. I tried coding the second file on it's own and the frameserving stopped at the same frame as before.

2. I then recoded using mpeg2dec3 and a new d2v file and although the seeking was correct the file still halted at the same frame.

3. I read the vob file into Virtual dub/mpeg2 and frameserved to CCE. The file encoded up to the same point and then frameserving stopped.

3. I created a tpmgenc project with the d2v file, resized the original and converted to vfapi. I opened the vfapi file with CCE and coded with NO stoppage.

4. I went back to the original script and used bilinearresize instead of bicubicresize and the file encoded without fault.
This maybe explains the halt in frameserving, possibly there was too much going on at the same time for the program to cope.

I did try to use trim with mpegdecoder but without success. This feature does work with mpeg2dec3.

Your advice much appreciated

regard

Tabriz