View Full Version : DS filter question
chaumurky
2nd October 2002, 03:05
Hello everyone. A question for filter programmers: Has a DShow filter ever been (or could one be) created that seperates fields like AVISynth? I would like to use it in a graph to display 25fps interlaced AVI files (MJPEG or DV) as 50fps progressive without the hassle of creating an AVS. I know this is a rather general question but i'm not a programmer at all and such an obvious feature (in my opinion) is missing in all players. Any bites?
milan
2nd October 2002, 08:17
ffdshow is internaly able to do this, however it's disabled for now. I can enable it. Should it upscale fields to full vertical resolution or output them unchanged?
chaumurky
2nd October 2002, 09:31
I guess it would be better not to upscale (any comments from others?) unless it would use less CPU than scaling with the player's aspect ratio settings (I'm using Zoom Player). Another question, could this filter detect interlaced files (say for vertical res above 288) or would it have to be manually switched? Either way, I'm happy! Thanks for your quick response!:D
milan
2nd October 2002, 09:58
Of course HW upscaling will be faster.
Interlaced source detection:
I think there are two cases: either ffdshow itself can decompress mpeg2 source (not recommended yet) and then it should be possible to access decompress library informations about interlacing or ffdshow just splits already decoded output and in that case source filter is responsible to set this information (VIDEOINFOHEADER2 structure).
Maybe there exists some 'heuristic' methods to determine if picture is interlaced, but I'm not aware of any (except for your suggestion).
chaumurky
2nd October 2002, 11:30
For now, is it possible for me to try a version of the filter with it switched on? I'm very eager to see this in action!! Have you tried it yourself? Detection is really an issue further down the track anyway. If it works, I'll capture interlaced all the time - I love the 'temporal' resolution!! :cool: Please let me know if it's too much trouble, rebuilding and all. Thanks again!
milan
2nd October 2002, 12:17
It's in CVS now. However you need to set some options manually:
1. check deinterlace and set method to TomsMoComp or Bob (is this the right name for what ffdshow does?) - both do the same for now
2. on Resize & aspect page set output size to half height of input video - this will be set automatically in future ffdshow versions, for now you have to do this manually or you will get full resolution with black borders around image
3. on Resize settings page set Method to None
That should be all.
I don't have any interlaced material here to test it now, but when I tested it with progressive VOBs, image was "shaking" up and down by one line. I don't know if this will be OK with interlaced sources. I'm just a beginner to this topic.
You will need quite fast CPU and graphic card to handle 50 Fps. You can even try to enable ffdshow's MPEG 2 decoding, but don't expect perfect results.
chaumurky
2nd October 2002, 12:50
Whoops!! :o I think I may have given you the wrong impression. I mentioned in my first post that I am not a programmer (though I am a TV tech and HTPC enthusiast). I narrowed the issue down to a DShow filter issue so I thought this was the right forum. I was hoping for a binary which is why I asked if it was too much bother. If it will be in a future release I can handle that...:(
milan
2nd October 2002, 12:56
OK, send me your email address and I will send you compiled ffdshow. My email is cutka@szm.sk.
BTW you could try to learn how to compile source code. Maybe ffdshow isn't the best project to begin with, but there are some simplier applications...
chaumurky
2nd October 2002, 13:16
done :D
chaumurky
2nd October 2002, 14:47
:cool: BOB works but the fields are not aligned. Perhaps an option to drop/raise every other field like Gannar Thalin's filter for VirtualDub 'Field Shift'. Will you be adding support for MJPEG and DV in the future? (I'm using the MainConcept DV codec set to display full res and PICVideo MJPEG)
milan
2nd October 2002, 14:57
I've just downloaded that filter and will test how it works.
libavcodec supports MJPEG decoding (and encoding), but AFAIK there are many MJPEG variants and I'm afraid I would have to handle many of them separately. I'm not using DV format and don't know anything about it.
milan
4th October 2002, 07:35
BOB works but the fields are not aligned. Perhaps an option to drop/raise every other field like Gannar Thalin's filter for VirtualDub 'Field Shift'.
I'm not sure if ffdshow can drop/raise fields when you wanted them unscaled. Field Shift filter does this by vertically upscaling them with some shifting.
Will you be adding support for MJPEG and DV in the future?
Libavcodec developers are working on DV support now. When it will be ready I will add it to ffdshow.
chaumurky
4th October 2002, 08:42
Is that Quasar's DV project? Looks like their close to a release. As to the field alignment - perhaps if it requires upscaling then it should be included. My PC is a 2GHz P4 512MB (PC2700) so it should be able to handle it. As it is now, BOB does work but it's hard on the eyes.
PS. What codec setting do I need for FF to decode MJPEG?
ckjnigel
4th October 2002, 08:47
I've used ffdshow alpha builds for three days and am awed by the improvements from post-processing and Blur/NR. Trivial to you mavens but large to me is the simplicity of choosing between DivX and XviD for playback. However, I've preferred Elecard for playing back DivX 3 files. Unchecking a box does allow me to see the flick processed by Elecard, but not with the p-proc and Blur/NR effects. Is there some way to do this, or might this be a future feature?
My highest praise and thanks for what you've already accomplished!
milan
4th October 2002, 08:56
@chaumurky
I think it's based on libdv, but they did their own implementation to fit already existing routines.
To be able to decode MJPEG with ffdshow, I would have to change the source code. I can do this so you can test it. Are there some test clips available? Which FOURCCs are most common: MJPG,... ?
Koepi
4th October 2002, 08:57
@ckj:
select "raw video" as decoding option in ffdshow and all colour spaces on the right side. You should be able to use the PP then with elecard decoding, too.
Regards,
Koepi
chaumurky
5th October 2002, 01:36
MJPG is the FOURCC code is the only one I know of. I have created a 23 frame sample and uploaded it to my site. It is 1796KB. It contains a vertical wipe that clearly shows interlacing. Just set your player to autorepeat. I hope it's what you need.
Go here and save the target link on the left.
http://users.bigpond.net.au/chaumurky/
EDIT: Actually, I just tried it with MPlayer and FF was used but in ZPlayer PICVideo was used. I'll have to look into this further. (fields unaligned, but I expected that).
chaumurky
5th October 2002, 02:44
Well, it appears that since selecting Raw Video, FFSDhow is inserted in the graph after any codec - DV, MJPEG etc! While running showshifter it is even inserted in the LIVE output graph when capturing!! My dreams are coming true!! I will talk to the ShowShifter developers about the possibilty of being able to permenently use this filter in live output - this was something I thought was impossible until now. All that remains is the field alignment and the solution is complete! (OK, breathe deeply now...)
:D :D :D
milan
7th October 2002, 07:27
If I would know you needed this feature I would told you, that this is possible with ffdshow for some time already. It's good that you can use ffdshow this way, because I've tried to add MJPEG decoding and it seemed to be a littly bit more difficult as I've expected because of different chroma subsampling modes.
milan
8th October 2002, 13:36
I've enabled MJPEG and DV support in ffdshow. libavcodec supports MJPEG decoding quite well, but DV is still not fully working. ffdshow hadles few different chroma subsampling modes.
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.