PDA

View Full Version : Mpeg2 decoder plugin for 4:2:2P@ML type mpeg2 streams?


KingJeremy
12th February 2003, 08:19
I'm using a broadcast videocapture card (matrox DTV) for capturing videos in Matrox digisuite I-frame avi format.
This I-frame format is a 4:2:2P@ML VBR Mpeg2 stream and when I use the known mpeg2 decoder plugins for avisynth;

Avisynth 2.07 & Nic's mpeg2decoder -> the resultant file is a pink video
Avisynth 2.07 & dividee's mpeg2decoder -> the resultant file is a green video
Avisynth 2.5 & mpeg2dec (v 1.0) for Avisynth 2.5 -> the resultant is a green video

Is there any avisynth plugin for decoding 4:2:2P@ML VBR Mpeg2 streams.

ErMaC
12th February 2003, 08:26
Umm, wouldn't the matrox card install a VFW codec for their fileformat if it's being capture in AVI? Try AVISource() or if that fails DirectShowSource()

KingJeremy
12th February 2003, 09:00
Well the AVISource() option works but when the captured file size exceeds some certain limits in size (not sure how much GB) but as an example a 2 hour capture is around 20 GB and when it is feed with AVISource() only first 12 minute is available and the rest is not.
Haven't tried with DirectShowSource() but probably it will be the same.
Almost all applications behave the same to big size captured files, they read only the first few minutes but not the rest.
To be more spesific I'd like to encode these captures with CCE (TMPEG not prefered for some reasons).
CCE accepts directly the captured avi but do not read the whole file if it is more than a few GB (I'm not very sure if the limit is a 2GB limit but will test it.)
TMPEG seems to accept the file directly like CCE but never encodes else than a whole black video.
BTW DVD2AVI handles quite good the captured files regardless of size and creates a project file.
Though the created D2V project file can be used with TMPEG for encoding I'd rather prefer to use frameserving with avisynth to CCE.
But so far the present mpeg2 decoders seem not to handle 4:2:2P@ML streams naturaly.
Can there be some other options for overcoming the big file size problem or better a mpeg2 decoder which can handle 4:2:2P@ML streams :).

sh0dan
12th February 2003, 09:15
Try OpenDMLSource instead of AviSource.

KingJeremy
13th February 2003, 02:52
Thanks for suggestions. I tried with both OpenDMLSource() and DirectShowSource(). OpenDMLSource() had same problem as Avisource() [2GB file size limit] so I guess the Matrox Digisuite I-frame avi is not a openDML type avi but DirectShowSource() worked out the 2GB file size limit problem and the whole avi was available via avisynth.

Though the script file with DirectShowSource() is almost crashing the system when you try to play the file or seek to any frame. Not a big deal since CCE is ok with importing and rendering fine if you don't try to edit any in and out points.

Also solve the TMPEG rendering only a black video with Digisuite avis by just giving the VFW reader the highest priority in enviromental settings.

BTW I'd like to state the main point again, I was looking for a mpeg2 dec plugin for avisynth which can handle 4:2:2P@ML mpeg2 streams. An additional info might be usefull, DVD2Avi opens and reads correctly such mpeg2 streams.

ErMaC
13th February 2003, 09:09
Most likely all the mpeg2dec plugins are hardwired to assume 4:2:0 video since DVDs are required to be in that format.
If DVD2AVI works for you, you could just use the VFAPI reader for D2V files to load the project file. That way you can open the D2V's in TMPGEnc or use the fake VFAPI AVI creator to open the file in CCE. Of course you'll be adding in the YUV2->RGB->YV12 conversions, but I wonder what the Matrox DirectShow filter is passing anyways. Find out what colorspace the dshow filter is passing to AVISynth - if it's passing RGB anyways the VFAPI method might be faster.

KingJeremy
14th February 2003, 10:59
Vdub file information tells that it is an uncompressed RGB32 avi file.
Well you are right to suggest to use vfapi in this case but I had bad experiences with vfapi + CCE combination, I usualy get a "0 Bytes expected X Bytes" error and CCE skips encoding. Couldn't find a solution since then. Maybe I should give some more tries since it was while ago and versions of tools changed.