How to open a non-AVI video with LSMaker, and what to do if it doesn't open the video?
The programs needed can be downloaded from lsmaker.uw.hu!
Attention! The new version of LSMaker can open AVS files! So ffDshow and makeAVIS are not needed anymore. There is a new button on the import window (Create AVISynth script from video file), which creates AVS scripts from video files that LSMaker can not open on its own. It is important to specify the speed of the video (FPS, frames per second) otherwise it will not work properly.
An AVS file containing: "DirectShowSource("c:\video.mpg")" might not work properly if the video is "corrupt", the fps is specified incorrectly inside the video file. In this case you need to use the following line. Replace "25" with the fps. The AVS creator function of LSMaker creates AVS files in this pattern.
Programs needed: AviSynth, ffDshow (20041012)
1. First you have to install the programs mentioned above (recommended in this order...). It is importat when you install ffDshow you must select the "Avisynth script serving" option and deselect the "Supported video codecs" and "Supported audio codecs" options (otherwise this "old" codec will decode these formats)!
When the installation is ready, you need to create a text file with the following extension: ".avs" and you need to write the following code there:
How does it work? What is this? AVI is a kind of video container format (there are others, like OGM, MKV...). It is very versatile because it can contain more video and audio streams, and supports codecs unlike MPEGs. To determine which codec to use at playback, it contains a four character long ID, which identifies the format of the video (and audio). Codecs have lists about what formats they can decode. The ID is called FourCC code (four character code): for ex. "DIVX" identifies DivX format, "MJPG" MJpeg, "CDVC" Canopus DV Codec. "DVSD" DV format. This ID can be found at the beginning of the AVI file, in the header.
AviSynth is a program that serves video (video server), video frames to other programs. It runs a script, which determines what AviSynth should do. Like "open this video. cut off the end. apply this filter, add subtitle..." so a batch list of commands and gives the result video to a program that called AviSynth. This ha a lot of advantiges. You can avoid lots of recomression, so improves video quality, saves disk space and time! If you have programs that can cut video, another can add subtitles, but can only open a specific format... no need to recomress and convert the video all the time. In my case it is good to load non-AVI videos.
The makeAVIS program creates a standard AVI, but it doesn't contain any video information, only links to the avs file. And AVI-s fourcc is "AVIS". The ffDshow codec recognizes this format and calls the avs file via AVISynth to get the wanted video frame. Avisynth runs the script and gives the wanted video frame to the ffDshow codec, that gives the frame to the main program that needs the frame (and it doesn't know about all this, thinks that this is a standard avi...). Very tricky!
Programs needed: AVISynth, ffDshow (20041012), DGDecode/DGIndex
The procedure is almost the same as the one mentioned above, but you must also install DGIndex also. After installing, start DGIndex. File|Open the mpeg2 file/s. The Audio|Output method can be changed whether what you want to do with the audio. Extract it as it is to an external file or decode it to wav (there ar better programs to decode sound... but this is off-topic...) Set Video|Field operation to "None"! Now select File|Save project. Select the place and name for the d2v file (it won't be big...) Indexing the MPEG takes some time... When ready, create an AviSynth script (".avs" file) with the following content:
Why can't LSMaker open some AVI file that should work?
VFW (Video for Windows) was introduced in the earlier Windows'. This API was
used to handle videos. After some time, with DirectX DirectShow appeared. This
is a more versatile system. There are no real "codecs" (as were in VFW) in
the DirectShow system, just filters. When a video is opened in the VFW system
the OS searched for a codec and decoded the frames. Everything else like
developing the image displaying part of a mediaplayer program, the image resizer,
the sound system had to be done by every programmer. DirectShow is different.
The filters are "equal". Every filter have inputs and outputs and indentifiers
what format can go in and what comes out. There are a lot of filters. For ex.:
File source: this reads files and sends the data to it's output. AVI splitter:
this recognizes an AVI input and sends the video data to a video output and the
audio data to the audio out. There are video decoder filters (similar to the VFW
codecs), which recognizese compressed video data and sends uncompressed data to
the output. And there are video renderers. These display to input uncompressed
video on the screen. So by putting some filters after eachother programmers can
simply develop meda players. And developing new container formats were easy
because only new splitter and parser filters were needed to be developed and all
directshow mediaplayers can play the videos.
So "real" codecs are the VFW codecs, the DirectShow ones are filters. Some "codecs" contain both a VFW codec and a DS filter (like DivX). Some codecs are only in VFW version, some are only in DS filter (DV for ex.). You can search the Net for VFW codecs (there are a lot of VFW codecs for DV avi...). LSMaker and all my programs use VFW. So you cannot open videos which you do not have a VFW codec for.
But! A mentioned above you can use AviSynth! Use the " DirectShowSource("vide.avi") " command in a script to open videos via DirectShow filters. Use makeAVIS and done! Opneing a DV avi is not a problem anymore!
A quite good pogram called "gspot" is for finding what codecs and filters do you have, so you can easily inspect these kind of problems.
There is a program called Graphedit. You can manually create DirectShow filter chains. (see downloads)
Check out for more info: www.avisynth.org