Forum Archive Home -> Advanced Video Conversion -> Just starting to learn Avisynth, can't open mjpeg avi and others.
| Just starting to learn Avisynth, can't open mjpeg avi and others. | ||
| bigstusexy posted 2008 Sep 30 10:17 | ||
| I have AVI files from my camera that are M-JPEG and PCM. They play in Media Player classic, Virtual Dub, media player 6.2. Graphedt and gspot confirms I have all needed codecs.
I can not open this in a avisynth script. Its a simple script the first one they teach you to build actually. AviSource("file path") I put the entire path and it fines the file but I get the error: AVISource: couldn't locate a decompressor for fourcc mjpg (file path, line 1) yes file path is an actual path like c:\file.avi When I read that AviSource() uses Video For Windows I enabeled mjpeg in ffdshow's vfw codec, didn't help. I tried DirecthShowSource() and it worked however- I have a AVI with WMV3 (version 9) Video and WMA2 codec audio. Opening this with DirectShowSource() doesn't show video but gives audio in everything except for virtualdub oddly, it will display the video. Loading this via AviSource() give an audio decompression error. Booth source files will play in all players with no issue. | ||
| jagabo posted 2008 Sep 30 12:13 | ||
| AviSource() requires vfw based video decoders. Media players use DirectShow based decoders. You can use DirectShowSource() intead of AviSource() or you can get a VFW MJPEG decoder. Ffdshow has a VFW MJPEG decoder. You may need to enable the VFW MJPEG decoder though.
AVISource() requires ACM audio decoders. So you'll need a WMA2 ACM decoder. | ||
| bigstusexy posted 2008 Sep 30 12:41 | ||
| I did enable ffdshow to do mjpeg and it did not work.
Is ffdshow's audio decoder ACM? That I am not sure about, I do know though that it doesn't list wma2 sepcifically but it does list wma 7 8/8 explicit. Also what about the DirectShowSource() problem with the files that play correctly directly? | ||
| jagabo posted 2008 Sep 30 15:42 | ||
Did you enable the VFW decoder or the DirectShow decoder? You want the VFW decoder: Start -> All Programs -> ffdshow -> VFW Configuration... You could also try another MJPEG decoder like PicVideo. As for getting no picture in VirtualDub via DirectShowSource() try forcing ffdshow to output YUY2 or RGB. Add Info() to your script to see what AviSynth says about the video stream. Does GraphEdit show that ffdshow is doing the decoding? | ||
| bigstusexy posted 2008 Oct 01 08:00 | ||
Yes I did enable the VFW version and its also the reason why I tried DriectShowSource() for the wmv avi because ffdshow doesn't seem to offer WMA for VFW. I can try adding info have to read how to use it. When you say does graphedt say ffdshow is working, do you mean on the source or on the avs? The only time VirtuDub didn't show picture was AviSource() on the mjpeg avi and it gave the error in a message window before loading the file but I'll still try and see if I can change its rendering. Mjpeg AVS:No Source: Yes but I let the system default codec handle mjpeg because ffdshow doesn't display all the frames. WMV/AVI AVS: can't render. Source: Not for video just audio. I adjusted so it would do booth still can't render the AVS's video just the audio. VirtualDub is actually the only program that will render the WMV/AVI AVS script with DriectShowSource() | ||
| bigstusexy posted 2008 Oct 01 08:41 | ||
| I think I have the WMV/AVI AVS issue solved, I changed the pixel_type output to "RGB" and that seemed to make it open up in everything everytime. Now as for the fourcc issue with mjpeg when its set in ffmpeg...
Anyone know any other vfw only players? I use to be apble to launch the old movie player via a DLL but that was take away in NT. | ||
| guns1inger posted 2008 Oct 01 08:50 | ||
| Can we see your script ? | ||
| bigstusexy posted 2008 Oct 01 09:59 | ||
| Sure this is the mjpeg avi.
AviSource("C:\DSC_0011.AVI") this is the wmv avi avs but its not an issue anymore. DirectShowSource("I:\keep\That 70s Show\Gits_opener.avi",pixel_type="RGB24") ShowFrameNumber | ||
| poisondeathray posted 2008 Oct 01 10:40 | ||
| That is odd. So you are still getting the error in vdub with
AviSource("C:\DSC_0011.AVI") Even though mjpeg is set to libavcodec in the vfw configuration? Do you have a recent version of avisynth, ffdshow, and vdub? What does mediainfo say about your .avi file (view=>text)? | ||
| jagabo posted 2008 Oct 01 10:43 | ||
| Do you have Panasonic DV codec installed? That codec sometimes interferes with others. If you do, try removing it and using Cedocida instead. Cedocida is much better anyway.
DirectShowSource("I:\keep\That 70s Show\Gits_opener.avi") Info() That will show you what colorspace the decoder produced by default, along with other information about the video. Rendering the AVI file in GraphEdit will show you the filter chain that DirectShow uses. | ||
| bigstusexy posted 2008 Oct 01 11:57 | ||
| Here you go poisondeathray:
General #0 Complete name : C:\DSC_0011.AVI Format : AVI Format/Info : Audio Video Interleave Format/Family : RIFF File size : 10.1 MiB PlayTime : 14s Bit rate : 6030 Kbps StreamSize : 17.7 KiB Video #0 Codec : M-JPEG Codec/Info : M-JPEG including Huffman Tables PlayTime : 14s Bit rate : 5843 Kbps Width : 640 pixels Height : 424 pixels Display Aspect ratio : 1.509 Frame rate : 24.000 fps Resolution : 24 bits StreamSize : 9.75 MiB BitRate_Nominal : 5733260.680 Audio #0 Codec : PCM Codec/Family : PCM Codec/Info : Microsoft PCM PlayTime : 14s Bit rate : 176.4 Kbps Channel(s) : 1 channel Sampling rate : 11.025 KHz Resolution : 16 bits StreamSize : 301 KiB I have no codecs starting the P according to G-Spot, there is another one on the system that can decoded mjpeg I'm attempting to find out what it is. EDIT: Apparently quarts.dll can decode mjpeg does a better job than my current install of FFDshow. FFDshow is Tryouts version 2135 Sep 17, 2008 I'm checking to see if there is a newer version. I will try the info() avs soon. | ||
| jagabo posted 2008 Oct 01 12:10 | ||
| Yes, Microsoft recently added MJPEG decoding to quartz.dll. I doubt there's been any change to MJPEG decoding in ffdshow for years now. | ||
| poisondeathray posted 2008 Oct 01 12:14 | ||
| I'm guessing its the mjpeg with "Huffman tables" that's causing the problems. There is also "other mjpeg" that you can toggle on in ffdshow that might help
Normal mjpeg files from your average camera (e.g. kodak, fuji) work fine. What camera was this from? Perhaps you can upload a small sample? | ||
| 45tripp posted 2008 Oct 01 17:25 | ||
recently? :P | ||
| bigstusexy posted 2008 Oct 02 09:20 | ||
| This is from the new Nikon D90... I'll try to upload a sample soon.
I'll try the other option, After working with you all yesterday I was thinking that perhaps either mjpeg was somewhat broken or this implementation was different and not really support by ffdshow and thus I had no acceptable VFW codec. The videos play horribly in FFDshow by the way, ffmpeg can transcode them just fine however. | ||
| bigstusexy posted 2008 Oct 02 10:18 | ||
| If anyone wanted to know the WMV AVI file has info of:
ColorSpace: YUY2 Width: 480, Height: 360 FPS 25 (25/1) FieldBased (Seperated) Video: No Parity: Bottom Field First Video Pitch: 960 Has Audio: Yes Audio Channels: 2 Sample Type: Integer 16 bit Samples Per Second: 16000 I didn't know that we had space here before I uploaded the file somewhere else. http://files.filefront.com/DSC+0169AVI/;11953975;/fileinfo.html Click download file and you should get the original. The MD5 should be: 426D4B907CDD1D97A87911330AEBE3FC | ||
| jagabo posted 2008 Oct 02 10:32 | ||
I got an AVI file with MJPEG video and PCM audio. I had no problems opening it with VirtualDub using its internal MJPEG decoder, VirtualDub+AviSource() using ffdshow's VFW MJPEG decoder, VirtualDub+DirectShowSource() using quartz.dll, VirtualDub+DirectShowSource() using ffdshow's DS decoder, GraphEdit using ffdshow's DS decoder, and GraphEdit using quartz.dll. Audio was fine in all of them too. Just tried AviDemux -- no problems. | ||
| 45tripp posted 2008 Oct 02 11:08 | ||
| likewise | ||
| bigstusexy posted 2008 Oct 02 11:10 | ||
| Hrm, must be me then, I can't do anything but virtualdub using avisource for this file.
Graph Edit gives me "Cannot play back the video stream: no suitable decompressor could be found." and mplayer 6.1 and classic give me an error from avisynth about nothing for the fourcc. I do have mjpeg and other mpeg set in the VFW portion of ffdshow, I'll check for and update to a newer version after I get back from some rounds today. | ||
| jagabo posted 2008 Oct 02 12:01 | ||
| I used VirtualDub 1.8.2, VirtualDubMod 1.5.10.2, AviSynth 2.58 Jul 29 2008, AviDemux 2.4.3 (r4276), ffdshow rev 2033 Jun 27 2008, and XP Pro SP3 | ||
| bigstusexy posted 2008 Oct 02 14:35 | ||
| Mine are:
Virtualdub 1.7.8 FFDshow tryout 2135 Sept 17, 2008 AviSynth 2.5.7 I just downloaded at the start of this post. Don't have AviDemux haven't thought about using it but its going to be installed soon. If you all tell me that I have to cleanup my codec mess on my own I'd understand as I'm am too completely baffled by this especially since I don't add much more than ffdshow these days. |
Login/Register to our forum to be able to post here.
