Log in

View Full Version : Duplicate first frame?


jstelly
31st March 2005, 01:09
I'm writing an editing app of sorts and I'm seeing a duplicate first frame using XviD (1.0.3). My source is an AviSynth script reading in an index from DGIndex. I build a DirectShow filter graph that looks like this (video only):

Avs Source -> AVI Decompressor -> XviD MPEG-4 Codec -> AVI Mux -> File writer

The AviSynth source looks like this:


loadplugin("V:\tools\filters\DGDecode.dll")

mpeg2source("V:\working\test\source.d2v")


That's the entire clip. The problem happens when I try to do a Trim() in the script, like:


loadplugin("V:\tools\filters\DGDecode.dll")

mpeg2source("V:\working\test\source.d2v")
Trim(300, 400)


Sometimes (not always) I end up getting a duplicate first frame (frame 300) in the output AVI. If I remove Xvid from my filter graph and store as an uncompressed AVI, or an MJPEG AVI I don't get the duplicate frames. Below is a link to my HKCU\Software\GNU\XviD registry key so you can see what options I'm using to encode and a clip that shows the problem.

Like I said, some segments have a duplicate, a few segments even start with 2 or 3 duplicates, some have none. If I encode the entire span of video then use Virtualdub to look at what would be the starting frames, they're never duplicated, and if I remove XviD from the equation, they don't end up duplicated either.

Does anyone have any ideas for me? Is it possibly one of my settings that's causing this? Is this an expected behavior? Thanks in advance.

registry file (http://js.ofasoft.com/xvid.zip)
video file (http://js.ofasoft.com/xvidseg.avi)