View Full Version : Encoding using Directshow
broxburn
11th December 2012, 12:23
In a previous post, here:
http://forum.doom9.org/showthread.php?p=1604926#post1604926
Directshow meant for playback not for encoding.
If I use DirectShow in a script and open that script in VirtualDub, am I 'encoding with Directshow'?
My understanding was that the video is uncompressed and now I can select a codec and 'encode' the output.
Overdrive80
11th December 2012, 16:17
If I use DirectShow in a script and open that script in VirtualDub, am I 'encoding with Directshow'?
My understanding was that the video is uncompressed and now I can select a codec and 'encode' the output.
Nope, If you are loading a video using directshow, not exists encoding. The video loaded is that, isnt uncompressed. But you can select codec for encoding.
sneaker_ger
11th December 2012, 17:00
The problems with using DirectShowSource in AviSynth:
1.) DirectShowSource is not frame-accurate. This means that you may think you are for example trimming frames 400 - 500, but in reality it will trim 399 - 502. This can also be bad for 2-pass encodes
2.) if you are not building the graph yourself with GraphEdit, you cannot really be sure as to how the chain looks. This also makes it hard for others to help you fix problems, because just from the script they don't even know what filters you have installed
3.) some filters are meant for playback only. If the CPU is at 100%/playback is slower than real-time, they may choose to skip frames to "catch up"
Because of these reasons, people recommend only to use DirectShowSource() as a last resort. Use DGDecNV or ffms2 instead, if possible. (But ffms2 comes with it own problems, especially concerning TS and interlaced H.264)
fvisagie
11th December 2012, 21:15
and interlaced H.264)
Care to elaborate on that, please?
broxburn
11th December 2012, 21:16
Nope, If you are loading a video using directshow, not exists encoding. The video loaded is that, isnt uncompressed. But you can select codec for encoding.
So when I open a video using Directshow I am not encoding?
And that video (being passed to the likes of VirtualDub) is not uncompressed (I.E. it is compressed)
sneaker_ger
11th December 2012, 21:27
Care to elaborate on that, please?
I was referring to this (http://forum.doom9.org/showpost.php?p=1507010&postcount=1153).
sneaker_ger
11th December 2012, 21:30
So when I open a video using Directshow I am not encoding?
And that video (being passed to the likes of VirtualDub) is not uncompressed (I.E. it is compressed)
I don't know what exactly Overdrive80 is trying to say, but usually people talk about "encoding with DirectShow" when they mean using DirectShowSource() in AviSynth. In AviSynth only uncompressed video and audio is used.
The possibility to use the DirectShow framework (outside of AviSynth) for encoding does exist, but it is rarely used.
Overdrive80
12th December 2012, 00:33
I refer to the import a video using DirectShowSource does not generate any encoding, only decoding. Maybe, am I wrong???
Groucho2004
12th December 2012, 02:29
I refer to the import a video using DirectShowSource does not generate any encoding, only decoding. Maybe, am I wrong???
No, that's correct.
However, your first reply in this thread didn't make any sense.
Overdrive80
12th December 2012, 03:53
No, that's correct.
However, your first reply in this thread didn't make any sense.
Ok, I didnt explain properly. Sorry
fvisagie
12th December 2012, 07:35
I was referring to this (http://forum.doom9.org/showpost.php?p=1507010&postcount=1153).
Thanks.
broxburn
12th December 2012, 12:18
Yes or no, please.
1.Using Directshow in a script (that is being presented to the likes of VirtualDub) is not the same as 'encoding with directshow'.
2.Uncompressed video is being presented to VirtualDub.
3.Using directshow in (1) means that frame accurate editing may not be possible.
4.A graphedit file may be used to specify filters and that file can be used in an Avisynth script - but that still does not imply 'encoding'.
Thanks.
sneaker_ger
12th December 2012, 16:47
2. yes
3. correct
"encoding with directshow" can have different meanings, as explained above. Strictly speaking, if you put DirectShowSource() in an AviSynth script, the DirectShow part will only do the decoding of the source, not any encoding.
broxburn
13th December 2012, 16:55
Thanks to all who responded.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.