View Full Version : Cannot Open MP4 with DirectShowSource
mel2000
1st May 2016, 17:02
Windows 10 Home/x64
Avisynth+ (x86/x64)
VirtualDub 1.10.4 (x86/x64)
Just installed Avisynth+ (x86/x64) but cannot open MP4 or MKV files with DirectShowSource in VirtualDub 32 or 64 bit. VirtualDub throws an error. Can open AVI with DirectShowSource in both. I can play the video file in Windows Media Player. Am I missing a plugin? Any help appreciated. Thanks.
************* VirtualDub error *************
(for audio and video):
"DirectShowSource: couldn't open file..."
"Cannot play back the file. The format is not supported."
************* AVS file *********************
DirectShowSource("C:\Users\M\Videos\gizmo.mp4", fps=30.00, audio=true)
Normalize(0.90)
sneaker_ger
1st May 2016, 17:17
You need to have apprioriate DirectShow filters for the formats you want to open, e.g. LAV filters (http://forum.doom9.org/showthread.php?t=156191). Alternatively you can use AviSynth source plugins with integrated demuxing and decoding like l-smash works (http://forum.doom9.org/showthread.php?t=167435) or ffms2 (http://forum.doom9.org/showthread.php?t=127037).
mel2000
1st May 2016, 19:12
Thank you so much for your prompt reply sneaker_ger. I'm going to look up your resources right now. Hope they're compatible with x64.
mel2000
1st May 2016, 19:48
OK, just installed the LAV filters and didn't do any LAV configurations. While VirtualDub can now open the MP4 AVS, I hear audio but see a blackened video screen (see attached pics). Still need more help to troubleshoot what I'm missing. Thanks.
Before PLAY button
http://i.imgur.com/1XdDhbt.jpg
After PLAY button
http://i.imgur.com/GEAkImj.jpg
FranceBB
1st May 2016, 21:46
Just install the k-lite codec pack (mega). It will install several codecs for you. Then try again; it should work.
P.s since .mp4 is a container, we don't know which kind of video you want to open; it's better to specify the codec used (video and audio). Besides, if you are planning to use avisynth plugins, it's better to install the latest .Net and C++ Redistributable
Groucho2004
1st May 2016, 22:49
Just install the k-lite codec pack (mega). It will install several codecs for you.
What horrible advice. These codec packs are well known to render a working system to a fubar state.
Codecs/filters should be added as needed.
Besides, if you are planning to use avisynth plugins, it's better to install the latest .Net and C++ RedistributableBesides being vague since there are many versions of those, which Avisynth plugin requires .NET?
Groucho2004
1st May 2016, 22:56
OK, just installed the LAV filters and didn't do any LAV configurations. While VirtualDub can now open the MP4 AVS, I hear audio but see a blackened video screen (see attached pics). Still need more help to troubleshoot what I'm missing. Thanks.
Avoid DSS, it should only be used if everything else fails.
I second sneaker_ger's suggestion using lsmash or ffms2. You'll find documentation for these here (http://avisynth.nl/index.php/LSMASHSource/LWLibavVideoSource) and here (http://avisynth.nl/index.php/FFMS2).
If you still have trouble, post a Mediainfo report of your source.
mel2000
2nd May 2016, 07:26
Thanks for all replies. The mp4 container consists of AVC/AAC file formats.
I uninstalled LAV Filters 0.68 and tried installing FFmpegSource 2.22 instead. However, it extracts to a folder with several files and the ffmsindex.exe is not executable. Where shoukd the folder be placed to be recognized by VirtualDub? The FFmpegSource2 User Manual page offered no help there.
My Avisynth+ install folder has four plugins folders.
plugins
plugins+
plugins64
plugins64+
The ffms2.22 extract has four folders and a file.
doc
include
x64
x86
FFMS2.avsi (file)
Since I have VirtualDub x86 and x64 on my system, and since Avisynth+ is installed as x64 on my 64-bit system I want to be careful where I place things. Would it be OK to drop the entire ffms2.22 folder into the windows/system32 directory? Thanks.
Groucho2004
2nd May 2016, 08:44
I uninstalled LAV Filters 0.68 and tried installing FFmpegSource 2.22 instead. However, it extracts to a folder with several files and the ffmsindex.exe is not executable. Where shoukd the folder be placed to be recognized by VirtualDub? The FFmpegSource2 User Manual page offered no help there.
My Avisynth+ install folder has four plugins folders.
plugins
plugins+
plugins64
plugins64+
The ffms2.22 extract has four folders and a file.
doc
include
x64
x86
FFMS2.avsi (file)
Since I have VirtualDub x86 and x64 on my system, and since Avisynth+ is installed as x64 on my 64-bit system I want to be careful where I place things. Would it be OK to drop the entire ffms2.22 folder into the windows/system32 directory? Thanks.
- ffms2.dll from the x64 directory goes into plugins64 or plugins64+
- ffms2.dll from the x86 directory goes into plugins or plugins+
Your script should be something like this:
v = FFVideoSource("C:\Users\M\Videos\gizmo.mp4", threads = 1)
a = FFAudioSource("C:\Users\M\Videos\gizmo.mp4").Normalize(0.90)
AudioDub(v, a)
mel2000
2nd May 2016, 21:34
Thanks Groucho2004, your instruction worked perfectly for both 32/64 VirtualDub apps. However, DirectShowSource still isn't working and that's what most of my old scripts are written in. I'd still like a solution for that.
Groucho2004
2nd May 2016, 21:49
Thanks Groucho2004, your instruction worked perfectly for both 32/64 VirtualDub apps. However, DirectShowSource still isn't working and that's what most of my old scripts are written in. I'd still like a solution for that.
DSS works fine with LAV filters so I'm guessing it's either the LAV configuration or your source needs additional parameters in the DSS call like "pixel_type".
I'm neither very familiar with DSS nor LAV filters. I suggest you post in the LAV filters thread or maybe someone else can provide more help here. Either way, post a Mediainfo report as I already asked you.
mel2000
3rd May 2016, 03:08
...post a Mediainfo report as I already asked you.
Sorry for the omission.
General
Complete name : C:\Users\M\Videos\gizmo.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42 (mp42/isom/avc1)
File size : 375 KiB
Duration : 5s 568ms
Overall bit rate mode : Variable
Overall bit rate : 551 Kbps
Encoded date : UTC 2010-03-20 21:29:11
Tagged date : UTC 2010-03-20 21:29:12
Writing application : HandBrake 0.9.4 2009112300
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L3
Format settings, CABAC : No
Format settings, ReFrames : 2 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 5s 533ms
Bit rate : 466 Kbps
Width : 560 pixels
Height : 320 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.087
Stream size : 315 KiB (84%)
Writing library : x264 core 79
Encoding settings : cabac=0 / ref=2 / deblock=1:0:0 / analyse=0x1:0x111 /
me=umh / subme=6 / psy=1 / psy_rd=1.0:0.0 /
mixed_ref=1 / me_range=16 / chroma_me=1 /
trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 /
chroma_qp_offset=-2 / threads=6 / nr=0 /
decimate=1 / mbaff=0 / constrained_intra=0 /
bframes=0 / wpredp=0 / keyint=300 / keyint_min=30 /
scenecut=40 / rc_lookahead=40 / rc=crf / mbtree=1 /
crf=20.0 / qcomp=0.60 / qpmin=10 / qpmax=51 /
qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date : UTC 2010-03-20 21:29:11
Tagged date : UTC 2010-03-20 21:29:12
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 5s 568ms
Bit rate mode : Variable
Bit rate : 83.1 Kbps
Maximum bit rate : 91.6 Kbps
Channel(s) : 1 channel
Channel positions : Front: C
Sampling rate : 48.0 KHz
Frame rate : 46.875 fps (1024 spf)
Compression mode : Lossy
Stream size : 56.4 KiB (15%)
Title : Stereo
Language : English
Encoded date : UTC 2010-03-20 21:29:11
Tagged date : UTC 2010-03-20 21:29:12
Groucho2004
3rd May 2016, 08:53
There's nothing special about that clip. DSS with LAV filters should be no problem.
I see you already posted this in the LAV thread so let's see how that goes.
sneaker_ger
3rd May 2016, 10:14
Open the mp4 file in GraphStudioNext (https://drive.google.com/folderview?id=0Bwvr5qdpKXBxQUlBbWk0ZzJPRjA&usp=drive_web#list) and make a screenshot of the graph that's created. It should have LAV Splitter + LAV Video + LAV Audio. If not you may have to set the LAV filters to preferred using Codec Tweak Tool (http://www.codecguide.com/download_other.htm#codectweaktool).
mel2000
4th May 2016, 11:52
Thanks for the recommendation sneaker_ger. The graph doesn't mention LAV so I think using the tweaker tool is next? Will setting LAV to preferred do any harm to MP4 rendering in Windows Media Player or MPCHC?
http://i.imgur.com/KWzEsTb.jpg
sneaker_ger
4th May 2016, 12:41
Well, LAV will be preferred instead of the Microsoft filters. I wouldn't exactly call that "harmful".
mel2000
4th May 2016, 15:05
Well, LAV will be preferred instead of the Microsoft filters. I wouldn't exactly call that "harmful".
OK thanks. I'm looking at the Codec Tweak Tool now and under the "Preferred splitters" button I applied all the default LAV options. Unfortunately the results in VirtualDub are the same for x86/x64.
However, I used graphstudionext again and LAV still isn't being used. What am I doing wrong?
sneaker_ger
4th May 2016, 17:29
On the bottom left there's also "Preferred decoders".
mel2000
4th May 2016, 20:59
On the bottom left there's also "Preferred decoders".
Yes, I saw that but was hesitant to touch it without more guidance.
Halleulah! That worked on VirtualDub x32/x64. I set all the preferred decoders to either the default or recommended options.
Thanks so much sneaker_ger. And thanks to Groucho2004 for the LAV filters guidance. And thanks to everyone for their patience and help with getting VirtualDub and Avisynth+ to work on my 64-bit Windows 10.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.