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 > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th March 2003, 16:05   #381  |  Link
gabest
Registered User
 
gabest's Avatar
 
Join Date: Oct 2001
Posts: 1,459
Quote:
Originally posted by ogo
At first i tried a "normal" transform filter, but it was not very pretty because of the buffer copy that take place. I thought an in-place filter does only some copies in rare cases. Am i wrong ?
The easiest would be to peek how it was implemented. The prob is that it takes the allocator management away from you and leaves no chance to do format changes correctly. You'll never know what's going on and why if you rely on the baseclasses too much.
Quote:
I'll study your explanations carefully (well i don't understand everything for now). But just to reassure me, provided that my filter don't care at all about video formats, is it possible to make a completely "transparent" filter (like nullip -but working-) ?
Maybe there is a way, but I haven't found it yet I think there is a hope since MS was brave enough to put a DMO wrapper in wmp9 both in front of the video and audio renderers. But I don't have any video effect plugins installed to test it.
Quote:
If not then my filter is useless. It's a pity because when there are no format change it does work great (with AVI files for example) ...
Btw, how do you put it into the graph? With a high merit or using reclock?
Quote:
I work on .NET stuff at work. Even if .NET has a lot of bugs in the initial release, at least it's understandable, elegant, and pleasing to work with.
OT question: what's your opinion, why wasn't dshow ported to .net in dx9? I'm not into managed code too much, but for example can c# access memory from the outer world? If not it won't ever be worth writing filters in .net, moving in and out video buffers would be a bottleneck for sure.
Quote:
About mediadet, yes i use it. It's the only solution i have found to find the framerate of files (i use IDVDInfo2 for DVD). I don't know any other solution in DirectShow. Would you have any other idea ?
With vob (cyberlink mpeg2/ac3filter) the whole mpeg2 splitter seems to be stucked, and with ogm I can see four MediaDetPin listed as unreleased. You could walk the graph and look for interfaces on filters and pins, and/or extract connection media types and see the avgtimeperframe member of videoinfoheader, it's not that hard at all.
__________________
gabest.org
gabest is offline   Reply With Quote
Old 10th March 2003, 16:55   #382  |  Link
ogo
Registered User
 
Join Date: Oct 2001
Posts: 156
Quote:
The easiest would be to peek how it was implemented. The prob is that it takes the allocator management away from you and leaves no chance to do format changes correctly. You'll never know what's going on and why if you rely on the baseclasses too much.
Yes but it will take me ages to understand all this stuff ... It should be so simple to write a "do nothing" filter ...

Quote:
Maybe there is a way, but I haven't found it yet I think there is a hope since MS was brave enough to put a DMO wrapper in wmp9 both in front of the video and audio renderers. But I don't have any video effect plugins installed to test it.
I don't have any video effect filter neither. Maybe it would be the way to go ?

Quote:
Btw, how do you put it into the graph? With a high merit or using reclock?
Well, the dirty way ... Once reclock reach CompleteConnect, i add my filter to the graph in front of the overlay mixer, vmr7 or vmr9, or bsplayer internal renderer. If connection fails, i restore the graph. At least it seems like doing it this way works fine, and i can control the stuff (if reclock is not in a graph nothing harmfull will be done).

Quote:
OT question: what's your opinion, why wasn't dshow ported to .net in dx9? I'm not into managed code too much, but for example can c# access memory from the outer world? If not it won't ever be worth writing filters in .net, moving in and out video buffers would be a bottleneck for sure.
My work on .NET is very far away from directshow and has nothing to do with video. Managed code can share data across threads, and i don't think performance would suffer so much. Why ? in C++ you have to think 90% of the time if you copy data or reference existing data with pointers, and at the end you end up why a lot of data copying because of allocations/free problems (who owns the data, etc ...). Not really completely trues with COM anyway ...
In .NET 99% of manipulated objects are references, but copies are easy to involve if you don't know what the framework does with your objects. That's why many people think .NET is slow : they tried a 10 lines badly written sample ...
Anyway the garbage collector can be a serious problem : it will take cpu time each time it's triggered ... Maybe it's THE main problem
Just my 2 cents

Quote:
With vob (cyberlink mpeg2/ac3filter) the whole mpeg2 splitter seems to be stucked, and with ogm I can see four MediaDetPin listed as unreleased. You could walk the graph and look for interfaces on filters and pins, and/or extract connection media types and see the avgtimeperframe member of videoinfoheader, it's not that hard at all.
You mean by querying the input pin of the video renderer with ConnectionMediaType() thus obtaining VIDEOINFOHEADER or VIDEOINFOHEADER2 ? I figured out only yesterday it was possible while writing my transform filter ! The only problem is that i would like to know the framerate before the graph filter is run. have to try that anyway ...
ogo is offline   Reply With Quote
Old 10th March 2003, 17:35   #383  |  Link
gabest
Registered User
 
gabest's Avatar
 
Join Date: Oct 2001
Posts: 1,459
Quote:
Originally posted by ogo
I don't have any video effect filter neither. Maybe it would be the way to go ?
DMO's are transform filters usable outside the filter graph too, you could try to create one and use the stable-looking DMO wrapper, but I'm not sure how it handles format changes. If it does then probably does it better than you would now
Quote:
Well, the dirty way ... Once reclock reach CompleteConnect, i add my filter to the graph in front of the overlay mixer, vmr7 or vmr9, or bsplayer internal renderer.
In the past I noticed that win2k renders avi splitter's pins in reverse order, that can be a problem for you unless it was fixed :P
Quote:
... Managed code can share data across threads, and i don't think performance would suffer so much. ...
I didn't mean this. Think of a filter running in the virtual machine and the filter graph and other filters on the real, will they see eachothers media samples or does the memory have to be copied by the framework somehow back and forth?
(I liked COMs refcounting and expected something similar in .net too, just without the needed work to implement CUnknown and things making it fool-proof...)
Quote:
You mean by querying the input pin of the video renderer with ConnectionMediaType() thus obtaining VIDEOINFOHEADER or VIDEOINFOHEADER2 ?
Yea, and looking for IDvdInfo2 on the dvd nav too.
Quote:
The only problem is that i would like to know the framerate before the graph filter is run. have to try that anyway ...
The media types are set before running the graph, though some filters are not filling out avgtimeperframe... but then mediadet will not succeed as well.
__________________
gabest.org

Last edited by gabest; 10th March 2003 at 17:38.
gabest is offline   Reply With Quote
Old 11th March 2003, 10:14   #384  |  Link
ogo
Registered User
 
Join Date: Oct 2001
Posts: 156
Quote:
DMO's are transform filters usable outside the filter graph too, you could try to create one and use the stable-looking DMO wrapper, but I'm not sure how it handles format changes. If it does then probably does it better than you would now
Tried it with no luck with a video filter effect i found. Conncetion is ok, but the graph doesn't event start.

Quote:
In the past I noticed that win2k renders avi splitter's pins in reverse order, that can be a problem for you unless it was fixed :P
Funny ... But CompleteConnect() is the last code i know is called before a possible Run() of the filter. Well anyway missing the intermediate filter creation is not really a problem. Reclock can work fine without it.

Quote:
I didn't mean this. Think of a filter running in the virtual machine and the filter graph and other filters on the real, will they see eachothers media samples or does the memory have to be copied by the framework somehow back and forth?
Ok, if you mean mixing filters in managed and unmanaged code, well there you have a problem. It would imply a lot of copying because of .net structures management (some marshalling/unmarshalling stuff is necessary and it means copying)

Quote:
Yea, and looking for IDvdInfo2 on the dvd nav too.
I already use IDvdInfo2. I tried querying the input pin of the video renderer with ConnectionMediaType(), but get only 0 in AvgTimePerFrame (even during playback). Tried with many file formats without success. I also tried get_AvgTimePerFrame() on the IBasicVideo interface without success. I'll try walking all the graph and see other pins and see if it work. Strangely, mediadet works fine in any case on my XP machine anyway, but you're not the only one to have problems with it.

ogo is offline   Reply With Quote
Old 11th March 2003, 13:56   #385  |  Link
kallekill
Registered User
 
Join Date: Nov 2001
Posts: 174
I watch about 1 movie everyday so I'm quite the serious beta tester of Reclock . I have found two problems, and what I understand of the above post you are trying to correct at least the first one. The problems I have are:

1. Reclock is sensitive to flukes in the movie. Movies that have bad frames or are badly IVTC'd (And many have at some point or another although you might not notice it because the frame isn't moving much) often fall out of sync. The picture that is. It starts to stutter and you have to pause/play to get it in sync again.

2. Audio falls out of sync in some movies. I have only encountered it with MPEG1 files. I seldom watch mpeg1 files and when I do it is Simpsons and sync problems aren’t that hard to spot. I recently watched an episode of 24 and noticed that at some parts it seems as if there were dropped frames during the capture. At these points the audio falls out of sync and you can watch the audio sync go to about 500 ms in reclock. It slowly moves back to sync and ~10 seconds later it is fine again. If I play the clip without Reclock, the audio stays in sync and you only see a slight stutter were the frames are dropped. This also happens sometimes at the parts were they cut out the commercials.

Ogo, if you need I can send you a clip to help you troubleshoot the problem if you aren't already aware of it.
kallekill is offline   Reply With Quote
Old 11th March 2003, 17:18   #386  |  Link
ogo
Registered User
 
Join Date: Oct 2001
Posts: 156
Yes this problem was reported to me by some persons, but i didn't see it myself. So i'm very interested by a little clip (<= 20MB) if it's possible for you, and some indications that tell me where the desync occurs

I have also been told that latest version (99g) was showing more this problem than version 99f ... Did you see that ?
ogo is offline   Reply With Quote
Old 11th March 2003, 22:10   #387  |  Link
kallekill
Registered User
 
Join Date: Nov 2001
Posts: 174
Do you mean the problem with audio desync or the refresh rate falling out of sync?
kallekill is offline   Reply With Quote
Old 11th March 2003, 22:46   #388  |  Link
kallekill
Registered User
 
Join Date: Nov 2001
Posts: 174
I haven't noticed the problem with audio getting out of sync before so it could have something to do with the latest version, but I don't watch mpeg1 movies that much so I can't really say.
kallekill is offline   Reply With Quote
Old 12th March 2003, 10:13   #389  |  Link
ogo
Registered User
 
Join Date: Oct 2001
Posts: 156
Quote:
Do you mean the problem with audio desync or the refresh rate falling out of sync?
I was meaning problem 2
ogo is offline   Reply With Quote
Old 12th March 2003, 11:04   #390  |  Link
kallekill
Registered User
 
Join Date: Nov 2001
Posts: 174
Do you have an ftp or something I can upload it to? I tried sending you the file by mail but the mail bounced. The clip is 14 MB. Maybe we can take it over irc.
kallekill is offline   Reply With Quote
Old 12th March 2003, 14:22   #391  |  Link
ogo
Registered User
 
Join Date: Oct 2001
Posts: 156
@kallekill: i'm available after 7PM GMT. Is it possible for you ? Please send me an email with your ICQ number.

@Gabest : i'm still struggling to get this filter s... working. I found this on MSDN. Do you agree with what is said there ?
http://msdn.microsoft.com/library/de.../DynFormat.asp
ogo is offline   Reply With Quote
Old 12th March 2003, 15:16   #392  |  Link
gabest
Registered User
 
gabest's Avatar
 
Join Date: Oct 2001
Posts: 1,459
Quote:
Originally posted by ogo
@Gabest : i'm still struggling to get this filter s... working. I found this on MSDN. Do you agree with what is said there ?
http://msdn.microsoft.com/library/de.../DynFormat.asp
Yea, this is the only explaination of format changes, but as I see they are extending it a bit every time I go there :P What do you not understand there?
__________________
gabest.org
gabest is offline   Reply With Quote
Old 12th March 2003, 16:02   #393  |  Link
ogo
Registered User
 
Join Date: Oct 2001
Posts: 156
From what i understood :
1 - if i don't want a sample copy to take place (i add only the OSD i want to put on the picture), both my pins muse share the same allocator
2 - for downstream->upstream format changes the allocator must be given by the downstream filter (ie renderer) if i want to be able to receive format changes from the renderer. It means i must use one allocator and this allocator is the renderer's one. It should also mean that all filters that connected to a renderer use the renderer's allocator.
3 - QueryAccept must be crossed between in<->out
4 - for upstream->downstream format changes, i have nothing special to do, because they are attached to the sample. I just have to pass them downstream.
5 - they say in microsoft doc, that the sample buffer size should not increase with a downstream format change, so i should'nt have to worry about this

From what i have seen, 1/2/3 are ok in the default trans-ip implementation, but 4 does not work (i see downstream format changes in the sample, but the renderer does not take them in account). I don't understand why at all.
Also, i see the renderer changing the width of the video on its input pin (maybe changing the stride?), but again my upstream filter does not see it. Could it be a problem of "how many time is called GetBuffer() on the renderer's allocator" (called 2 times instead of one thus losing the change ?)

Maybe the best solution for me would be to rewrite completely CTransInPlace to understand it exactly.
ogo is offline   Reply With Quote
Old 12th March 2003, 17:06   #394  |  Link
gabest
Registered User
 
gabest's Avatar
 
Join Date: Oct 2001
Posts: 1,459
1. yep, just never read that buffer, because its speed you can call it "write-only"
2., 3. must be true, has to be tried.
4., 5. msdn writes up->down changes must not change the buffer size, but if you follow that advice how to change from 480 to 576 lines? mpeg2 decoders can do it somehow, and I think they do it either by calling receiveconnection (even if you have an inplace filter, this call will be on your input pin and not transparently forwarded) OR manually flushing the checked out samples, recommiting the allocator of the renderer and attaching the new media type (which I tried and worked with vmr7/9, but not very well with the overlay mixer, and not at all with the old one). Both methods are used by ac3 decoders and audio renderers have no problem doing format changes on-the-fly (they never ask back for up<-down changes though, and I think video renderers shouldn't either), I know this because in my audio switcher I have to forward them.
__________________
gabest.org
gabest is offline   Reply With Quote
Old 12th March 2003, 17:22   #395  |  Link
oddball
Registered User
 
Join Date: Jan 2002
Posts: 1,264
When trying to play DiVX5.03 encoded AVI's with any player but it's own included player. The players crash. If I uninstall ReClock they play fine. Can repeat. I have the same problem with DiVXG400 installed. DiVX5.03 does not like either of these filters for some reason. It does not do this when using ffdshow to playback DiVX5.03 encoded AVI's but I get green and purple smearing in ffdshow so it's not a good option.

Last edited by oddball; 12th March 2003 at 17:26.
oddball is offline   Reply With Quote
Old 12th March 2003, 20:12   #396  |  Link
kallekill
Registered User
 
Join Date: Nov 2001
Posts: 174
Oddball: Which IDTC to you use in ffdshow? Switching it to Xvid might help. It helps on xvids that get green smears otherwise.
kallekill is offline   Reply With Quote
Old 13th March 2003, 09:22   #397  |  Link
ogo
Registered User
 
Join Date: Oct 2001
Posts: 156
@oddball. I'll check that. Didn't have any problem here with divx 5.03 playing everything i could. Could you send me a little cut of your file by email ?
ogo is offline   Reply With Quote
Old 13th March 2003, 10:26   #398  |  Link
klaro
Registered User
 
Join Date: Dec 2002
Posts: 3
HDTV playback problem

ogo, i use reclock for dvd-playback and 0.99g works really great. unfortunately i have some trouble with hdtv-playback. using zoomplayer with a custom graph (elecard demux, sonic audio + video filter, reclock as audio renderer). i try to playback hdtv-mpeg-files from my hd at 48 hz refresh rate. the hdtv-mpeg definitely has 23.976 fps, reclock on the other hand detects 30 fps and wants me to change to a multiple of 60 hz.

why does reclock detect 30fps? where does this information come from?

greetings
klaus
klaro is offline   Reply With Quote
Old 13th March 2003, 20:08   #399  |  Link
oddball
Registered User
 
Join Date: Jan 2002
Posts: 1,264
kallehil: If I playback DiVX5.03 encoded videos with ffdshow I get green and purple smears (ANy version of ffdshow) and ReClock and DiVXG400 do not crash the player. If I set ffdshow to playback DiVX5.03 encoded video (With any version of Xvid installed. Tried Nics and Koepi's various builds etc) I get 'White' and purple smearing.

If I try to playback DiVX5.03 encoded video using DiVX5.03's filter and ffdshow not in the filter chain whatsoever (disabled for DiVX5.03 playback) with either ReClock or DiVXG400 installed. All the players crash 90% of the time.

The only exception being the DiVX5.03 player itself but it jerks like crazy with DiVXG400 installed and DiVXG400 does not appear to even load. With DiVXG400 uninstalled DiVX5.03's player plays back smoothly (I know it's not ReClock specific but it lets you know what probelms I am experiencing).

ReClock also does not load when playing back in DiVX5.03's own player.

So there you have it. ReClock (Or DiVXG400) plus DiVX5.03 as a playback filter = crashed players (Excepting it's own player).

ffdshow = no crashes but smears in normal mode or Xvid playback mode.

I've copied via direct stream copy 2 very small clips from the problematic AVI's. Please check that A. You can play them back via ffdshow without smearing occuring and B. can play them back with a player like Zoom Player or BSplayer etc using DiVX5.03 filter and ReClock 99g installed without the player crashing (No ffdshow).

http://www.maunders.com/clip1.avi a little over 1 meg
http://www.maunders.com/clip2.avi a little over 2 meg

Thanks.
oddball is offline   Reply With Quote
Old 13th March 2003, 23:06   #400  |  Link
kallekill
Registered User
 
Join Date: Nov 2001
Posts: 174
I played it with ffdshow and got the green smearing effect. I didn't play it with divx 5 because I don't want to install it. I have only had problems with divx above 3.11.
kallekill 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 00:04.


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