digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Directshowsource VS avisource? (http://www.digitalfaq.com/archives/avisynth/10399-avisynth-directshowsource-vs.html)

Little_Ghost 06-19-2004 04:19 PM

Avisynth: Directshowsource VS avisource?
 
hi,guys , i am a newbie to avisynth, actually i am a member of a chinese rmvb team.
As i noticed, that chinese rmvb teams really have a fever on directshowsource,say it supports most audio format.
But here as i know, your guys using the avisource the most

so just wondering abt these 2 guys.

Sorry abt my newbie question. I am really wanna learn sth here.

:roll: :roll:

Dialhot 06-19-2004 04:42 PM

The basis : Avisource uses the codec. Directshowsource uses the Direct shwo filters. On your PC, for a given format (let say a divx) you can have only the codec, the directshowfilter, or both.

Why is it better to use codec than directshow ? Because directshow works in chain of rendering and when you use one element of the chain you can't prevent the rest of the chain to be used also.

Because that you can't really control what is performed on your source (some DS filters can screw a lot the video, ffdshow for instance) and it is really not a good idea. Don't you prefer to control the things from A to Z ?

stephanV 06-20-2004 07:16 AM

there is no principle difference in using directshowsource or avisource, you wont get better video quality either way

the simplest chain for decoding an avifile would be "file source"-->"AVIsplitter"--->"audio/video decoder"--->"audio/video renderer"

this is the same for directshow or VFW.

a difference between them is that in directshow all sorts of other filters can be put in between this chain e.g. Morgan Stream Switcher (for multiple audio streams) or DirectVobSub (for subtitles). these things may or may not confilct with using avisynth

in principle you cant change this behaviour of directshow, however you can create your own graphs in graphedit and open them with avisynth i believe.

an advantage of directshow over VFW is that it does know how to handle things like multiple B-frames. so for an XviD encode you will never see the "B-frame decoder" lag message when using directshowsource. using directshowsource is also useful for opening stuff that you cant open with the normal "source"-commands (e.g. WMV, MP4 or MKV) so i wouldnt use it unless you have too. it still gives problems though as a lot of things that are supported in those format (e.g. variable framerate) arent supported by avisynth yet. (perhaps for 3.0)

as a last sidenote: theres nothing wrong with ffdshow, it messes with nothing unless you ask it too.

Dialhot 06-20-2004 10:24 AM

Quote:

Originally Posted by stephanV
so for an XviD encode you will never see the "B-frame decoder" lag message when using directshowsource.

I never have the message and I don't use directshow ;-).

This message is a problem in the koepies release of the codec while the old Nic's one never gave me any. For what we need to do (decode only), Nic's release is enought even if it is old now.

stephanV 06-20-2004 12:21 PM

well, then you use "packed bitstream" to encode or you don't use B-frames. this has got very little to do with which XviD-build you use, but more the inability of avi/VFW to store B-frames.

consider this frame sequence:

I B1 P1 B2 P2 B3 P3

to decode this properly P1 must be decoded before B1 as B1 refers to P1. i believe with directshow this is not an issue but with VFW it is.

therefor with packed bitstream on in XviD and in general in DivX frames are stored in the following way:

I [P1B1] [P2B2] [P3B3]

now all frames will be decoded in the right order and the decoder make sure the frames are shown in the right order.

note that packed bitstream is not MPEG4 compliant... at least people say so :)

Dialhot 06-20-2004 01:24 PM

Quote:

Originally Posted by stephanV
well, then you use "packed bitstream" to encode or you don't use B-frames. this has got very little to do with which XviD-build you use, but more the inability of avi/VFW to store B-frames.

I don't use anything to encode. I'm not stupid enought to encode in MPEG4 :-)

Read again my post, I say that we just need a axvid codec for READING and Nic's one read anything. I didn't have any problem yet (but things change for sure...).

Edit: no, I had one problem in fact ! A source that can't even be read in virtualdub and that I use via keopies directshow filter. Just like you said.

stephanV 06-20-2004 01:40 PM

Quote:

Originally Posted by Dialhot
I don't use anything to encode. I'm not stupid enought to encode in MPEG4 :-)

i guess im really stupid then... thx. this of course does raises the question how you get your hands on XviD material...

Quote:

Edit: no, I had one problem in fact ! A source that can't even be read in virtualdub and that I use via keopies directshow filter. Just like you said.
funny you can use a directshow filter in VDub since it is completely VFW based but im not sure what you mean with a "problem" here. the b-frame decoder lag messages only concerns a few frames before the first keyframe. but older builds of XviD have a tendency to break stuff as they are not really stable builds. in fact the only offical stable XviD-build is made by Koepi.

Dialhot 06-20-2004 03:53 PM

Quote:

Originally Posted by stephanV
i guess im really stupid then... thx.

Don't worry, it's not a lethal illness. And KVCD is the best medecine against that :-p

Quote:

this of course does raises the question how you get your hands on XviD material...
You suggest that is should be warez tthings ? More or less. They are US TV shows that I dl every weeks. I never hide that.

Quote:

funny you can use a directshow filter in VDub
No I used it in avisynth for sure. But before to install it I tried to use vdub on this source because avisource raised an error on it. And Vdub did the same : "can't decompress the frame - error -100". It seems that the latest xvid release suffer from this so than only be a new feature appeared in the encoder recently.

Quote:

but older builds of XviD have a tendency to break stuff as they are not really stable builds.
It's amazing how urban legend can still be on the road. Nic's release NEVER gave me any problem. And almost ALL recent updates from keopies were in the encoder. The decoder didn't change a lot since 2003 (date of last relase of Nic).

Quote:

in fact the only offical stable XviD-build is made by Koepi.
I don't see what is more stable in the 1.x version that was not in the 0.9 ones. The proof is that since this "stable" release came out, it was already updated twice :!: :-)

BTW, I stop the thread here. MPEG4 is not my cup of tea and this is not the place to discuss about it.


All times are GMT -5. The time now is 05:34 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.