View Full Version : XviD and AVISource versus DirectShowSource?
Matthew
10th March 2004, 05:24
Say I'm using CCE to convert an XviD avi to mpeg2 - video only, audio processed separately.
Will the following 2 scripts produce exactly the same result in terms of colour levels etc?
AVISource("H:\rock\rock.avi",false)
BilinearResize(720,428)
AddBorders(0,74,0,74)
DirectShowSource("H:\rock\rock.avi",fps=25,audio=false)
BilinearResize(720,428)
AddBorders(0,74,0,74)
With AVISource, but not DirectShowSource, I'm getting a crash when CCE exits, so I'd like to use the latter in future.
Thanks :)
celtic_druid
10th March 2004, 06:24
Well assuming a current or recent build the dshow decoder would be outputting YUY2 and the vfw YV12. Perhaps this is the problem?
What happens if you add converttoYUY2() to your first script?
Matthew
10th March 2004, 06:32
Thanks for the reply.
I just added converttoYUY2() to the AVISource script and CCE still crashed on exit.
Mug Funky
10th March 2004, 09:05
just as a sanity check, make sure avisource isn't serving up an audio stream (regardless of the "false" line). it's possible you'll have to put explicitly "audio = false" in the avisource line as well.
but CCE is finicky like you wouldn't believe, so i wouldn't be surprised if this doesn't work either.
aklendathu
10th March 2004, 10:20
Originally posted by Matthew
DirectShowSource("H:\rock\rock.avi",fps=25,audio=false)
BilinearResize(720,428)
AddBorders(0,74,0,74)
I have a bad experience with DirectShowSource for reading files into AVISynth, with 2-pass VBR MPEG-2 encoding, because I always end up with a/v sync problems. Could your CCE crash problems be XVID-related ? Does the file have any bad/corrupted frames ? You could also try demuxing your AVI into separate video and audio files and process only the video file with CCE.
Maybe this would help...
Matthew
10th March 2004, 23:22
Thanks for the replies.
@Mug Funky, I just tried adding "audio=false"...no good. Before posting I also tried remuxing the avi with a wave file (something CCE should have no problem with), still no luck.
@aklendathu, haven't really tried DirectShowSource except on a few min sample. This post was about asking first trying later :D I did read via the search about a/v sync issues but they seemed to be audio related, and that is a non-issue as I'd never let avisynth deal with the audio.
Should clarify that the crash happens with all the (few) xvids I've tried. It doesn't happen during encoding, rather only when I click the exit button after encoding. As I'm encoding as part of a batch file though the error on exit prevents the batch file from proceeding (I have a simple taskkill workaround for this problem but would prefer to not use it).
So really want I want to know is if I use DirectShowSource will the colours, quality (including bad frames) etc for video be the same as with AVISource? Audio is a non-issue.
aklendathu
11th March 2004, 10:31
Originally posted by Matthew
So really want I want to know is if I use DirectShowSource will the colours, quality (including bad frames) etc for video be the same as with AVISource? Audio is a non-issue.
I believe video quality will be the same (you can test this with a small clip). However, I would not discount a/v sync problems even though you're processing audio separately from video. True, my problems with DirectShowSource have always arisen from non-AVI media (MPEG-1, WMV) because then I can't use AVISource, but my feeling is that they may also happen with AVI files. And, I've also tried processing audio and video separately, without any luck. In my case I always ended up having to convert the media to AVI first using a lossless codec and then re-encoding that AVI file to MPEG-2 using AVISource.
As for your codec troubles, you may try to use either 3ivX or DivX 5.1.1 codecs to decode your video (make sure you uninstall XviD first). They can also decode XviD content and may be more stable on your system.
Matthew
12th March 2004, 03:59
mmmm...maybe I'll take the lazy approach and stick with my taskkill workaround then =) I encoded 2 xvid files (2 pass VBR) yesterday and no problems the workaround didn't take care of.
ppera2
12th March 2004, 16:38
Just to note that if you have installed ffdshow then DirsctShowSource will use it with it's settings.
AVIsource will use XviD decoder, or DivX 4-5, depending on FourCC tag.
And I think that by AVIsource no postprocessing.
shae
30th July 2008, 21:21
Is the recommendation to use AviSource whenever possible because of potential A/V sync issues after seeking?
One thing DirectShowSource does better (for me) is seeking (on no packed bitstream). DSS() gives the right frame while AS() is delayed so it's difficult to know where you really are.
IanB
31st July 2008, 00:29
Yes the VfW system absolutely requires packed bitstreams for encodings containing B frames.
This is why we provide alternate input filters, none cover all the bases. The Direct Show API is intended for writing Player applications, we have written a frame serving implementation and some times it kicks and screams like a spoilt child, some times it can be Mothers little angel (and all on the same file ;) ).
shae
1st August 2008, 23:21
DShow being for players only, was that Microsoft's intention? I thought it was supposed to completely replaced VfW.
What kind of problems are there with DirectShowSource()?
In which cases does it work flawlessly and in which does it not?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.