Log in

View Full Version : ffdshow development


Pages : 1 2 3 [4] 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

Tri
29th May 2003, 01:00
Using the avisynth function of ffdshow, I wanted to apply deen to a clip if the framerate is smaller than 25. This function works perfect in a "normal" avisynth script:

LoadPlugin("F:\avisynth\deen.dll")
Function SmallFPS_Deen(clip)
{
clip = (Framerate(clip) <= 25.000) ? deen(clip,"a3d",1,10,12,3).Subtitle("active") : Subtitle(clip,"inactive")
Return clip
}
SmallFPS_Deen()

But in ffshow it always displays "active", so every video gets filtered by deen, which my system can't handle :). Is there some other way I can get this to work?

Defiler
29th May 2003, 03:01
Originally posted by Tri
Using the avisynth function of ffdshow, I wanted to apply deen to a clip if the framerate is smaller than 25. This function works perfect in a "normal" avisynth script:OK. This is really bizarre.
I'm using a 29.97fps file as a test, to see if I can figure out the problem you are having.

Function SmallFPS_Deen(clip)
{
clip = (Framerate(clip) <= 25.000) ? GreyScale(clip).Subtitle("active") : Subtitle(clip,"inactive")
Return clip
}
SmallFPS_Deen()This code displays "active" on the 29.97fps file (inappropriately), and makes it greyscale.

However, if I change the "25.000" to "15.000", the same video shows "inactive", and is in color. Maybe the framerate is being reported incorrectly?

So, I delete that script, and just do this:
Subtitle(String(Framerate()))

Guess what? It always reports 25.000, no matter the frame rate of the file I feed it. Even, hilariously, with a 120fps AVI file.

oddball
30th May 2003, 02:21
You know I mentioned about resize screwing up aspect ratios if you set it to resize anything above a certain specified size? And you know how you said that the option 'Maintain aspect ratio' would resolve it? Well it doesn't.
I have a 720x400 AVI and I wish to resize anything greater than 640x to 640x. You can set the resize amount. I set it to 640x480 which is fine if you have a 720x480 video size for instance. This resizes down correctly. However if you have a widescreen video like 720x400 it resizes it to 640x480 with black bars top and bottom. I could set it to 640x352 but if I do that and playback a 720x480 clip it would screw that up. The resize command does not work in the way expected.

So basically I want to see resize take into account the aspect ratio and resize accordingly. Using the last version of ffdshow and the maintain aspect option does not seem to work.

milan
2nd June 2003, 13:43
@Defiler
Fixed now.

milan
2nd June 2003, 13:44
@Defiler
Fixed now.

Everytime when ffdshow will be able to determine input video frame rate (and it can't do this always) it will pass it to avisynth.

Takuto
3rd June 2003, 17:23
Just found strange ZoomPlayer behavior with FFDShow from May 23 2003.
Zoom Player crashes every time, when it played DivX 3 content and minimized into taskbar. It happens only with this version FFDShow, only with DivX 3 and only in Zoom Player (tested also MPC and MP 6.4).

Maybe its bug of Zoom Player (btw I used v. 3.10 beta 1 standard), but with previous FFDShow builds all was OK.

Windows XP, DirectX 9.0.

Defiler
3rd June 2003, 17:35
Do you have Nic's post-processing enabled? If so, turn it off.

gabest
3rd June 2003, 17:36
milan: Would it be possible to output VIDEOINFOHEADER2 structures too? I ask this because now that the matroska file format supports aspect ratio in the container format, it would be needed to pass the VIDEOINFOHEADER2::dwPictAspectRatioX/dwPictAspectRatioY fields towards the renderer just like the frame-rate is passed already.

Takuto
3rd June 2003, 18:33
Defiler: no, Nic postprocessing is not enabled. When I tried to enable it player crashes immediately.

But when I disabled any postprocessing at all, crashes disappeared.
Maybe some memory leak with DivX 3 postprocessing?

Defiler
3rd June 2003, 20:57
Originally posted by gabest
milan: Would it be possible to output VIDEOINFOHEADER2 structures too? I ask this because now that the matroska file format supports aspect ratio in the container format, it would be needed to pass the VIDEOINFOHEADER2::dwPictAspectRatioX/dwPictAspectRatioY fields towards the renderer just like the frame-rate is passed already. Oh yes! That would make my month.

gabest
4th June 2003, 02:33
Forget what I asked... it's already there in ffdshow! :)

HughMagoo
4th June 2003, 05:02
milan: Would it be possible to output VIDEOINFOHEADER2 structures too? I ask this because now that the matroska file format supports aspect ratio in the container format, it would be needed to pass the VIDEOINFOHEADER2::dwPictAspectRatioX/dwPictAspectRatioY fields towards the renderer just like the frame-rate is passed already.

this would probably explain why DVD content passes its aspect ratio through ffdshow, even though you might be resizing to a resolution like 1040x960 in ffdshow, and are using the "no aspect ratio correction". If we could always tell matroska what aspect ratio the encode is, and have that pass through ffdshow, for proper resize in the player, that would be great.

as it is currently, with everything but DVD I have to manually choose aspect ratio if I want to use a fixed resize resolution in ffdshow.

Defiler
4th June 2003, 06:26
I misunderstood what you were asking for then. Heh.

Lobuz
4th June 2003, 12:05
I just want to present recent experiences of playing xvid with ffdshow.

First I must admit it's great efficiency and speed even in HD resolutions.

But one thing is still working poorly - that is packed bitstream. In connection with qpel and b-frames there appeare strange gray halo spots. It could be easyli observed at testing clip from matroska thread. Without qpel or B-frames it seems to be ok. Aha, and there is a stuttering during the playback of that clip ( even if cpu is at 50% of load ).

And I have a small request if could be possible to make an intermediate buffer after decoder and before renderers. Sometimes the CPU load jumps and there is desync so that buffer could help at these situations.
I have plenty of free RAM so it could be used to reduce any jerkyness.

Regards
Lobuz

milan
4th June 2003, 12:22
The aspect ratio is now just passed in the VIDEOINFOHEADER2 to overlay mixer. It doesn't influence ffdshow internal resizing and ffdshow internal resizing doesn't influence the VIDEOINFOHEADER2 aspect ratio. I'd like to change this in (near) future.

Packed bitstream with qpel and b-frames is a known problem. I'll check if some bugs workaround option could solve this.

@gabest
I tested your matroska demuxer yesterday after reading that ffdshow always reports 25 FPS. Would it be possible for you to set the AvgTimePerFrame field in VIDEOINFOHEADER or can matroska handle variable frame rate and this would be impossible?

ChristianHJW
4th June 2003, 13:01
Originally posted by milan @gabest
I tested your matroska demuxer yesterday after reading that ffdshow always reports 25 FPS. Would it be possible for you to set the AvgTimePerFrame field in VIDEOINFOHEADER or can matroska handle variable frame rate and this would be impossible?

Yes, matroska can have variable framerate in principal, but not in the VfW compatibility mode. All the codecs ffdshow can decode and that can be stored in matroska for the time being, thats DivX, XviD, MPEG4V1/2/3 and DivX3 are all VfW based, and thus have a fixed frame rate.

IIRC the framerate is also easily accessable, as in VfW mode we store the complete BITMAPINFOHEADER in the KaxCodecPrivateDate field of matroska ....

EDIT / Correction :

There is no framerate in BITMAPINFOHEADER i was told, so we had created a new element called KaxVideoFrameRate for that weeks ago, and the specs say that every CFR ( Constant Frame Rate ) codec should use/set this field accordingly, making it manadatory for VfW mode also ...

Blight
4th June 2003, 16:53
Milan:
Since FFDShow can decode theora content, can you make it accept the VP31 sub-type & fourcc?

And now that 3ivx released a QuickTime splitter, it would be very cool if sorenson could be decoded.

Also, there's some bugs in the MPlayer post-processing... It flickers the video. Very noticable with HDTV content. Also, the whole effect as a whole seems weakened compared to previous versions of FFDShow.

Defiler
4th June 2003, 17:46
Originally posted by Blight
And now that 3ivx released a QuickTime splitter, it would be very cool if sorenson could be decoded.Hehe. You just want to get out of working on the Quicktime features of Zoom Player. I know your plan.. :D

milan
5th June 2003, 10:40
Since FFDShow can decode theora content, can you make it accept the VP31 sub-type & fourcc?

Are you sure that VP31 content can be decoded using theora routines?


And now that 3ivx released a QuickTime splitter, it would be very cool if sorenson could be decoded.

I didn't know that. I'll download this splitter immediatelly and see what can I do to use libavcodec SVQ1/3 decoding routines.

milan
5th June 2003, 14:18
Current progress:

1) theora decoder used by ffdshow is unable to decode sample VP31 clip

2) after few hack I was able to decode sample Animatrix mov clip using ffdshow. There is still a lot of work to be done, but thanks to libavcodec developers maybe we will have an opensourced SVQ3 directshow decoder filter.

BTW is there some AAC directshow decode filter which could be used with 3ivx quicktime demuxer?

BoNz1
5th June 2003, 14:30
Originally posted by milan
BTW is there some AAC directshow decode filter which could be used with 3ivx quicktime demuxer?

Yes, there is, check out this one, http://forum.doom9.org/showthread.php?s=&threadid=53863

Blight
5th June 2003, 15:12
milan:
There's the open-sourced one from corecodec team and the 3ivx audio decoder also does AAC. I believe Ahead software (makers of nero) also have one, but I haven't really seen it.

slavickas
5th June 2003, 19:55
Originally posted by milan
Current progress:

1) theora decoder used by ffdshow is unable to decode sample VP31 clip


vp3 and theora are quite different, but ffmpeg have own vp3 decoder i think (i don't have linux currently) by Mike Melanson

btw http://kyoto.cool.ne.jp/vp3/ is faster version of vp3 (at least decoder)

unplugged
5th June 2003, 22:12
I just want report that with latest build 23/05 the DScaler deinterlace/filter support plug-in doesn't work well as did previously.
Certain DLLs (like TomsMoComp.DLL) crashes ffdshow and most deinterlace filters have some flipped color tonality (blue instead of red...).
Instead all ok with 24/04 build.
I'm using filters from DScaler beta 4.1.6 (great great project, but... damn! no full line recording... yet :( :x)
Sorry if I miss something said in regard of this, haven't red the whole thread.

P.S.: Which could be one good deinterlacer plug-in (hey! I'm for 50fps! :D) to view MPEG-x recorded F1 Grand Prixes? (mixed high/low-motion)
For now I'm satisfied with Greedy2Frame...

avih
5th June 2003, 23:57
DScaler: for really fast action, i usually go for simple bob. it's the 'purest' deinterlacer.

Blight
7th June 2003, 20:19
here's a bug report...

Playing HDTV encoded XVID content (1920x800) with Nic's Post Processing active would crash FFDShow when trying to release the filter. No issues at 1280x720, so I'm guessing the 1920 width may be an issue.

Animaniac
8th June 2003, 04:51
Bug for XviD clips:

OSD always shows I for Frame Type
OSD cannot determine Frame Mean Quantization

simon.mittag
9th June 2003, 11:20
Milan,

about the new avisynth sourcefilter, can I please point your attention to this thread: http://forum.doom9.org/showthread.php?s=&threadid=37204&perpage=20&pagenumber=4

The Autocrop plugin needs seeking (requesting frames) to work. This seems to cause problems with ffdshow in raw mode. Is there anything You can think of to make that work?

thanks for your time,

Simon

PkmoNk
9th June 2003, 11:43
I just want to note I've also had playback issue with the new ffdshow filter and uninstalling still caused playback problems with some avi files. so i uninstalled EVERY A/V codec and filters even ffvfw, and restarted, then install KazaaLite Codec FULL without the divx5.05 and the new ffdshow and everything works fine again! :)

thop
9th June 2003, 16:04
Originally posted by PkmoNk
KazaaLite Codec FULL
:confused:

Blight
9th June 2003, 21:04
thop:
My analogy to PkmoNk's post is "So, my head was hurting real bad, so I took a gun, shot at my head, amazingly hit an tumor I didn't know I had and now my headache is gone".

simon.mittag
10th June 2003, 02:13
Blight :D :D :D

CruNcher
10th June 2003, 07:30
@ blight

buahahaha :rolleyes: :D :D

PkmoNk
10th June 2003, 11:24
Originally posted by Blight
thop:
My analogy to PkmoNk's post is "So, my head was hurting real bad, so I took a gun, shot at my head, amazingly hit an tumor I didn't know I had and now my headache is gone".

hey, I'm just trying to help out. It did solve my problems with playback. :rolleyes:

nadlabak
10th June 2003, 13:59
Hi,

sorry to interrupt this interesting discussion with my little wish...

Besides its great decoding capabilities, ffdshow is very powerful directshow video filter. I was always tempted to use it not only for video playback but also for video filtering during capture - deinterlace, crop and resize filters chained before video compressor are the most needed.

I was able to use it this way in Virtual VCR (and ffdshow is the only dshow resize filter that does not crash Virtual VCR when downscaling unlike the Moonlight bilinear scaler and Bicubic 1.3b filter) but ffdshow usability as a video filter has some shortcomings. Different settings for capture and playback operation can be achived by preset autoloading based on video size (full PAL - capture, any other resolution - playback). But raw video as the supported codec has to be enabled and ffdshow is then always loaded for any dshow video rendering happening on the system (in the selected color space). Video preview using Smart Tee filter in Virtual VCR could not be initialized when ffdshow is set as video prefilter, maybe because ffdshow is then running in two instances - one for prefiltering and second autoloaded for preview window.

It would be great if ffdshow could be compiled as a separate directshow video filter without decoding features with low merit (no autoloading) to be used for filtering purposes only and that could be installed on the same machine together with standard ffdshow filter used for video playback.

milan
10th June 2003, 14:06
I would prefer to maintain just one version of ffdshow. Would it be helpful to you if I would add possibility to select ffdshow's merit in its configuration dialog?

Blight
10th June 2003, 14:33
ChristianHJW:
You can't enable overlay mixer in FFDShow, it should be done on a Player level. As the overlay mixer breaks VMR9 support or any internal overlay mixer code in the player. Having it on by default would make ffdshow very unstable.

milan,nadlabak:
Not sure if it's possible, but if you can spawn two CLSIDs for FFDShow, one always RAW mode with a selectable merit and the other with never RAW mode and a very high merit. Each CLSID would have it's own registry tree.

That way you'd be using the exact same code base with only very minor checks to see which CLSID is running...

tcmjr
10th June 2003, 22:43
How can I get the best quality using ffdshow ?
I mean , which setting should I choose for best quality ?
lets say for playing dvix movies and xvid movies ?
I am using latest ffdshow (05/23) nvidia drivers 44.03 and win Xp.
Using both bsplayer and Zoom player
thanks.

ChristianHJW
11th June 2003, 07:56
Originally posted by Blight ChristianHJW: You can't enable overlay mixer in FFDShow, it should be done on a Player level. As the overlay mixer breaks VMR9 support or any internal overlay mixer code in the player. Having it on by default would make ffdshow very unstable.

Hmm .... thats sad :( . Seems we have to bug more player developers to support reading the mkv AR flag directly from the player .... |Blight| :D ?

EDIT : Can the player enable the overlay mixer in ffdshow if a .mkv is opened ?

BlackSun
11th June 2003, 08:04
Originally posted by Blight
ChristianHJW:
You can't enable overlay mixer in FFDShow, it should be done on a Player level. As the overlay mixer breaks VMR9 support or any internal overlay mixer code in the player. Having it on by default would make ffdshow very unstable.



I totally agree

JasonFly
11th June 2003, 17:47
I don't know if it has been report but I have a problem using ffdshow with andreas78 matrix.(this is a hi quality matrix)

The problem is a decoding problem(image is fine in VirtualDub) and seems related to ffdshow since the image is nice if decoded with Nic's decoder.

The problem happens on two encodes where I used andreas78 matrix and produce moving blocks in the image.(Looks like broken motion estimation)This happenned in a high motion scene with a complex motion of the hair of a person.

For these encodes,I used bframes(2-100-150-100) and vhq=1 but not qpel.Quantizers should be between 2 and 4 because the movie wasn't much compressed.

Sorry if this has already been reported.

Defiler
11th June 2003, 18:20
Does that matrix have a value lower than 16 in the top-left?

Lobuz
11th June 2003, 19:01
I don't know if it's useful but there are some optimisations to simple idct in mpeg2dec3 1.8 and lately in XviD too. So maybe it could serve to idct in ffdshow and gain a little more speed?

Regards
Lobuz

Blight
11th June 2003, 19:36
ChristianHJW:
ZP by default uses Overlay Mixer mode... VMR mode also works for AR as long as the filter passes the data in the VIDEOINFOHEADER2 structure.

JasonFly
11th June 2003, 19:50
Yes the matrix has vlaues lower than 16 in both the intra and inter matrix.

They look like this:

Intra:
8 13 15 19 ..
13 13 17 19 ..
15 17 19 ..
17 21 ..
21 ..
..

Inter:
8 11 13 15 ..
11 11 15 15 ..
13 15 17 ..
13 17 ..
17 ..
..

athos
20th June 2003, 13:48
I just wanted you to know that Milan is doing some heavy work on ffdshow right now. He has asked me to wait with putting up new builds on SF until he feels the state of the project is more stable. But there are some interesting development that I would like to try out, so I just might put up some private build, if Milan doesnt mind.. Here is the changelog since last alpha release:
2003-06-18 20:09 milan_cutka

mp3,mp2,ac3 decoding - ALL EXPERIMENTAL

2003-06-14 09:39 milan_cutka

updated vc6 projects

2003-06-14 08:00 milan_cutka

working on wma support (ffdshow.ax now contains an audio decoding
filter too)

2003-06-13 06:38 milan_cutka

msvidc

2003-06-12 11:29 milan_cutka

input bps in OSD, fix for mpeg1/2 decoding

2003-06-11 10:59 milan_cutka

second, raw video only, low priority filter

2003-06-11 06:46 milan_cutka

no message

2003-06-10 06:40 milan_cutka

working on better mpeg1/2 support

2003-06-09 16:04 milan_cutka

rgb gamma correction working in YUV (from mplayer's vf_eq2)

2003-06-09 13:35 milan_cutka

added skal's idct to libavcodec (almost untested, might be removed
if problems will occur)

2003-06-09 11:54 milan_cutka

updated libavcodec vc6 project

2003-06-09 11:23 milan_cutka

timestamps support in IffProc

2003-06-09 06:30 milan_cutka

subtitles use timestamps instead of frame numbers, timestamps
cleanup: mpeg1/2 now works a little bit better, possible new bugs

2003-06-06 06:44 milan_cutka

onSizeChange cleanup, SVQ1 support

2003-06-05 15:52 milan_cutka

experimental SVQ3 support, onSizeChange,onCSPchange

2003-06-05 14:10 milan_cutka

updated libavcodec

2003-06-05 08:05 milan_cutka

updated vc6 project

2003-06-05 06:42 milan_cutka

option to register ffdshow to selected media types only, resize
calculation cleanup

2003-06-04 08:04 milan_cutka

updated vc6 project

2003-06-04 06:30 milan_cutka

optional short osd message on keypress, XVID_CPU_ -> FF_CPU_, def
constants cleanup, remember selected item in codecs listview,
IffProc6 (removed backward compatibility)

2003-06-03 06:20 milan_cutka

YV12 simpleresize and warpedresize

2003-06-02 14:43 milan_cutka

use currect fps in avisynth filter

2003-06-02 12:02 milan_cutka

movies source codec from V1 branch to HEAD (this is HUGE commit,
but I don't know how to do this better)

2003-06-02 11:04 milan_cutka

file TfilterSettings.h was initially added on branch V1.

2003-06-02 11:04 milan_cutka

moved filters settings to separate files, TfilterSettings
descendants available globally

2003-06-02 08:31 milan_cutka

updated vc6 project

2003-06-02 06:43 milan_cutka

option to automatically select different IDCT for XVID, better way
to display subtitles below the video, frame sizes visualization,
displaying QPEL info again, nic's postprocessing accepts arbitrary
YUV chroma subsampling, "interlaced" resizing

2003-05-30 14:58 milan_cutka

3IVX, RMP4, DM4V

2003-05-30 14:44 milan_cutka

no message

2003-05-30 14:43 milan_cutka

3IV2 fourcc added

2003-05-30 12:42 milan_cutka

Visual Studio 6 project for building libmplayer.dll, fixed crash in
swscaler when copying images with equal negative strides

2003-05-30 11:12 milan_cutka

updated some code from mplayer,

2003-05-30 06:31 milan_cutka

separate swscaler blur and sharpen filters

2003-05-29 15:36 milan_cutka

updated libswscale and libpostproc, fast_memcpy

2003-05-29 11:30 milan_cutka

file dwstring.cpp was initially added on branch V1.

2003-05-29 11:30 milan_cutka

file dwstring.h was initially added on branch V1.

2003-05-29 11:30 milan_cutka

std::string -> DwString

2003-05-29 09:09 milan_cutka

fixed bad subtitles coloring introduced by previous commit

2003-05-29 08:17 milan_cutka

updated vc6 project

2003-05-29 07:00 milan_cutka

file image.cpp was initially added on branch V1.

2003-05-29 07:00 milan_cutka

file colorspace.cpp was initially added on branch V1.

2003-05-29 07:00 milan_cutka

file Tsubreader.cpp was initially added on branch V1.

2003-05-29 07:00 milan_cutka

file Makefile was initially added on branch V1.

2003-05-29 07:00 milan_cutka

file mem_align.h was initially added on branch V1.

2003-05-29 07:00 milan_cutka

file mem_align.cpp was initially added on branch V1.

2003-05-29 07:00 milan_cutka

cosmetic: XVID_CSP_ -> FF_CSP, xvid_malloc->aligned_malloc,... can
be compiled by gcc again, modifying string parameters and selecting
active preset via remote control framerate doubler works again,
fixed TomsMoComp chroma strides, underline and colored subtitles,
almost separate subtitle lines handling, little bigger trackbar
sliders

2003-05-27 15:32 milan_cutka

working on subtitles

2003-05-27 10:26 milan_cutka

warning fixes

2003-05-27 08:35 milan_cutka

file TsubreaderMplayer.cpp was initially added on branch V1.

2003-05-27 08:35 milan_cutka

file Tsubreader.h was initially added on branch V1.

2003-05-27 08:35 milan_cutka

file TsubreaderMplayer.h was initially added on branch V1.

2003-05-27 08:35 milan_cutka

working on subtitles parser deglobalization (currently broken)

2003-05-27 08:30 milan_cutka

fixed temporal smoother

2003-05-27 06:48 milan_cutka

hint generation and filter settings reset are now members of filter
setting struct, updated libavcodec

2003-05-26 11:56 milan_cutka

no message

2003-05-26 11:52 milan_cutka

don't display OSD lines which wouldn't fit to the image at the
bottom, always use full picture for OSD

2003-05-26 09:29 milan_cutka

memcpy -> TffPict::copy in bmp saving
So, we might see audio support, and perhaps working MPEG1/2 video soon!

mf
20th June 2003, 14:08
-_- Does he really want to support everything and the kitchen sink?

thop
20th June 2003, 14:17
personally i'd prefer to have audio not decoded with ffdshow ... there are plenty of other filters for that available already. why reinvent the wheel when f.e. ac3filter already does a pretty good job?

The Link
20th June 2003, 14:41
personally i'd prefer to have audio not decoded with ffdshow ... there are plenty of other filters for that available already. why reinvent the wheel when f.e. ac3filter already does a pretty good job? Why not? :)
My impressions of ffdshow are, that it is milan's "baby" and in its form some kind of "proof of concept". I think milan does it for fun and to broaden his knowledge (which must already have the state of a compendium). The best part of it is that he lets us participate in his engagement! Arguments like "it is bloated" donīt count here IMHO because of its singular position in the video segment. Since ffdshow is fully configurable I donīt see any reason against audio support!

Regards,
The Link

edit: typos

gabest
20th June 2003, 14:50
The thing is dshow would allow only one filter to be the reader, parser, decoder, effecter and the renderer. But the power of dshow hides in its modularity and it is better to keep parts separate to be easily replacable. So, I also say it would be better to have an audio-only filter too, but that's only my opinion :)