View Full Version : DirectShowSource and Windows Server 2008
t2nolan
10th November 2011, 11:07
Hello, I'm new to AviSynth... I've had success working with it on Windows 7, but when I try to use it with Windows Server 2008 SP2, I can't get DirectShowSource to load video files. I've installed Desktop Experience, but it didn't install x264... I've read there's a Windows Update to resolve this, but only for Windows 2008 R2. I've also tried installing many codec libraries, and have been using "DirectShow Detective" to see Microsoft MPEG4 encoders ever get installed, but they don't.
Here's what I've installed:
"Desktop Extensions" - which installed Media Player, codecs, and codec
Windows Essentials Media Codec Pack
K-Lite Codec Pack Full
VLC
QuickTime
I'm sure this is a common problem, how can I get around it? Are there other non Microsoft codecs I can install that DirectShow will automatically use, or do I need update something to make this happen?
AVS Script:
video0 = DirectShowSource("video0.avi", fps=30, pixel_type="RGB24")
video1 = DirectShowSource("video1.avi", fps=30, pixel_type="RGB24")
Dissolve(video0, video1, 30)
AVS Error:
avs [error]: `test.avs' didn't return a video clip
x264 test.avs -o test.mp4 --bframes 3 --ref 3 --vbv-maxrate 2500 --vbv-bufsize=25000 --level 40 --threads
IanB
10th November 2011, 23:35
The usual problem in the past with server is the lack of a sound card driver causing the default audio graph build to fail. Workaround was Audio=False in the DSS calls.
But this looks a little different. What happens if you load the script into VirtualDub?
t2nolan
11th November 2011, 00:06
Thank you for that, with Audio=false, I'm getting:
avs [error]: DirectShowSource: couldn't open file video0.avi:
No combination of filters could be found to render the stream.
I get the same error when trying to load the avs script in VirtualDub.
Does this sound like I need to install filters and not more codecs? Any advice on virtual sound cards? I just start researching that...
t2nolan
11th November 2011, 04:28
Reading the below, I also tried installing haali media splitter and ffdshow (32 bit since this is 32 bit server), but I'm still getting the same "No combination of filters could be found to render the stream.". I've also tried using ffmpegsource2 instead of DirectShowSource, but still getting the same error.
http://forum.videohelp.com/threads/322964-a-problem-opening-MKV-or-MP4-files
Anything else I can try so I can see exactly what filters I need to install?
StainlessS
11th November 2011, 19:32
I've read there's a Windows Update to resolve this, but only for Windows 2008 R2.
There is I think usually a sort of "Further Info" on updates, what does it say in that info, they usually give details of the actual problem, it may or may not be related.
t2nolan
15th November 2011, 09:12
I'm still not able to get this working. Here is the KB article on the Windows update StainlessS mentions (again it's 64 bit only).
http://support.microsoft.com/kb/2483177
I've also tried adding the Media Services role, but that doesn't add any of the MS mpeg filters or codecs.
I don't have to use DirectShow, I'm just looking for something that can open most video types. Has anyone gotten this to work on Windows Server 2003 or 2008 where the default codecs and filters are not setup?
StainlessS
15th November 2011, 10:21
Seems to be a consensus on the net that updating to more recent version of directx
sometimes helps, think server usually installs older versions of directx.
As it is likely that not too many people use server for avisnth, might be better to post
this problem on TechNet, they must have come across it before. Goodluck.
TheRyuu
15th November 2011, 22:46
No one seems to have stopped to ask "Why use DirectShowSource in the first place"?
Does AVISource or ffmpegsource not work? Sourcing through direct show either through DirectShowSource or dss2 should be the absolute last thing you try should everything else fail.
t2nolan
16th November 2011, 03:07
I'm definitely not apposed to using AviSource or ffmpegsource. I'm a developer but new to AviSynth, I'm just trying to get this server setup with similar drivers, filters, and codecs as my Windows 7 machine, so it can run the same scripts.
When I tried using AviSource and ffmpegsource, I got the same error. I was still using x264 to run the AVS script though, is that correct? I believe x264 is the issue here since Windows Server 2008 SP2 doesn't come with it, and I can't seem to get it to install (the update mentioned above is for R2 only). If I can just install filters and codes to the avisynth plugins folder and not rely on the OS at all, I'm all for it, I just need to know what to setup. I have the AVI_plugins_Compressed.rar from the general post area but I'm not sure which of the filters if any are relevant to this.
One thing I just thought of, I'm using "x264 core:115 r2008 4c552d8" from a Windows 7 machine (64 bit) on the Windows Server 2008 machine (32 bit). Is it possible that's a 64 bit executable, or that it's not compatible with the 32 bit OS? It does load images on the server, just not video which has led me to think it's codec or filter related. Or more likely that it's looking for 64 bit filters and codecs that don't exist? I'm trying the 32 bit x264 and ffdshow from here now: http://x264.nl/
AVS Script:
video0 = DirectShowSource("video0.avi", fps=30, pixel_type="RGB24", Audio=false)
video1 = DirectShowSource("video1.avi", fps=30, pixel_type="RGB24", Audio=false)
Dissolve(video0, video1, 30)
Command Line:
x264 test.avs -o test.mp4 --bframes 3 --ref 3 --vbv-maxrate 2500 --vbv-bufsize=25000 --level 40 --threads
TheRyuu
16th November 2011, 03:27
When I tried using AviSource and ffmpegsource, I got the same error.
ffmpegsource doesn't depend on anything on the users system (other than haali for certain things) and definitely doesn't throw errors about building directshow graphs... What happens if you remux to mkv?
t2nolan
16th November 2011, 04:23
I've reverted back to a clean snapshot, installed Media Services, DirectX, and then everything from http://x264.nl/ (including all of the 32 bit filters and codecs). I now get the below repective errors:
DirectShowSource:
[avi @ 02a70bc0] parser not found for codec pcm_u8, packets or times may be invalid.
AviSource:
avs [error]: AVISource: couldn't locate a decompressor for fourcc mjpg
FFmpegSource2:
avs [error]: Script error: there is no function named "ffindex"
(FFMS2.avsi, line 31)
For FFmpegSource2, I downloaded ffms2-2.16-avs-cplugin.7z from ffmpegsource google page, and added the contents to "C:\Program Files\AviSynth 2.5\plugins". I see a file named ffmsindex.exe, but the FFMMS2.avsi is looking for ffindex.exe?
Thank you for the help on this, these new errors are getting somewhere. That and the comments in the avsi file are hilarious!
vampiredom
16th November 2011, 05:11
but the FFMMS2.avsi is looking for ffindex.exe?
It is looking for ffms2.dll
AVISource: couldn't locate a decompressor for fourcc mjpg
Ah, well that says that you need an M-JPEG VfW codec. I don't know of any free ones, unfortunately, but the commercial ones fro Morgan and PICVideo are fairly popular, however.
You could also try opening the AVI files directly in VirtualDub (which has built-in MJPEG support) and then converting them to another codec, like Lagarith or Ut Lossless.
** EDIT **
I just remembered: You can use the Matrox MJPEG codec for free. The only pisser is that it installs several other codecs; the problem being that it installs Matrox's DV codec, which will take priority over whichever DV codec you have installed. You can change this in the Registry, of course, but the easiest way is to reinstall whatever DV codec you like (such as Cedocida) after installing the Matrox codecs.
http://www.matrox.com/video/en/support/windows/vfw_software_codecs/downloads/softwares/version1.0/ (http://www.matrox.com/video/en/support/windows/vfw_software_codecs/downloads/softwares/version1.0/)
TheRyuu
16th November 2011, 06:04
FFmpegSource2:
avs [error]: Script error: there is no function named "ffindex"
(FFMS2.avsi, line 31)
"Wanting" to use ffmpegsource doesn't mean that avisynth has magical abilities to conjure it out of thin air. Also the error message is pretty self explanatory as to what the problem is.
LoadPlugin("X:\path\to\ffms2.dll")
audio=ffaudiosource("X:\path\to\foo.mkv")
video=ffvideosource("X:\path\to\foo.mkv")
AudioDub(video,audio)
vampiredom
16th November 2011, 06:16
... doesn't mean that avisynth magical abilities to conjure it out of thin air
Yes, that does seem to be his problem. However, since FFMS2.avsi is being found and, according to what he said, the FFMS2 files are all in the root of "C:\Program Files\AviSynth 2.5\plugins" folder, shouldn't ffms2.dll be loaded automatically?
Perhaps there is some problematic / incompatible .dll in the plugins folder that is preventing others from autoloading. I have seen some things about that. This could be the root cause of the whole issue, no?
t2nolan
16th November 2011, 06:56
Yes I do have ffms2.dll here: C:\Program Files\AviSynth 2.5\plugins\ffms2.dll. I tried using LoadPlugin (below) but I still get the same error.
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\ffms2.dll")
video0 = ffmpegsource2("video0.avi", atrack=-1)
video1 = ffmpegsource2("video1.avi", atrack=-1)
clips = Dissolve(video0, video1, 30)
avs [error]: Script error: there is no function named "ffindex"
(FFMS2.avsi, line 31)
I also noticed my FFMS2.avsi doesn't have ffvideosource or ffaudiosource... I only downloaded ffms2-2.16-avs-cplugin.7z. I've been trying to search to find what I'm missing here so this post doesn't sound so newbie, but I haven't found it yet.
I also just downloaded Matrox MJPEG, going to give that a shot with AviSource in a minute here.
vampiredom
16th November 2011, 07:09
ffms2-2.16-avs-cplugin.7z
Ah, that's the deal! It's the C-plugin version. You'd need:
LoadCPlugin(X:\path\to\ffms2.dll")
However, you'd really just be best to use the regular version, so delete all the FFMS2 stuff from the plugins folder and download ffms-2.16.7z instead.
t2nolan
16th November 2011, 07:41
Great thanks for that, but now I'm getting the vague 'test.avs' didn't return a video clip'. when using ffms. Just before that I had installed the Matrox codecs. When trying to use AviSource now I still get the same "no decompressor for fourcc mjpg" error, but this time the command prompt also hangs. Is it possible the Matrox install overwrote the Haali codecs that ffms might be trying to use? I also noticed FFDshow comes with a nice configuration application where you can set what Encoders / Decoders are used. It looks like that might just be for setting ffdshow codecs though...
video0 = ffvideosource("video0.avi")
video1 = ffvideosource("video1.avi")
clips = Dissolve(video0, video1, 30)
avs [error]: `test.avs' didn't return a video clip
** Edit **
I just uninstalled the Matrox codecs, the command prompt isn't hanging anymore. That was actually happening after using any of the video sources. Still getting the avs [error]: `test.avs' didn't return a video clip though.
vampiredom
16th November 2011, 07:48
avs [error]: `test.avs' didn't return a video clip
Yes, because your script does not return any video! You need to return the clips variable:
video0 = ffvideosource("video0.avi")
video1 = ffvideosource("video1.avi")
clips = Dissolve(video0, video1, 30)
return clips
Or, more simply, just use the implied last variable:
video0 = ffvideosource("video0.avi")
video1 = ffvideosource("video1.avi")
Dissolve(video0, video1, 30)
t2nolan
16th November 2011, 08:18
Wow that was eye opening, thank you. What I've been testing here is a part of a bigger script, to simplify the actual issue at hand I only pasted in the relevant lines that were breaking. The last line of the actual script is FadeOut, which as I know now is returning the loaded clips that are in scope. I just read about that here (http://avisynth.org/mediawiki/Grammar).
So this is now working with ffvideosource! I'm getting the warnings below, but it's working. Thank you everyone for your help! I've learned a lot getting this to work to say the least. From what I've heard DirectShowSource should always be the last thing you attempt to use... Do you prefer ffvideosource over AviSource, or does it depend on the situation? Now that I've seen these errors, I'm thinking it would probably make sense to wrap a try catch around opening video and go through a hierarchy of source functions.
resize [warning]: converting from yuyv422 to yuv422p
resize [warning]: converting from yuv422p to yuv420p
[swscaler @ 02ac2ec0] full chroma interpolation for destination format 'yuv420p' not yet implemented
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile High, level 4.0
[swscaler @ 02b3aec0] full chroma interpolation for destination format 'yuv422p' not yet implemented
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.