|
|
| squid_80 |
| Posted: Jan 21 2008, 02:44 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 594
Member No.: 13813
Joined: 22-January 05

|
| QUOTE (phaeron @ Jan 10 2008, 09:00 PM) | | There are also some stupidities in the filter interfaces, the dumbest one being that Microsoft didn't provide an implementation of MemAllocator that you can CoCreateInstance() -- it's baked into the static library and every library has it compiled in. |
What about {1E651CC0-B199-11D0-8212-00C04FC32C45} - Memory Allocator (or CLSID_MemoryAllocator as it's known to the base classes)? It's in quartz.dll and CBaseOutputPin uses CoCreateInstance to get it.
Re ffdshow pushing out the frames in the wrong order: when using the files written out by my virtualdub-mkv build that's actually what I'd expect since the timestamps are wrong. And with regards to setting cbBuffers to 1, I'm having a similar problem at the moment with a transform filter I'm working on; if I set cbBuffers to anything over 1 (in DecideBufferSize), the allocator happily agrees (I do check pActual upon return) but if I try and get a second buffer GetBuffer() blocks until the first has been released. I tried making the output pin use its own allocator instead of the connecting filter's (using CLSID_MemoryAllocator) and it still does the same thing.
EDIT: It's not blocking, the transform function that writes the samples out is just going very slow. Is this something to do with the allocator using VirtualAlloc to get the memory for the samples? |
 |
| phaeron |
| Posted: Jan 21 2008, 10:48 PM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
| QUOTE | What about {1E651CC0-B199-11D0-8212-00C04FC32C45} - Memory Allocator (or CLSID_MemoryAllocator as it's known to the base classes)? It's in quartz.dll and CBaseOutputPin uses CoCreateInstance to get it.
|
Oooooh.... I didn't even know about that. That helps a little bit.
| QUOTE | Re ffdshow pushing out the frames in the wrong order: when using the files written out by my virtualdub-mkv build that's actually what I'd expect since the timestamps are wrong.
|
Yeah, but the problem is that in the video player it still works. The golden rule for video compatibility in Windows is that if it plays in Windows Media Player, the user sees it as a bug your program. 
| QUOTE | EDIT: It's not blocking, the transform function that writes the samples out is just going very slow. Is this something to do with the allocator using VirtualAlloc to get the memory for the samples?
|
Shouldn't be. All buffers are supposed to be allocated once when the allocator is committed, and never while the graph is running. In any case, VirtualAlloc() is nowhere near that slow, even despite all the page map whacking it has to do.
|
 |
| edtam |
| Posted: Feb 2 2008, 03:42 PM |
 |
|
Newbie

Group: Members
Posts: 3
Member No.: 22629
Joined: 17-December 07

|
Really a plugin I long for, so my deep thanks . The discussion is quite technical here that I don't want to spoil the atmosphere, is it ok to raise the issue encountered when using this filter? |
 |
| trodas |
Posted: Feb 2 2008, 05:46 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07

|
Whoa! Choosing this plugin when opening the file practically allow me to import into VDub everything I can play on my machine "as it is", witch is simply fantastic stuff! Thank you very much, phaeron!
I immediatelly (till I figured that I have to choose the DirectShow imput in the drop-down file-type menu in the Open File dialog) tried this plugin to the cursed WMV file I having problems with (damn WMA v2 - tag 0161) and it worked w/o a glitch! Whoooo...!
The lenght of the original is 5:19 and now encoded when imported with the DirectShow plugin it is 7:59 and the video end just like it should, at 5:19 and then then audio continue to 7.59. The original file I import is there: http://www.megaupload.com/?d=ALLLTOS7 ...and all I did with it is cropping X1 = 17, X2 = 6 and then resize to 456x314 pixels + save with Xvid encode. Full re-encode using Lame and 96kBi CBR stereo at 32k ... wait a minute, the imput is 48kHz and that perhaps could explain why the audio was prolonged! Now I try re-encode with 48kHz and 128kBi... worked just great. So, next time I should not forget downsample the audio, when I decide to use 32kHz Lame settings  Testing that.
And before it compress, I have to notice small audio glitch in the video imported with the DirectShow never the less - some audio clicks are there present. Do this happen with the sample file to you, too?
Tested that with downsample to 32kHz and then choosing the lame 32k option it produce good result  (except for the audio clicks, but I already got the audio in no-clock quality - there IS one major one, but only one click in the original, tough - at 3:30 ... there is many small one, tough, but they are really small, almost unnoticable, but after the DirectShow input they are much louder...)
PS. I enjoy reading about the "joys" of Winblows programming, even I'm not a programmer. I think Bill drag us all like 20 years back and we still has not get rid of the winblows... Neverless keep up the good work, guys.
-------------------- "It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire ...just keep folding, just keep folding... :) my config - my caps |
 |
| phaeron |
| Posted: Feb 2 2008, 09:24 PM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
Yeah, go ahead and post issues here. I've seen the audio glitching, and I think it happens because DirectShow decoders don't generally go to great efforts to try to avoid them on seek. The DirectShow plugin tries to play through whenever it can, but whenever audio is requested that's not near the current position, it's forced to reseek and that's where you get the glitch. For some reason, I think the reseek is happening more often than it should.
Unfortunately, I don't have much time to work on this at the moment, but go ahead and log the issues, because I want to get back to it at some point. |
 |
| trodas |
Posted: Feb 3 2008, 08:10 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07

|
Be sure I will 
| QUOTE | | audio glitching, and I think it happens because DirectShow decoders don't generally go to great efforts to try to avoid them on seek |
Now this is something I can confirm. Let me introduce you to my problem, not exactly much related to VirtualDub itself, but sure to the DirectShow stuff AND audio. Hence now somewhat related to VDub itself, ot at least this plugin AND audio. Long time ago I decided to upgrade my speakers. It was when Matrix Reloaded was released and I realized my own homemade apm + speakers are simply not enought. They can't handle the extremly low-frequency effects designed for subwoofers to "shake your world and body" combined with the music. The fight scene with many copy's of Agent Smith verzus Neo was shiny example of my speakers inequality - beside every friend visiting me was constantly asking where I bought them, because they play, well... very well  So, to make some use of my SoundBlaster Live! 5.1 output I choosen a Genius SW-5.1 wooden speakers, because they sound damn good (with some modifications, better opamps, cables and stuff). Now the best AC3 decode was a AC3 filter. It sound damn good, however there also come the price. Every time I pause ANY movie using ANY player (Mplayer, Mplayer Classic, BSplay, SoubtitleWorkshop DS preview play, etc) and then quickly unpause it, it sometimes swap random channels. And believe me, hearing subwoofer efect from mid speaker and speaking of actors thru the subwoofer is not exactly exciting... It was also (SB Live! 5.1) not capable of 24 bit output.
To fix this ughly pause bug and get 24bit, I go and bought Audigy soundcard. Later are revealed that the Audigy is not exactly 24bit at all and my ears kinda relalized it anyway. And futhermore, not only the quality of sound did not improve over SB Live! 5.1, but the pause bug become more frequent and it add a whole new trick. Most times the "channel swap" was not enought. Now it mostly push hi-volume noise into most or all channels...! Believe me, suddently hearing high volume noise from all the 6 channels will make you jump 
To get true 24bit output AND get rid of the pause bug I bought later an Audigy 2 ZS card (after checking and realizing the simply Audigy 2 card witch friend has with same speakers, did not improve much of the sound), but the pause bug did not disappeared at all. That make me kinda furious and angry.
Yet about year and half back I invested again into Creative crap and bought a full-featured X-Fi Fatal1ty for enhancing my BF2 play experience and eventualy geting rid of the pause bug. That was likely the last time I bought anything from Creative. Not only I have to mod drivers to work/install on Win2k a bit, but they also suxx and the pausebug is still here. I managed to get rid of it for some month or so, after I replace some major caps on the X-Fi, but as the other caps aging (and they are bad brand of caps also - something that is hard to believe in a $260 pricetag at the buy time product) I get the pause bug yet again.
So there you have proof, that Direct Show decoders seeking could be a problem, when using 5.1 output with 24bit AC3 filter settings and quickly do many random pause/unpause of a AC3/DTS movie.
It (the pause bug) travel with me on many different mainboards/CPUs and happen even in completelly new mobos - and even now, when I have mobo with all good caps and completely recapped PSU. I planing to get rid of it by complete X-Fi recapp + add enhanced and brutal PCI voltage filtering for the X-Fi + shielding the X-Fi. Currently I replaced - as good example how desperate I'm to fix this bug that is hunting me for years and years - the original crappy 220uF 16V Jamicon (known bad cap brand! - http://img48.imageshack.us/img48/4489/fail...nxfiragguc3.jpg ) that is filtering the 1.25V for the main X-Fi chip with a super-hi-quality solid polymer Sanyo Os-con SEPC 820uF 2,5V - http://img512.imageshack.us/img512/6842/os...nsepcxfidk6.jpg ) just to realize that the results are WORSER that using Panny FM 470uF 16V cap, because the polymers are usefull only into very hi-frequency regulators, witch is not the case of the used voltage regulator on the X-Fi... So next try will be probably a 1000uF Samxon GC cap  I also tried to bypass the cap with another cap, a small ceramic one, in parallel to filter the woltage better, but it looks like that this is necessary to do just UNDER the X-Fi chip, so the resistance of the PCB traces before the voltage reach the chip serve as protection against unwanted oscilators of the regulator...
It is not easy stuff, you see
-------------------- "It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire ...just keep folding, just keep folding... :) my config - my caps |
 |
| phaeron |
| Posted: Feb 4 2008, 07:18 AM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
No fix for the audio glitching or timestamp issues, but I've fixed the 1.8.0 filter preview problem. Scroll up to the top for 0.4.... |
 |
| olnima |
| Posted: Feb 4 2008, 12:21 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 204
Member No.: 17204
Joined: 12-November 05

|
Pleeeeaaaase update the version-nr. in the topic-title, thanks,
Olnima |
 |
| trodas |
Posted: Feb 4 2008, 11:55 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07

|
Blah Not really need, besides IIRC Invision Board did not allow edit this easily. You have to go into the PHP my Admin and change it in the IB_topics  Waste of time.
And thanks, phaeron, the preview not works in VDub 1.8-pre (strange, the plugin size is same, but it works!)
-------------------- "It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire ...just keep folding, just keep folding... :) my config - my caps |
 |
| phaeron |
| Posted: Feb 5 2008, 04:53 AM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
Not works or now works?
The plugin size is the same because the linker rounds the DLL up to a multiple of 4K. |
 |
| Gromozeka |
| Posted: Feb 5 2008, 08:36 AM |
 |
|
Unregistered

|
| QUOTE (phaeron @ Feb 5 2008, 04:53 AM) | Not works or now works?
The plugin size is the same because the linker rounds the DLL up to a multiple of 4K. | Preview in directshowplugin 0.4 not works now |
 |
| trodas |
| Posted: Feb 6 2008, 10:17 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07

|
phaeron - yes, for me it works w/o a glitch.
Gromozeka - try with VDub 1.8
-------------------- "It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire ...just keep folding, just keep folding... :) my config - my caps |
 |
| olnima |
| Posted: Feb 6 2008, 03:06 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 204
Member No.: 17204
Joined: 12-November 05

|
Is an input-filter like *.* missing in directshow-input-driver? When I choose it I can't select any file unless I opend a file in "normal"-modus (without dshow-plugin). It seems to me that an input-filter like *.* is missing.
Olnima
@trodas: I can't see that it is a waste of time to change a topic-title according to what the topic is about, even if YOU don't need it. There are still a few other people around here except You... |
 |
| Gromozeka |
| Posted: Feb 6 2008, 03:07 PM |
 |
|
Unregistered

|
| QUOTE | | Gromozeka - try with VDub 1.8 |
I say: "Not work in v1.8.(test6 & test7)" |
 |
| phaeron |
| Posted: Feb 7 2008, 08:49 AM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
@olnima:
| QUOTE | Is an input-filter like *.* missing in directshow-input-driver? When I choose it I can't select any file unless I opend a file in "normal"-modus (without dshow-plugin). It seems to me that an input-filter like *.* is missing.
|
Nope, that's intentional. The input filter currently only registers itself for file extensions that are listed for DirectShow plugins in the Registry. Input plugins attempting to register for everything is a big no-no because it would cause plugin conflicts. I'm going to strongly discourage any such behavior (actually, I should put that in the SDK docs).
Strangely enough, the popular Matroska splitter doesn't seem to register its file type, even though the four-byte signature for MKV files is well-defined....
What I'll probably need to do in the end is add some options to the plugin to make this kind of behavior configurable. Unfortunately I've got two versions of VirtualDub to push out first. 
@Gromozeka: I need a better description of what exactly is happening -- blank window, stuck frame, etc. Also, if you could, make sure you're trying it on a file with known good behavior -- preferably AVI or MPEG -- since some splitters and decoders can cause different issues with the current code. You can force the DirectShow input driver via the file type drop-down on the Open dialog.
Oh, and by the way guys... no bickering over stupid things, please, or parts of your posts are going to start changing mysteriously. |
 |