View Full Version : Feature request: MJPEG support
barazuk
5th February 2006, 11:57
Is it posible to integrate MJPEG decompression support to AVISource? Because loading MJPEG with DSHOW causes to RGB output, and requires one more color conversion.
Sources of MJPEG decoder available in VDub sources. I can write on this base own plugin - but, I think, better way is intergrating in AVISource, rather than create separate plugin with generally same function + MJPEG decoder.
tsp
5th February 2006, 12:58
what about using avisource and ffdshow. It works for me.
Richard Berg
5th February 2006, 14:47
++ I use MJPEG almost exclusively and have never had a problem.
sh0dan
6th February 2006, 12:59
I mostly use Morgan MJPEG 3.11, with AviSource - but I can also see that ffdshow has become really good at MJPEG.
Inc
6th February 2006, 18:05
Because loading MJPEG with DSHOW causes to RGB output, and requires one more color conversion.
Avisource("...........avi",pixel_type="YUY2")
As also to be used in case of PicVideo mjpeg v3.x and FFdshow.
Richard Berg
6th February 2006, 19:32
With ffdshow at least, you can choose the output format from the decoder properties dialog. Also, if you used ffdshow to encode the MJPEG, it's YV12 by default.
barazuk
6th February 2006, 21:15
4 all. Thanks, ffdshow may be a solution. By now ffdshow not installed, and MJPEG decoded only via DirectShowSource - thus decoded only in RGB format.
Another question: is ffdshow really decodes directly in YV12 or YUY2, or AVISource transparently converts RGB to YUV formats? I want estimate the praevalences of using ffdshow vs integrating MJPEG decoder in AVISource (may be, by me :-)
Richard Berg
7th February 2006, 00:06
Well since Avisource doesn't have an integrated decoder, its prevalence is 0. Did you mean something else? It also doesn't do any colorspace conversions; the "pixel_type" parameter is simply passed in its request to AVIFile.
Inc
7th February 2006, 10:00
4 all. Thanks, ffdshow may be a solution. By now ffdshow not installed, and MJPEG decoded only via DirectShowSource - thus decoded only in RGB format.
WHICH mjpeg decoder are u using?
- FFdshow?
- PicVideo 2.x or 3.x ?
- Morgan .... ?
Another question: is ffdshow really decodes directly in YV12 or YUY2, or AVISource transparently converts RGB to YUV formats? I want estimate the praevalences of using ffdshow vs integrating MJPEG decoder in AVISource (may be, by me :-)
Nope as it can be seen in the code avisynth first trys to request YV12 from the decoder, if that isn't supported by the decoder then YUY2 and then RGB (if I remember).
Also ffdshow's HuffYUV or mjpeg for instance can decode straight to YUY2 if the "request" via ' pixel_type="YUY2" ' is set in the avisource comand.
FFdshows mjpeg i.e. is my first choice when capturing analogue sources.
Do look here as I posted in the german doom9 a test where the PicVideo 3.x resulted Colorspace is checked.
http://forum.gleitz.info/showpost.php?p=149471&postcount=13
If using pixel_type="YUY2" in avisource, picvideo3.x doesnt touch the colorspace but serves it directly to avisynth as native YUY2
@Shodan
Ligh did a comparison of the common mjpeg codecs and as you said, ffdshow really seems to do a great job beside its free.
http://forum.gleitz.info/showthread.php?t=24071
(klick on the smileys in Ligh's post for pics)
barazuk
10th February 2006, 22:24
Excuse my terrible English ;-)
Very interesting for me fact is that I dont have ANY VCM decompressor for MJPEG. By now, decompressing gone via unknown to me DShow filter (in mplayer2, for MJPEG AVIs in Properties, tab "Advanced", field "Used filters" listed only "Default DirectSound Device" and "Video Renderer"). Played OK.
But 'AVISource("MVI_0516.AVI")' failed: "couldn't locate a decompressor for fourcc mjpeg".
'DirectShowSource("MVI_0516.AVI")' works, but give to me RGB32.
I go to link passed by Shodan, and go to homepages of listed decompressors. I dont know Deutch, but all English pages tell be bad news, that all these filters not free - Morgan = 20$, PICVideo Motion JPEG Codec (1 CPU Compress and Decompress) - $99, PICVideo Motion JPEG Codec (1 CPU Decompress) - $39, LEAD MCMP-MJPEG Video Codec $9.95.
By now, first I convert MJPEG->HUFFJUV via internal MJPEG decompressor in VDub, and then do advanced processing in AVISynth. For me, pay extra money to keep some seconds is inappropriate (especially, if consider necessity work with video on more than one comp, that require acquiring more licenses). But integrating open-source MJPEG decoder from VDub seems more attractive for me.
Inc
10th February 2006, 23:21
Priwet,
But 'AVISource("MVI_0516.AVI")' failed: "couldn't locate a decompressor for fourcc mjpeg".
Means you haven't installed a mjpeg decompressor for the systems VFW Interface. Most common codecs do come with codecs supporting both (VFW and Show) interfaces like the FFdshow or PicVideo codecs.
DirectShowSource("MVI_0516.AVI")' works, but give to me RGB32 So your installed Dshow mjpeg decompressor only supports or is set to output at RGB32 or even your video rendering system compounds do force such a colorspace as output. Go and get FFdshow or Picvideo or Morgan for mjpg decompression.
I go to link passed by Shodan, and go to homepages of listed decompressors. I dont know Deutch, but all English pages tell be bad news, that all these filters not free - Morgan = 20$, PICVideo Motion JPEG Codec (1 CPU Compress and Decompress) - $99, PICVideo Motion JPEG Codec (1 CPU Decompress) - $39, LEAD MCMP-MJPEG Video Codec $9.95.
Look at the posts further above, .... get FFdshow as it comes with both: decoder and encoder and its free (and btw gots a superb quality).
By now, first I convert MJPEG->HUFFJUV via internal MJPEG decompressor in VDub, and then do advanced processing in AVISynth
From where do you get these mjpeg avi's ?
Do keep them as mjpeg by using one of the vfw mjpeg codecs listed above via avisource() and no temporal safing via HuffYUV will be needed.
oog
13th March 2006, 21:28
I probably have something configured incorrectly, but I am trying to use AVISource with an AVI file created from my Canon S400 camera. The 4cc shows up as mjpg, and when I use AVISource("test.avi"), I get an error that says "AVISource: couldn't locate a decompressor for fourcc mjpg".
I believe I'm using FFDShow to decompress mjpeg files. Under the Codec section of the FFDShow video decoder configuration, I set the decoder for MJPEG to "libavcodec". Is this all I should need to do in order to get AviSource to use FFDShow to decode mjpg files?
foxyshadis
13th March 2006, 21:43
You also need to set it in the vfw configuration module.
oog
13th March 2006, 23:18
where do i find the vfw configuration module? my ffdshow installation was installed as part of the cccp. thanks again.
Inc
13th March 2006, 23:35
Look into your Programs directory, there youll find the ffdshow files. "Video Decoder Configuration" which is for the DirectShow decoding and "VFW Codec Configuration" which is for the VFW Decoding.
The Directshow decoding is needed by Apps like Mediaplayer, MediaplayerClassic, Graphedit etc.
The VFW Decoding is needed by Apps like VirtualDub, CCE, Paranoia etc.
oog
13th March 2006, 23:42
it turns out that cccp strips out the vfw support since it's focused on playback and not encoding. i reinstalled ffdshow and i found the setting. thanks!
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.