Problems when I try to encode videos using DirectShowSource (MeGUI)

Last updated on 10 months ago
boricuaretrogamer
Hi everyone!
I am trying to encode videos using MeGUI and convert them to MP4, but when I open the AviSynth script directly on MeGUI, it keeps saying Error Parsing AVS file:
DirectShowSource; Could not open as video or audio/ Error not specified.

Can anyone tell me how to fix this situation?
Puerto Rico...GAME ON, Level Up & Happy Gaming!!!Smile
martanius
You are probably missing splitters/filters or have them disabled.

Try opening the video file using Windows Media Player - it probably won't play it.

So you can either install Haali Media Splitter and ffdshow or you can use different filter (which should be preffered).

For example LSMASHVideoSource / LWLibavVideoSource or ffmpegsource2 / ffvideosource.
Download links are on the wiki page including examples of how to use them. These two are better than DirectShowSource because they are more reliable and frame accurate.

Here is some additional information about importing media.
boricuaretrogamer
Thanks bro, I appreciate your help!! I will try to reinstall those components.
Puerto Rico...GAME ON, Level Up & Happy Gaming!!!Smile
martanius
I assumed you want to open mp4 file. But I see you want to encode the video to mp4.

If your source video file is in avi format, just use AviSource function
AviSource("video.avi")

Also what I wrote in my previous answer is just what I google. I did use DirectShowSource to encode mp4 files before for my PS3/PSP/PS4 longplays and I did not have this problem you are having (as far as i know - it's been few years) but I know I had Halli Media Splitter installed. It might need some slight adjusting in the settings if it still won't work (probably enabling the mp4/mkv format or whatever is the source video format you want to encode).

I'm encoding mp4 files right now and when I tried to use DirectShowSource I had the same error as you. That's how I found out about the solution above. I eventually used LibavVideoSource which works just fine.
Anniesampson
The "Error Parsing AVS file: DirectShowSource" message likely indicates missing or incompatible DirectShow filters. Try reinstalling Haali Media Splitter and ffdshow, or switch to more reliable alternatives like LSMASHVideoSource or ffmpegsource2. These alternative sources offer better compatibility and frame accuracy compared to DirectShowSource. Be sure your source video format is supported by your chosen encoder and script settings.
boricuaretrogamer
hi again!
What's the format for LWLibavVideoSource in the AviSynth script?
Puerto Rico...GAME ON, Level Up & Happy Gaming!!!Smile
boricuaretrogamer
I don't know how to install those! Can you help me out?
Puerto Rico...GAME ON, Level Up & Happy Gaming!!!Smile
martanius
Get the LSMASHSource dll from here: http://avisynth.nl/index.php/LSMASHSo...MASHSource

Locate installation folder of AviSynth and paste the dll in a folder called plugins. For me it is C\:\\Program Files (x86)\\AviSynth\\plugins
You can also locate your MeGui's folder and paste the same dll in tool/avisynth_plugin folder. For me it is E:\\MeGui\\tools\\avisynth_plugin

I have the dll in both folders. Then just use LWLibavVideoSource for video and LWLibavAudioSource for audio.
Or LSMASHVideoSource for video and LSMASHAudioSource for audio.

Examples are on the wiki.
boricuaretrogamer
I don't understand those examples. When I open it to MeGUI it returns with script error!!
I still need help to fully understand. Do you have an AVS template that you can send it to me?
Puerto Rico...GAME ON, Level Up & Happy Gaming!!!Smile
martanius
LWLibavVideoSource("C:\Vids\MyVideo.mp4")
LWLibavAudioSource("C:\Vids\MyVideo.mp4")

What error does it show?
boricuaretrogamer
It says Script error along with the path, then the line and column.
KAGE-008
Use the following:

AviSource("gamename.avi")
PointResize(width*2,height*2)
ConvertToYV12 (chromaresample="point")

Thank me later.
boricuaretrogamer
When I switch to LWLibavVideoSource and LWLibavAudioSource in the AVS script and open it in MeGUI, it return with a new error:
[Fatal] Failed to avformat_open_input
I don't know what to do! Should I reinstall the old AviSynth instead with AviSynth+?
By the way it's not in AVI it's in MKV.
martanius
Make sure you wrote the path correctly and the name of the file as well. This error can occur when the file or directory does not exist.
boricuaretrogamer
I think I found the situation: I had the old AviSynth and AviSynth+. I uninstall both and then install the old AviSynth. I believe having both AviSynth (the old one) and the AviSynth+ cause some kind of conflicts, imo.
Puerto Rico...GAME ON, Level Up & Happy Gaming!!!Smile
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.