Log in

View Full Version : MJPEG cap, dropped frames and GKnot


FrogBoy
15th July 2003, 09:48
Hi all,

I have been exprimenting with capturing from both TV and VHS sources to MJPEG (picvideo). I am using VirtualDubSync for my capturing, and am capturing PAL at full res.

During the capture process I may lose a frame or two here or there (usually only 3 over a 1 hour cap). Anyway, I usually then chop out any ads using VirtualDub, and then use GKnot to convert it to DivX (I know I could do the DivX in VirtualDub but I am not that good with VirtualDub yet).

I have started having problems when I go to open this file in GKnot, it usually gets the number of frames wrong, and if I set the number of frame manually, I then get avisynth errors when the I kick off the encode process (wrong number of frames).

I have read in other threads that avisynth can have problems with bad frames, and am assuming that the dropped frames are causing the bad frames that GKnot is getting stuck on. Does anyone have any suggestions as to how I can combat this problem??

ppera2
21st August 2003, 17:21
Try to cut out adverts with Avisynth's trim(beginframe, endfame) function. Just make avs file with G Knot and after it edit it with notepad...

jggimi
21st August 2003, 20:06
I doubt you're seeing AviSynth errors from incorrect framecounts; instead, my guess is that you are probably seeing error/warning messages in your _Gknot.log files, since your AVI framecount is different than the number you are typing in.

Trim is a useful function, it's just that using it to cut gets a little confusing. That's because Trim removes everything outside the frames listed. You can see Trim in use within Gknot when you have it do end credits separately. Trim can use 0 to mean "start of video" or "end of video," and Gknot takes advantage of that feature.

You can automate trim scripting from within VdubMod. From a page at www.avisynth.org (http://www.avisynth.org/index.php?page=ConvertingAnalogCaptures_to_XviD%2FSVCD) on converting analog captures:Often you want to cut parts of your capture (for example to cut out commercials). An easy way to do this is to make an avs file loading your captured avi:

AviSource("d:\capture.avi")

...Open the avs file in VirtualdubMod and delete sections of your clip (select a range, and press del). Open the Script editor (under the Tools tab), and under the edit-tab select "Import Frameset as Trims". Your script should look like this (if the lines are switched, switch them back).

AviSource("c:\lopez-Jenny_from_the_bronx.avi")
Trim(0,3) ++ Trim(8,31) ++ Trim(43,101)

FrogBoy
21st August 2003, 23:55
I found out what the problem was, I was way off in thinking it had anything to do with dropped frames :)

It seems to be an issue with the way in which GKnot opens AVI files (I'm not sure if the MJPEG has anything to do with it but I doubt it).

Anyway, the problem seems to be with the file size GKnot was stopping at the frame that occurrs at about the 2gb mark of the file. As soon as I saved the file segmented, and then used an avs file to open the segmented avi in GKnot everyhing was fine.

Thanks for the replies guys, and sorry for leading everyone down the wrong path.