Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th September 2013, 03:04   #1  |  Link
abyss616
Registered User
 
Join Date: Dec 2008
Posts: 99
Weird issue with DirectShowSource

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)
abyss616 is offline   Reply With Quote
Old 17th September 2013, 09:40   #2  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by abyss616 View Post
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)?
__________________
GScript and GRunT - complex Avisynth scripting made easier

Last edited by Gavino; 17th September 2013 at 10:30.
Gavino is offline   Reply With Quote
Old 17th September 2013, 14:01   #3  |  Link
abyss616
Registered User
 
Join Date: Dec 2008
Posts: 99
Quote:
Originally Posted by Gavino View Post
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.
abyss616 is offline   Reply With Quote
Old 17th September 2013, 18:26   #4  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Would loading into GraphEdit help in this situation to establish what is being used ?
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 18th September 2013, 00:38   #5  |  Link
abyss616
Registered User
 
Join Date: Dec 2008
Posts: 99
Quote:
Originally Posted by StainlessS View Post
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
abyss616 is offline   Reply With Quote
Old 18th September 2013, 02:15   #6  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 940
Quote:
Originally Posted by abyss616 View Post
(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) 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?
__________________
Win10 (x64) build 19041
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
Sparktank is offline   Reply With Quote
Old 18th September 2013, 02:52   #7  |  Link
abyss616
Registered User
 
Join Date: Dec 2008
Posts: 99
Quote:
Originally Posted by Sparktank View Post
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) 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.
abyss616 is offline   Reply With Quote
Old 18th September 2013, 03:59   #8  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 940
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?).
__________________
Win10 (x64) build 19041
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
Sparktank is offline   Reply With Quote
Old 18th September 2013, 04:13   #9  |  Link
abyss616
Registered User
 
Join Date: Dec 2008
Posts: 99
Quote:
Originally Posted by Sparktank View Post
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.
abyss616 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:02.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.