PDA

View Full Version : DVD2AVI with corrupted MPEG-2 streams


jr
4th January 2002, 23:52
Hi.

I'm trying to use DVD2AVI with MPEG-2 PS files that have some bad frames. Not much, perhaps two errors per hour.

Files are captured using Hauppauge Nova-T DVB-T card from Digital TV broadcast. There's not much I can do to reception so I'm stuck with these errors. I can live with two errors on image and sound per hour, but DVD2AVI can't.

I'd like to use Gordian Knot with these files to convert them to DIVX3 with ABR MP3 audio. Sometimes conversion goes just fine but if there's error on clip it aborts Nandub encoding. When I open same AVS file with Nandub or Virtualdub and step to bad frame I sometimes get crash on Avisynth, sometimes Virtualdub, sometimes MPEG2DEC and so on. First I thought it's avisynth that crashes, but later I was able to reproduce same problem at exactly same frame of MPEG-2 file with plain Virtualdub + DVD2AVI + VFAPI.

Perhaps someone when optimizing DVD2AVI and MPEG2DEC Avisynth plugin could add little bit of code to tolerate errors instead of crashing?

Another option would be editing MPEG2's prior encoding to cut bad frames away. Any suggestions how to do this? I've tried with MPEG2VCR and M2-EDIT, but neither one of those were able to find bad frames themself. Instead I need to try encoding with GK and after two hours when it crashes check frame number, cut it away with MPEG-2 editor and try again hoping there's no more bad frames.

Demuxing and remuxing MPEG's didn't help either. Anyone heard about application that would load MPEG2 and fix broken audio/video packets and write new file?

Is there any other MPEG2 -> Avisynth/VFAPI program than DVD2AVI I could use for DVB->DIVX conversion? I could try with other DVD rippers as well, but GK really rocks on this area... My opinion, yours may vary. :)

trbarry
5th January 2002, 14:28
I have a similar problem with HDTV captures with my WinTV-HD card. With normal analog captures noise and garbage will cause a garbage picture. But with digital captures garbage can cause garbage control information which can crash DVD2AVI, or others.

It is maybe too performance sensitive to validate every little pointer in the stream but maybe that should be an option. But I think a decent solution would be to trap errors when they occur decoding each picture. Each time an error occurred we would instead use a decoded copy of the previous frame that was successfully decoded. This way the picture and sound would be more apt to stay in sync.

I probably won't implement this soon because of limited time and limited understanding of how DVD2AVI decodes pictures. But it would be nice if someone did. And I'll probably do it eventually if no one else does because it is certainly needed for HDTV/DTV captures.

But there is another solution that has worked for me a couple times. If you use Avisynth with DirectShowsource and the Elecard filter sometimes it is more tolerant of this. It has other limitations but sometimes can decode a section where DVD2AVI will fail.

- Tom