Log in

View Full Version : Weird issue with DirectShowSource


abyss616
17th September 2013, 03:04
I've used basically the same avisynth script for the last several years now with no problems but recently I've started to experience some issues.

I use DirectShowSource to load my clip (a TS file that I've dumped from my DVR) in my script and do my editing in VirtualDub. After each edit (of which there are many), the video has a brief "speed up" then goes back to normal - this is evident when I'm editing in VDub and in the final product. I've also noticed that when I use the right arrow to scan through the clip in VDub, it goes at about half speed instead of the usual 1x.

This does NOT happen when I use DSS2 (after demuxing the TS file and remuxing the video into an MKV container), but since it takes much longer using this method, I'd rather just use DirectShowSource like I've always done.

It's possible that something has changed in the time between when it worked and now (when it doesn't) but I can't think of what it could be.

I've uploaded a sample to show you what I'm talking about.

http://www.megafileupload.com/en/file/451698/Sample-avi.html

Sample script:
DirectShowSource (has issues)
DirectShowSource("J:\Navy01-Indiana.TS")

DSS2 (no issues, but is slower)
v=DSS2("J:\Navy01-Indiana.track_4113.mkv", fps=59.9401)
a=NicAC3Source("J:\Navy01-Indiana.track_4352.ac3")
AudioDub(v,a)

Gavino
17th September 2013, 09:40
It's possible that something has changed in the time between when it worked and now (when it doesn't) but I can't think of what it could be.
DirectShowSource uses the DirectShow codecs and splitters installed on your system. Have you installed any new ones recently (perhaps indirectly, by installing a media-related application)?

abyss616
17th September 2013, 14:01
DirectShowSource uses the DirectShow codecs and splitters installed on your system. Have you installed any new ones recently (perhaps indirectly, by installing a media-related application)?
I want to say there might have been something that was installed for some reason (can't remember the name), but I have since uninstalled it. I also uninstalled ffdshow completely so that DirectShowSource wouldn't work and reinstalled it, but no luck.

StainlessS
17th September 2013, 18:26
Would loading into GraphEdit help in this situation to establish what is being used ?

abyss616
18th September 2013, 00:38
Would loading into GraphEdit help in this situation to establish what is being used ?
A raw transport file is: file.ts > Microsoft DTV-DVD Video Decoder > Video Renderer. If I load my avs file in GraphEdit it's: file.ts > AVI Decompressor > Video Renderer

Sparktank
18th September 2013, 02:15
(a TS file that I've dumped from my DVR)

I've uploaded a sample to show you what I'm talking about.

http://www.megafileupload.com/en/file/451698/Sample-avi.html

Sample script:
DirectShowSource (has issues)
DirectShowSource("J:\Navy01-Indiana.TS")

DSS2 (no issues, but is slower)
v=DSS2("J:\Navy01-Indiana.track_4113.mkv", fps=59.9401)
a=NicAC3Source("J:\Navy01-Indiana.track_4352.ac3")
AudioDub(v,a)

The sample you uploaded, is that the a sample of the original source video or is it a sample of the final encoded video?

It (the uploaded sample) is internally XVID, so maybe disabling Microsofts decoders (using Codec Tweak Tool (http://www.videohelp.com/tools/Codec-Tweak-Tool)) and switch the decoders for Xvid to be handled by LAV Video (with any HW Acceleration enabled, where appropriate) would yield better results.

Also, while you have it remuxed into an Matroska container, have you tried alternatives like indexing the MKV with FFMS2?

abyss616
18th September 2013, 02:52
The sample you uploaded, is that the a sample of the original source video or is it a sample of the final encoded video?

It (the uploaded sample) is internally XVID, so maybe disabling Microsofts decoders (using Codec Tweak Tool (http://www.videohelp.com/tools/Codec-Tweak-Tool)) and switch the decoders for Xvid to be handled by LAV Video (with any HW Acceleration enabled, where appropriate) would yield better results.

Also, while you have it remuxed into an Matroska container, have you tried alternatives like indexing the MKV with FFMS2?
The sample is the edited video, but the codec used is immaterial - I get the same result whether I use Lagarith, Xvid or x264, plus I see the speed-up when I scan through the video in VirtualDub.

I have used FFVideoSource to load clips before without success - when I hit a dropped frame or error in the stream, I get the "Insanity" error and the video crashes and becomes unusable in VirtualDub. It is faster than DSS2 and I don't seem to get the speed-up error like with DirectShowSource.

Sparktank
18th September 2013, 03:59
I don't see a point in uploading the edited video then.
The output codec is immaterial, the input codec is very relevant as it's depending on DirectShowSource.

The issue is concerning the source material; not the finished product.

So what the others have said, using GraphEdit to determine what is handling the source video would help in knowing what's going on.
Ignore throwing the AVS script into the GraphEdit and focus on what's decoding the .ts file (which seems to be "Microsoft DTV-DVD Video Decoder", post #5).

Use Codec Tweak Tool to switch the priority of what handles the source video (which I can only assume is an MPEG video).

Try using LAV Splitter for the .ts splitter and LAV Video for the MPEG-2 decoding.
Keeping it as "use merit" will probably default to Microsoft each time.
You can also use CTT to disable all of Micrsoft's decoders (MS Codec Tweaks; there's even a Help to read about what goes on when they are used/disabled -- I disable all of them).
I don't know if Microsoft decoders have any Harware Acceleration like LAV or FFDShow (if it it's all relevant to your system; which has not yet been ascertained).

Your edited video has a lot of combing in it too so probably using something DGdecNV (or the free DGMPGDec; if it it's all relevant to your system; which has not yet been ascertained) would be more appropriate to index and then add in any deinterlacing/ivtc plugins/scripts via AviSynth instead of letting VirtualDub handle the interlacing/telecine-ing (*telecining?).

abyss616
18th September 2013, 04:13
I don't see a point in uploading the edited video then.
The output codec is immaterial, the input codec is very relevant as it's depending on DirectShowSource.

The issue is concerning the source material; not the finished product.

So what the others have said, using GraphEdit to determine what is handling the source video would help in knowing what's going on.
Ignore throwing the AVS script into the GraphEdit and focus on what's decoding the .ts file (which seems to be "Microsoft DTV-DVD Video Decoder", post #5).

Use Codec Tweak Tool to switch the priority of what handles the source video (which I can only assume is an MPEG video).

Try using LAV Splitter for the .ts splitter and LAV Video for the MPEG-2 decoding.
Keeping it as "use merit" will probably default to Microsoft each time.
You can also use CTT to disable all of Micrsoft's decoders (MS Codec Tweaks; there's even a Help to read about what goes on when they are used/disabled -- I disable all of them).
I don't know if Microsoft decoders have any Harware Acceleration like LAV or FFDShow (if it it's all relevant to your system; which has not yet been ascertained).

Your edited video has a lot of combing in it too so probably using something DGdecNV (or the free DGMPGDec; if it it's all relevant to your system; which has not yet been ascertained) would be more appropriate to index and then add in any deinterlacing/ivtc plugins/scripts via AviSynth instead of letting VirtualDub handle the interlacing/telecine-ing (*telecining?).
Quickly, as I don't have a lot of time - I'll pour over what you posted a little later.

The uploaded video was to show what I was talking about so you had a visual on the "speed-up" I was referring to - nothing more, nothing less. I get that "speed-up" effect no matter the codec I use for the final product.

The combing is intentional - the video is 720p source material that will eventually be converted to DVD format. I use SeparateFields/SelectEvery/Weave to have it smoothly converted to 29.97 fps.