Log in

View Full Version : ffdshow tryouts project: Discussion & 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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 [246] 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308

Alexander01
17th August 2010, 16:53
Is there any difference in H.264 videoquality between the ffdshow DXVA decoder and the normal ffdshow (ffmpeg-mt) software decoder? I switched back to the software decoder but it seems there is not much difference between videoquality. With the DXVA decoder there was some extra noise filtering (this was configured in in ATI Catalyst, when unchecked there was no filtering anymore) and the picture seems a little bit smoother (less stuttering). Apart form that, the PQ seems the same. So the only advantage of the ffdshow DXVA decoder is the low CPU load?

STaRGaZeR
17th August 2010, 20:49
You actually do. For example: the HK-Legends UK DVD of "Fist of Fury" has subtitles, which fade in and out... and the german DVD of "Pan's Labyrinth" has this nice effect for subtitles too. For realizing this, one subpic exists multiple times (seamlessly arranged) with different transparency. So you'll see the subpic with the highest transparency for one frame, a subpic with lower transperency the following frame and so on, till you get to the subpic with no transparency at all, which (of course) will be shown for a couple of frames (like any "normal" subtitle)... and then it will be repeated vice versa for the fade-out effect.

I did some tests with different MPEG2 decoders (Nero DVD decoder, Elecard MPEG2 decoder, MPC-HC's internal MPEG2 decoder, DScaler5) inside MPC-HC - none of them had any problems with this kind of subtitles. Even forced subs were no problem. Only ffdshow won't show any of this subtitles... "normal" DVD subtitles work though.

I can't do anything since I don't know the format, but I'm interested in a sample, just to see the effect.

Also DVD (Vobsub) subtitles support is incomplete, so these issues are normal.

So the only advantage of the ffdshow DXVA decoder is the low CPU load?

Yes.

dann23
17th August 2010, 21:20
if tal is alive :) when will see improvements in dxva? last time I know that tal was working on improving subtitles and performance in dxva mode.

Tom Keller
17th August 2010, 22:25
I can't do anything since I don't know the format, but I'm interested in a sample, just to see the effect.
I've made a small sample in the form of a normal DVD video structure, so that you could have a better idea of how those fade-in/out effects on subtitles work and look like:

http://www.mediafire.com/?ff3ruka1w476zfh

Alexander01
18th August 2010, 17:19
When I use the Letterbox 16:9 option in ffdshow software decoder, the colorspace is being altered (for example: skin tones look more yelllow). Is this normal?

STaRGaZeR
18th August 2010, 18:20
I've made a small sample in the form of a normal DVD video structure, so that you could have a better idea of how those fade-in/out effects on subtitles work and look like:

http://www.mediafire.com/?ff3ruka1w476zfh

Thanks :)

When I use the Letterbox 16:9 option in ffdshow software decoder, the colorspace is being altered (for example: skin tones look more yelllow). Is this normal?

I assume you're not outputting RGB32. The YCbCr --> RGB32 conversion is done by your graphics card. The drivers use the video resolution to determine if the video should be converted using BT.601 or BT.709. When you letterbox, you're changing video resolution, and this can force the drivers to change between the two. You can't avoid this unless you output RGB32 from ffdshow.

Alexander01
18th August 2010, 18:45
I just unchecked all Planar YUV, all Packed YUV and all RGB except 'RGB32' and 'High YV12 to RGB conversion', but it didn't solved the issue.

STaRGaZeR
18th August 2010, 18:54
Post a sample and your letterbox settings then.

Alexander01
18th August 2010, 20:33
I found out it only happens with the following scenarios:


- When external subtitles are loaded
- When internal subtitles are loaded (Embedded subtitles checkbox ticked).


There's also another bug with the embedded subtitles (which also applies to the ffdshow DXVA decoder): When I uncheck the 'Embedded subtitles' box, ffdshow still loads the embedded subtitles, but this time they are not displayed in the bottom black bar (so no Letterbox 16:9 is used) and the colors are correct. Don't now if this is related to the splitter, but I am using MatroskaSplitter.ax from the latest MPC-HC build.


Sample: http://www.megaupload.com/?d=ASY575F5

Subtitles checked/Embedded subtitles unchecked/16:9 Letterbox unchecked: http://j.imagehost.org/0292/1_104.jpg
Subtitles checked/Embedded subtitles checked/16:9 Letterbox checked: http://j.imagehost.org/0731/2_25.jpg

STaRGaZeR
19th August 2010, 02:34
That looks a lot like a BT.601 vs BT.709 issue. Your sample is 1280x544, with letterboxing to 16:9 it's 1280x720.

When outputting RGB32 I get the exact same output on both. Graphics card drivers usually use BT.601 for height<720 and BT.709 for height>=720, and that's probably the case here. So please recheck in the Info & CPU tab that you're outputting RGB32 when this thing happens, because this can only happen if you're not outputting RGB32.

Alexander01
21st August 2010, 18:54
Correct color: Letterbox 16:9 unchecked and default output colorspaces settings checked. FFdshow output says YUY2
Bad color (too yellow): Letterbox 16:9 checked and default output colorspaces settings checked. FFdshow output says YUY2
Bad color (too yellow): Letterbox 16:9 checked and all output colorspaces unchecked except 'RGB32' and 'High YV12 to RGB conversion'. FFdshow output says RGB32
Bad color (too yellow): Letterbox 16:9 unchecked and all output colorspaces unchecked except 'RGB32' and 'High YV12 to RGB conversion'. FFdshow output says RGB32

Changing 'YCbCr' specification to 'ITU-R BT.709' also didn't help to get correct color with the last 3.

I'm using ffdshow 3533 and the Latest ATI Catalyst 10.7 with default settings. I had installed a previous of Catalyst before. I uninstalled it completely, then installed the newest one made sure all settings were set to default (I only unchecked the noise filtering).

nevcairiel
22nd August 2010, 09:20
Hey,

while developing my new media splitter, i noticed that the ffdshow subtitle renderer doesn't properly deal with subs that are UTF-8 encoded.
I have a sample here thats a UTF-8 encoded ASS sub, and it shows broken characters for the unicode chars. It works fine with DirectVobSub.

I can provide the sample if required, but any non-english subs should eventually show the problem.

How does ffdshow expect the character data? I realize it works with other splitters, so i'm mostly wondering if you could fix that more easily then i can.
Any feedback on how to resolve this issue would be appreciated. Thanks!

STaRGaZeR
22nd August 2010, 11:49
Correct color: Letterbox 16:9 unchecked and default output colorspaces settings checked. FFdshow output says YUY2
Bad color (too yellow): Letterbox 16:9 checked and default output colorspaces settings checked. FFdshow output says YUY2
Bad color (too yellow): Letterbox 16:9 checked and all output colorspaces unchecked except 'RGB32' and 'High YV12 to RGB conversion'. FFdshow output says RGB32
Bad color (too yellow): Letterbox 16:9 unchecked and all output colorspaces unchecked except 'RGB32' and 'High YV12 to RGB conversion'. FFdshow output says RGB32

Changing 'YCbCr' specification to 'ITU-R BT.709' also didn't help to get correct color with the last 3.

I'm using ffdshow 3533 and the Latest ATI Catalyst 10.7 with default settings. I had installed a previous of Catalyst before. I uninstalled it completely, then installed the newest one made sure all settings were set to default (I only unchecked the noise filtering).

I can't reproduce, if you output RGB32 the ATI drivers don't touch the image (at least not for this). And ffdshow does the conversion based on the original video resolution, not after the resizing, so I always get the same output. Do you have Auto checked in the YCbCr spec?

Hey,

while developing my new media splitter, i noticed that the ffdshow subtitle renderer doesn't properly deal with subs that are UTF-8 encoded.
I have a sample here thats a UTF-8 encoded ASS sub, and it shows broken characters for the unicode chars. It works fine with DirectVobSub.

I can provide the sample if required, but any non-english subs should eventually show the problem.

How does ffdshow expect the character data? I realize it works with other splitters, so i'm mostly wondering if you could fix that more easily then i can.
Any feedback on how to resolve this issue would be appreciated. Thanks!

I have loads of MKVs with non english UTF-8 plain text subs (SRT) that work fine, can you post that sample?

Sebastiii
22nd August 2010, 12:35
Hi :)

You can find it here :

http://www.mediafire.com/?it8cre6o5apb6nl

Cheers,
Seb.

nevcairiel
22nd August 2010, 13:07
I also sent you a pm with the sample, but yeah, thats the one.

Using LAVFSplitter i get corrupted glyphs in the first sub (Sub für Jap-dub [ger]). It works with DirectVobSub, but it also works with other splitters and ffdshow. So i guess it could be fixed on either end.
I would just need some insight on how to fix it, as i don't really have the time to dive into the ffdshow or directvobsub code.

Alexander01
22nd August 2010, 14:30
Do you have Auto checked in the YCbCr spec?

Yes. And I also tryed to set it to ITU-R BT.709, but it didn't helped.

STaRGaZeR
22nd August 2010, 15:10
I also sent you a pm with the sample, but yeah, thats the one.

Using LAVFSplitter i get corrupted glyphs in the first sub (Sub für Jap-dub [ger]). It works with DirectVobSub, but it also works with other splitters and ffdshow. So i guess it could be fixed on either end.
I would just need some insight on how to fix it, as i don't really have the time to dive into the ffdshow or directvobsub code.

Successful debug session, ffdshow enables its "utf8" flag when it detects MEDIASUBTYPE_SSA and another flag called "ismatroska" is set. "ismatroska" is set when one of these 3 filters are detected: Haali, MPC's internal MKV splitter or MPC's standalone MKV splitter. Just adding LAVFSplitter to the list fixes the issue, as utf8 is now true :)

Build: http://www.mediafire.com/?41clo6a849c3bld

BTW I've found something that may help you with the SSA fonts issue. Go to "SetMediaType" in TtextInputPin.cpp, line 78. What's this "extradata" stuff about?

Yes. And I also tryed to set it to ITU-R BT.709, but it didn't helped.

Setting it to 601 or 709 will just force one or another, your problem is that without lettebox it's using 601, and with letterbox 709 because of the new resolution. Either way I can't fix it since I can't reproduce it :(

nevcairiel
22nd August 2010, 16:11
BTW I've found something that may help you with the SSA fonts issue. Go to "SetMediaType" in TtextInputPin.cpp, line 78. What's this "extradata" stuff about?

The extradata in SSA/ASS holds the style definition. But i believe i figured out how to do embedded fonts, i just need to work on extracting it from the mkv =)

Thanks for the quick fix!

Sebastiii
22nd August 2010, 16:13
Really great guys :)
Thanks.

Alexander01
22nd August 2010, 16:41
Setting it to 601 or 709 will just force one or another, your problem is that without lettebox it's using 601, and with letterbox 709 because of the new resolution. Either way I can't fix it since I can't reproduce it :(

This week Catalyst 10.8 will be released, so i hope it will fix my issue. If not, my last chance would be a complete format/reinstall.

rack04
22nd August 2010, 19:02
Has anyone noticed that installing ffdshow tryouts over an existing installation on Windows7 64bit Ultimate that the installer occasionally doesn't enable subtitles which was active in the existing installation?

Blight
23rd August 2010, 14:25
Hi,
I have a bug to report:

When calling QueryInterface for "IID_IAMStreamSelect" on FFDShow's video decoder, subsequent calls to "IStreamSelect.Count(DWord variable)" raises an "EStackOverflow" exception. Tested with subtitles and without, makes no difference.
Tested with 32bit clsid build #3529

STaRGaZeR
23rd August 2010, 17:02
Does anybody have a sample with closed captions?

Tom Keller
23rd August 2010, 21:26
I can provide a DVD sample with closed captions:

http://www.mediafire.com/?f692suo3t606ju3

STaRGaZeR
23rd August 2010, 23:49
Thanks Tom, in this sample CCs can be turned on and off with the CCs option in the subs section. People reported that CCs were always shown regardless of the option, so I thought it happened on all sources. Any CC samples that have this bug?

clsid
24th August 2010, 11:54
The CC option itself works ok as far as I can remember. The problem/confusion was that it functions independently from the state of the global subtitle filter option.

STaRGaZeR
24th August 2010, 13:13
The global subtitle filter option also works with this one, do you have any of the problematic ones?

albain
27th August 2010, 17:34
Hi all,

I am back from holidays

I have just added support for cook audio decoding, let me know if there are issues. The decoder might not be as good as the one used by MPC : FFDshow uses ffmpeg, MPC uses Real's dlls

Hi,
I have a bug to report:

When calling QueryInterface for "IID_IAMStreamSelect" on FFDShow's video decoder, subsequent calls to "IStreamSelect.Count(DWord variable)" raises an "EStackOverflow" exception. Tested with subtitles and without, makes no difference.
Tested with 32bit clsid build #3529

Have you enabled internal filters to appear in the tray icon menu (in FFDShow video config / "tray,dialogs..." section, Add internal filters... checked ?) ?

For now I can't see how we would fall on an overflow

XhmikosR
27th August 2010, 18:47
@albain: thanks for adding support for COOK audio. Here (http://www.mediafire.com/?57c26hgcb1uqc) are a few samples which don't play with the latest rev. Note that "pareme.rm" crashes mpc-hc pointing to libavcodec.dll.

clsid
27th August 2010, 19:47
Great work Albain!

I have noticed one problem. The audio is messed up after seeking in a RealMedia video. It sounds like the audio samples are decoded in the wrong order. Without performing a seek the audio plays fine.

Gleb Egorych
28th August 2010, 14:36
Hi albain.

There is crash in ff_samplerate.dll possibly related to revision 3501. See page 613, posts by me and 27049215: http://forum.doom9.org/showthread.php?p=1426231#post1426231

Hyper Shinchan
29th August 2010, 05:26
Is it possible to add MPEG-4 ALS support in FFDShow? Since revision 20517 ffmpeg can decode it. There's also the issue of a splitter capable of demuxing and feeding the audio stream correctly, so actually adding support in FFDShow isn't enough I suppose but it would be nice to have ALS under directshow.

albain
30th August 2010, 14:47
Hi albain.

There is crash in ff_samplerate.dll possibly related to revision 3501. See page 613, posts by me and 27049215: http://forum.doom9.org/showthread.php?p=1426231#post1426231


Hi,

I can't reproduce the problem. Do you have a sample file ? Which splitters are you using ? which player ?

fastplayer
30th August 2010, 15:40
@albain:
In rev3551 you moved a statement next to the condition. Where's the fix in that?
I'm probably missing something big here, right? :o

Blight
30th August 2010, 17:59
Albain:
I've had it set to not show the tray icon at all and the option to show internal filter in the tray icon was not enabled.

I tried enabling the tray icon and then when playing a media file, right clicking the tray icon threw this error:

---------------------------
Debugger Fault Notification
---------------------------
Project Z:\zplayer.exe faulted with message: 'application-defined exception (code 0xc00000fd) at 0x1026ac27'. Process Stopped. Use Step or Run to continue.
---------------------------


Enabling the tray icon or enabling the show internal filters feature had no affect on the StackOverflow error.
I'm calling QueryInterface before the graph is running (filters are added to the graph and connected), does this make a difference?

I'm on Windows 7 Pro 32bit and set the ffdshow tray icon to always show in the tray. Still using the same CLSID build.

Gleb Egorych
30th August 2010, 19:11
Hi,

I can't reproduce the problem. Do you have a sample file ? Which splitters are you using ? which player ?

Here is a sample: http://www.mediafire.com/?9maeuon2vgbza6u
I watch using Zoom Player, navigate file using mouse wheel.
Audio is resampled from 44.1Khz to 48KHz using libsamplerate high.

FLV splitter 1.3.2099 from MPC-HC project.

hoborg
31st August 2010, 08:40
Hi.
Since LAVF splitter introduced very good MOV splitting, all my *.MOV samples plays using FFDshow except one with "twos" audio inside. Sample is here (http://hobring.esero.net/saf/samples/p1010337.zip).

Here is what MediaInfo say:
Audio
ID : 2
Format : PCM
Format settings, Endianness : Big
Format settings, Sign : Signed
Codec ID : twos
Duration : 2s 0ms
Bit rate mode : Constant
Bit rate : 256 Kbps
Channel(s) : 1 channel
Sampling rate : 16.0 KHz
Bit depth : 16 bits
Stream size : 62.5 KiB (1%)
Language : English
Encoded date : UTC 2010-03-17 22:55:13
Tagged date : UTC 2010-03-17 22:55:13

LigH
31st August 2010, 09:18
hoborg's post reminds me on a similar issue we have discussed in the german doom9/Gleitz board: MOVs with "twos" audio don't play in MPC-HC. Because MediaInfo reports them as PCM, I wondered if it was possible to hex-patch the Codec ID to something more compatible, but I had no idea which alternative FourCCs for PCM audio might exist in QuickTime... "Simply" recognising it as compatible PCM format would of course be a more convenient solution.

XhmikosR
31st August 2010, 09:55
You should try the latest MPC-HC build.

LigH
31st August 2010, 12:07
mpc-homecinema.2397_(x86)_msvc2010 + ffdshow_rev3550_20100829_sse_icl11 from XvidVideo.RU => Sample ^ (p1010337) plays without error message.

hoborg
31st August 2010, 12:12
mpc-homecinema.2397_(x86)_msvc2010 + ffdshow_rev3550_20100829_sse_icl11 from XvidVideo.RU => Sample ^ (p1010337) plays without error message.

Yes, MPC-HC will use Quicktime frameworks to play MOV file. Open it in Graphstudio and LAVF as splitter - FFDShow audio decoder refuse to connect.

STaRGaZeR
31st August 2010, 12:56
Yes, MPC-HC will use Quicktime frameworks to play MOV file. Open it in Graphstudio and LAVF as splitter - FFDShow audio decoder refuse to connect.

It plays fine with MPC's internal MP4 splitter here, so I take it's a problem with LAVFSplitter only?

hoborg
31st August 2010, 13:14
It plays fine with MPC's internal MP4 splitter here, so I take it's a problem with LAVFSplitter only?

Looks like you are right, it is working with MP4 splitter.
The problem is that MP4 splitter failed to split some MOV samples (http://hobring.esero.net/saf/samples/03_100_0435.zip) i have - there is no audio output PIN, but working fine with LAVF as splitter :/

albain
31st August 2010, 13:32
@albain:
In rev3551 you moved a statement next to the condition. Where's the fix in that?
I'm probably missing something big here, right? :o

You're right, my mistake. I changed CoTaskMemFree by free() and I had a corrrupted heap but the change was done only locally, so a commit for nothing

albain
31st August 2010, 13:35
Albain:
I've had it set to not show the tray icon at all and the option to show internal filter in the tray icon was not enabled.

I tried enabling the tray icon and then when playing a media file, right clicking the tray icon threw this error:


Enabling the tray icon or enabling the show internal filters feature had no affect on the StackOverflow error.
I'm calling QueryInterface before the graph is running (filters are added to the graph and connected), does this make a difference?

I'm on Windows 7 Pro 32bit and set the ffdshow tray icon to always show in the tray. Still using the same CLSID build.

Ok, I guess that you release the pointer after each call of QueryInterface ?
The fact that the graph is not running shouldn't have any effect

STaRGaZeR
31st August 2010, 17:04
Looks like you are right, it is working with MP4 splitter.
The problem is that MP4 splitter failed to split some MOV samples (http://hobring.esero.net/saf/samples/03_100_0435.zip) i have - there is no audio output PIN, but working fine with LAVF as splitter :/

The problem seems to be in LAVFSplitter, it's sending 00000000-0000-0010-8000-00AA00389B71 as subtype (WMMEDIASUBTYPE_Base???), while MPC's splitter is using 736F7774-0000-0010-8000-00AA00389B71 as subtype. Dunno if this is the official guid of twos, but here (http://www.codecguide.com/faq_mpc.htm) it says it is. Report this to nevcairiel, it should be easy to fix.

XhmikosR
1st September 2010, 00:04
@albain it seem you missed my previous post.

@albain: thanks for adding support for COOK audio. Here (http://www.mediafire.com/?57c26hgcb1uqc) are a few samples which don't play with the latest rev. Note that "pareme.rm" crashes mpc-hc pointing to libavcodec.dll.

I also tried this (http://samples.mplayerhq.hu/real/tv_watching_t1.rm) sample which has 1 channel 22.05Khz COOK audio and still the same. The latest ffplay has no problem with this.

Tinkerer2
1st September 2010, 12:49
The default matrices in mixer do not seem to be correct.
For example for 5.1 to 2.0 it uses 0.707 for both center and LFE. However, the LFE channel is supposed to be played 10dB louder than other channels. Is it a bug or does ffdshow compensate for this somewhere else?

Blight
1st September 2010, 13:00
Small feature request:
Accept video decoder pin connections for the "{72707A61-0000-0010-8000-00AA00389B71}" sub-type exposed by the microsoft AVI splitter. You already support decoding this video format when the "QTRpza" sub-type is used for connection (exposed by 'haali media splitter' for the same file).

Here are some sample files:
http://samples.mplayerhq.hu/V-codecs/RPZA/
(i couldn't find a splitter for the MOV files, but the jumping.avi file can be used as a test case)


Albain:
Here's my entire process for getting the stream info:

1) I enum all the filters in the graph.

2) For each filter in the graph, I call:

// dsStreamFilter is an IBaseFilter class
If dsStreamFilter.QueryInterface(IID_IAMStreamSelect, dsStreamSelect) = S_OK then // dsStreamSelect is an IAMStreamSelect class
Begin
dsStreamFilter.GetClassID(dsFilterGUID);
If (IsEqualGUID(dsFilterGUID,CLSID_FFDShow) = True) then
Begin
If dsStreamSelect.Count(StreamCount) = S_OK then // This call throws the StackOverflow exception, StreamCount is a DWord.
Begin
End;
End;
dsStreamSelect := nil; // removes the reference count and frees the object
End;


This works for every other filter supporting the IAMStreamSelect interface...
Am I doing something wrong?

STaRGaZeR
1st September 2010, 14:07
Small feature request:
Accept video decoder pin connections for the "{72707A61-0000-0010-8000-00AA00389B71}" sub-type exposed by the microsoft AVI splitter. You already support decoding this video format when the "QTRpza" sub-type is used for connection (exposed by 'haali media splitter' for the same file).

Here are some sample files:
http://samples.mplayerhq.hu/V-codecs/RPZA/
(i couldn't find a splitter for the MOV files, but the jumping.avi file can be used as a test case)

MEDIASUBTYPE_QTRpza is {617a7072-0000-0010-8000-00AA00389B71}, I couldn't find any info about {72707A61-0000-0010-8000-00AA00389B71}. Is there a know MEDIASUBTYPE_xxx for this guid?