Log in

View Full Version : DGIndex gets stuck...


Darkwhisperer
29th September 2010, 07:44
I've ripped an old DVD, and it had some read errors. It was quite minor (a kb or so in about 5 places). Now, Im trying to index the DVD using DGIndex, and it gets stuck (in this case, at 6:44). On preview, the bottom quarter of the frame is pretty messed up.

I tried vobfix, it didnt help. Any ideas on how I can get DGIndex to ignore the errors, or to cut out the bad data? Maybe some other course of action?

I've also tried DVD2AVI. Unfortunately, AVISynth (mpeg2source) doesnt read the resulting D2V. Was worth a shot I guess.

Hagbard23
29th September 2010, 08:00
Hmm - its not easy...

Copy the files to hard-disk. After that, try to demux the m2v Stream, there are various tools for that (e.g.: PGC Demux).

After that, try feeding this to avi-synth via the "FFMS2" (Fabulous FM Source). Keep in mind, that it might be slightly out of frame-accuracy and that you feed the messed-up frames directly to avisynth. You should think about filtering those frames out. For that task, there are various ways which lead to the finish. A simple try would be trimming those frames out, but it is not a very smart way. The best option would be cutting the frames out and replace them with some sort of interpolation between the previous and the following frame. But this is not quite easy.

First, try to get the m2v working in avisynth. After that, we can talk about a solution for the messed up frames...

Read here:
http://forum.doom9.org/showthread.php?t=127037&highlight=ffms

Darkwhisperer
29th September 2010, 08:04
Awesome, thanks for that. Im currently trying mpeg2avi, lets see what comes out. Will try out your suggestion next if theres still a problem.

Ghitulescu
29th September 2010, 08:05
Isobuster.

Darkwhisperer
29th September 2010, 14:03
Update time...

So first attempt at PGCDemux threw a sync error. Used vobblanker to remux. PGCEdit then worked fine. Got the m2v, and it opens fine in Avisynth using FFMS2.

So the next step - Encode audio, then video, mux, and check sound sync?

If you have any brilliant ways to do what you mentioned above, regarding the bad frames, nows the time to mention it :) I think the first issue would be identifying the frames that are problematic. If one frame is messed up, watching at 25-30 fps, Im never going to spot that bad frame.

Hagbard23
29th September 2010, 14:22
If one frame is messed up, watching at 25-30 fps, Im never going to spot that bad frame.

Congratulations, so far.

So - now to the difficult things... ;) :

As you mentioned, you will never notice one single bad frame. So it is worth thinking about leaving everything as it is - without any further editing.

If you dislike that, then we have to go further:
Open Virtual Dub (or AviDemux or something similar) and step to the location, where the bad frame is supposed to be. You can use the cursor keys to step on frame-per-frame basis...

Now, if you catched the bad frame, note the frame number (it is displayed at the bottom of VD-Window). After that, search for other "bad" frames, if there are some and note the frame number, too.

Now, Open your avisynth script and type the following (just a quick example):

a=trim(0,[badframenumber -1])
b=trim([badframenumber +1],[videoendframenumber])
video=a+b
return video
What do we do here? We cutted the parts with "good frames" (before and after the "bad frame") and named them a and b. Then we combined a and b to the final video again (it is now, without the bad frame). You have to modify the script, if you have more than one bad frame, or if you have bad frames, which do not follow to each other.

Then we have a result, which is missing some single frames. That should not be a problem, as long as the number of cutted frames is rather low. I think you do not have to resync Audio if you only cut a small number.

If you cut out a more frames (more than 25 frames could be dangerous to A/V Sync) you have to cut Audio the same way, you cutted the video - you can achieve this with a separate tool (delaycut) or just inside avisynth - it depends. I personally would do it externally.

If you are experienced in scripting, (its just an idea) you can copy the previous and next frames of the "bad frame" and blend them to a new frame. This new frame, you can include in the gap, the "bad" frame has left, when you cut it. But that is really advanced and i do not know how to practically achieve this - it is just a theory. Maybe experienced Users could give a hint about that.

There should be functions for avi-synth, which do the job i described, but unfortunately i do not know one - and i do not know anyone who probably knows - so you are on your own again...

Conclusion:
My preference would be to simply subtract (=cut out) the messed up frame and let the result as it is. I would do no audio-resync, as long as it is not neccessary.

Darkwhisperer
29th September 2010, 14:31
Going through the movie frame by frame sounds really painful.

Im doing a quick x264 convert and merge with audio, lets see how it comes out. After that, I'll start attacking the bad frames.

Thanks for all your help so far :)

Hagbard23
29th September 2010, 14:43
No Problem...

BTW: <laughing> i didn't mean, parsing the whole video frame-per-frame...i meant: You should estimate, where (c.a.) the bad frame is, after that, you can fine-search on frame-per-frame basis... ;)...

BTW2: I thought about some kind of temporal filter for that job, but all i know are not supposed to fix this problem. I think it is still the best way to leave it as it is, or just cut the frames out. No need to complicate things... ;)

Good Luck - CU..

Darkwhisperer
29th September 2010, 15:53
Well, strange times.

I've converted the video, mkvmerge'd it with the original AC3 audio. There was about 10 instances of "non-AC3 data" errors, about 12 kb worth.

However, I've noticed a major issue. The AVS using FFMS2 shows the video to be about 2:13:54. The correct length is 2:47:22. so Im wondering if the frame rate is wrong.

Im doing two runs, using AVISynth's AssumeFPS at 25 fps & 23.976. Lets see tomorrow how that turns out.

manono
2nd October 2010, 18:40
For bad frames, use the BadFrames filter and just list the bad frames like so:

BadFrames(1221,1222,1500,1710,1921,1922,1923)

and it'll blend the good frames at either end of the bad frames to make something that may or may not be noticeable when played at full speed. The framecount remains the same. The length remains the same. You can find the Fizik's BadFrames filter here:

http://avisynth.org/warpenterprises/
The AVS using FFMS2 shows the video to be about 2:13:54. The correct length is 2:47:22.
That would be consistent with increasing the framerate from 23.976fps to 29.97fps

Myrsloik
3rd October 2010, 16:36
Well, strange times.

I've converted the video, mkvmerge'd it with the original AC3 audio. There was about 10 instances of "non-AC3 data" errors, about 12 kb worth.

However, I've noticed a major issue. The AVS using FFMS2 shows the video to be about 2:13:54. The correct length is 2:47:22. so Im wondering if the frame rate is wrong.

Im doing two runs, using AVISynth's AssumeFPS at 25 fps & 23.976. Lets see tomorrow how that turns out.

The major issue is that you did not read the manual. Read the description for the rffmode argument and try again.

Darkwhisperer
4th October 2010, 07:26
@manono: Thanks for the plugin. Unfortunately, its not much use. The bad data is causing DGIndex to get stuck, and so I've been using vobblanker to chop off those bad bits. By the time I get to Avisynth, the bad frames are already gone.

@Myrsloik: I admit I dont understand Field Operations too well. But I do know that if the video shows to be very high % film, then I use "Force Film" option. Which is what I did. I didnt realise that it reduces the length of the video. Should it do that? Also, how come the sound shows at the original length? Should I reduce the length of the sound as well?

manono
4th October 2010, 10:52
I didnt realise that it reduces the length of the video.
It doesn't. I think he's talking about FFMS2. But I'm not entirely sure either.

Darkwhisperer
5th October 2010, 14:26
Well, after a lot of fiddling, Im not exactly sure how, but I've got the movie to a point where Im pretty happy about it. Near the end the sound is off about 0.5 seconds, but its quite acceptable.

To everyone that helped, a warm thank you to you all :)