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

clsid
1st September 2010, 14:26
72707A61 = "rpza" = FourCC "azpr"
617a7072 = "azpr" = FourCC "rpza"

STaRGaZeR
1st September 2010, 18:06
Added in r3555. jumping.avi now works with Microsoft's AVI splitter.

madshi
1st September 2010, 18:14
@ffdshow developers:

Graph:
MPC HC -> Haali MKV Splitter -> any video decoder -> ffdshow raw video filter (rev. 3529) -> any video renderer

Video:
MKV, 1 video track, 1 audio track, many subtitle tracks

In this situation there's a serious bug in the ffdshow IAMStreamSelect implementation: The media type for all streams (video, audio and subtitles) is reported as "MEDIATYPE_Video". Haali's IAMStreamSelect implementation properly reports the correct media types for all the streams.

XhmikosR
2nd September 2010, 15:34
@devs: I did a comparison between O2 and O3 with GCC 4.5.1 and there's no difference in the performance at all. And the installer's size is decreased a lot.

Installer size msvc2008 O3: 5.09MB
Installer size msvc2008 O2: 4.85MB

Maybe someone else should measure the performance and if the results are the same then change the O3 to O2.

hoborg
2nd September 2010, 21:29
Hi.
This sample (http://www.volny.cz/hoborg/test.zip) will freeze durning playback if FFDshow DXVA decoder is in use.
It play fine using MPC-HC DXVA, MS VIDEO decoder or standard FFDShow h.264 decoder.

albain
3rd September 2010, 16:50
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?


I am not very aware of delphi coding but if setting to null a variable corresponds to a Release call in CPP this should be ok.
Although, there shouldn't be any stack overflow if you call it once.

But the problem may come from this : this method will also scan the graph for IAMStreamSelect interface in the other filters. So if another filter does the same there (and calls Count method), there will be an infinite loop then a stack overflow.

I added a security for that in revision 3557


@XhmikosR No I didn't miss your post, I just didn't have the time to look after this

@Madshi I don't understand what's wrong with the behaviour you describe ?
IAMStreamSelect does not report any media type but a group number which is 1=video track, 2=audio track...

madshi
3rd September 2010, 17:07
I am not very aware of delphi coding but if setting to null a variable corresponds to a Release call in CPP this should be ok.
Yes, in Delphi setting an interface to "nil" ends up in a "Release" call.

Although, there shouldn't be any stack overflow if you call it once.

But the problem may come from this : this method will also scan the graph for IAMStreamSelect interface in the other filters. So if another filter does the same there (and calls Count method), there will be an infinite loop then a stack overflow
FWIW, in the latest madVR version I'm also calling IAmStreamSelect, and inside of ZoomPlayer that also causes a stack overflow, if ffdshow is in the graph. But strangely inside of MPC HC there doesn't seem to be a stack overflow. Weird... I've worked around it by putting the "IAmStreamSelect.Count" call into a try..except block.

@Madshi I don't understand what's wrong with the behaviour you describe ?
IAMStreamSelect does not report any media type but a group number which is 1=video track, 2=audio track...
The problem is that the group numbers are not defined anywhere. Microsoft does not say anywhere that group 1 = video, or am I wrong? As far as I can see, some splitter might also have video tracks in group 2 and audio tracks in group 1.

Anyway, look at the documentation of "IAMStreamSelect::Info". The 2nd parameter is a media type. And ffdshow *DOES* return media type information for every stream, in the 2nd parameter of the "Info" method. The problem is that ffdshow always returns a video media type, even for audio and subtitle streams. I'm using the media type to find out which group is video, audio and subtitles.

STaRGaZeR
3rd September 2010, 17:16
@devs: I did a comparison between O2 and O3 with GCC 4.5.1 and there's no difference in the performance at all. And the installer's size is decreased a lot.

Installer size msvc2008 O3: 5.09MB
Installer size msvc2008 O2: 4.85MB

Maybe someone else should measure the performance and if the results are the same then change the O3 to O2.

I've tested both with constant 35mbps H.264 Blu-ray content and I got ~155,5fps with O2 vs ~158fps with O3 in timecodec using ffmpeg-mt. GCC 4.5.1 too. I don't care about the difference nor the installer size, so you guys decide.

Specs in sig.

albain
3rd September 2010, 17:27
Madshi, you're right, there is indeed a media type information. However every players I know use the group ID with the same mapping rules even if there are no mapping rules AFAIK

This is fixed in revision 3558

@XhmikosR : the RM samples you provided won't read because of ffmpeg

codecdata_length=8
subpacket[0].cookversion=1000001
MONO
js_vlc_bits = 43947, only >= 0 and <= 6 allowed!

You can report these samples to ffmpeg team, thanks

madshi
3rd September 2010, 17:46
Madshi, you're right, there is indeed a media type information

This is fixed in revision 3558
Great - thanks!

Midzuki
3rd September 2010, 19:11
Q.: Any possibility of finally fixing this issue (http://forum.doom9.org/showthread.php?p=1431370#post1431370) ???

A.: Only after the Third Impact (if ever).

XhmikosR
3rd September 2010, 22:33
Madshi, you're right, there is indeed a media type information. However every players I know use the group ID with the same mapping rules even if there are no mapping rules AFAIK

This is fixed in revision 3558

@XhmikosR : the RM samples you provided won't read because of ffmpeg

codecdata_length=8
subpacket[0].cookversion=1000001
MONO
js_vlc_bits = 43947, only >= 0 and <= 6 allowed!

You can report these samples to ffmpeg team, thanks

All the samples play fine with the latest ffplay build so I cannot report anything to them. Only ffdshow has problems.

STaRGaZeR
4th September 2010, 00:04
I've come across a similar problem when enabling libavcodec AAC. DebugView is full of:

[7720] More than one AAC RDB per ADTS frame is not implemented. Update your FFmpeg version to the newest one from SVN. If the problem still occurs,
it means that your file has a feature which has not been implemented.
[7720] Error decoding AAC frame header.

And all I get is silence, with a clear Info&CPU tab with all AAC files I have. The AAC parser never parses anything. FFmpeg is updated. The same files play fine with ffplay. Ideas are welcomed :(

albain
4th September 2010, 15:35
All the samples play fine with the latest ffplay build so I cannot report anything to them. Only ffdshow has problems.

This is odd then, I'll check after this, maybe the ffmpeg cook decoder inside ffdshow is not up to date but I doubt it

clsid
4th September 2010, 19:10
The decoder code should be fully up-to-date. Perhaps it is a bug in the realmedia splitter?

jhoff80
4th September 2010, 22:28
Can we please get a "Disable DXVA in SD" option like in MPC-HC? As mentioned a little ways back, my ATI HD4850 doesn't like SD content when using DXVA acceleration, and the output is very blocky. At the moment, I have to manually switch between DXVA enabled for h.264 and disabled when I switch between files, and since MPC-HC does this automatically, I'd love if the same worked for ffdshow.

clsid
5th September 2010, 13:20
Use the presets functionality.

XhmikosR
5th September 2010, 15:27
The decoder code should be fully up-to-date. Perhaps it is a bug in the realmedia splitter?

It might be a bug in the MPC RealMediaSplitter indeed.

jhoff80
5th September 2010, 16:35
Use the presets functionality.

:o Wow, I can't believe I completely missed that before, thanks / sorry.

vince100
7th September 2010, 06:40
I was trying to play some TV recordings with cyberlink mpeg2 decoder and ffdshow as post-processor and VMR9 as renderer.

When used alone without ffdshow, the cyberlink mpeg2 decoder has the capability to decode closed captions and connect to a MS line 21 decoder for closed caption display.

When ffdshow is used, if the ffdshow internal mpeg2 codec was disabled, the video can be decoded by cyberlink codec (system-default) and post-processed. But closed captions would not display.

If I use ffdshow's internal mpeg2 decoder instead of commercial ones, closed captions can be displayed in ffdshow-style, but the video quality leaves a lot to be desired and cpu usage was too high.

Because closed captioning is essential for me, my question is:
Is there anyway to get closed captions displayed and also have the video decoded by a non-ffdshow mpeg2 decoder and post-processed by ffdshow's special filters?
What configuration is required in ffdshow and which player can implement this setup?


Thanks.

Midzuki
7th September 2010, 14:18
Is there anyway to get closed captions displayed and also have the video decoded by a non-ffdshow mpeg2 decoder and post-processed by ffdshow's special filters?

No.

What configuration is required in ffdshow and which player can implement this setup?

Post a "proper" bug report on the "official channels"
(this thread is not an "official" channel)
and PRAY.

:-\

jmartinr
7th September 2010, 22:30
Concerning this bug, giving problems in new builds of MPC-HC: http://forum.doom9.org/showthread.php?p=1430936#post1430936

It's enough to make a small adjustment to the contents of ffavisynth.avsi that's installed by ffdshow. A simple try... catch... will do.

try { Load_Stdcall_Plugin("ffavisynth.dll") }
catch(err_msg) { NOP() }

djcla
8th September 2010, 10:15
ANy idea why any AVI's i have with a DTS track in them stutter at the start of the video everytime when using FFDSHow? I do not get this issue bitstreaming with MS audio decoder or MPC-HC own decoders.. I have FFDSHow audio decoder setup as an external filter in MPC-HC.

I do not get this issue with DD 5.1 or HD audio i use a an ATI 5670 via HDMI out to SOny 2400ES reciever.

Next issue i have always had is when i configure FFDShow and mediaplayer or 7MC to decode H264 MKV's they always play with a green bars through them VC1 stuff is fine.

I tried using MPC-HC and FFDshow DXVA yesterday and seemed to have mroe success but need to investigate that further .

Any one else get these issues?

Snowknight26
8th September 2010, 16:01
You don't get the issue with Microsoft's audio decoder because it doesn't decode DTS.

louisnet
8th September 2010, 16:10
In recent version, the "Flip" option in context menu has been deleted,

I set the mirror in "Offset & flip" to Enable,
When I want to flip the screen horizontally, I just do to select the "Offset & flip" in Context Menu
if I want to flip the screen vertically, I just do to select the "Flip" in Context Menu.
Both function can be done thru the Context menu.

So the "Flip" option in Context Menu is very important.

Please....consider to make it appear again.
Thanks

djcla
8th September 2010, 16:21
You don't get the issue with Microsoft's audio decoder because it doesn't decode DTS.

i meant bitstreaming and the MS one works fine for that

magic144
9th September 2010, 03:21
Hooray, the ffdshow FFv tray icon right-click no longer makes ZP go boom! (build 3562) - thanks to all concerned for addressing this one!

vince100
10th September 2010, 00:55
Is there anyway to get closed captions displayed and also have the video decoded by a non-ffdshow mpeg2 decoder and post-processed by ffdshow's special filters?
What configuration is required in ffdshow and which player can implement this setup?

Thanks.

Is it possible to achieve this by using Avisynth within ffdshow?

tschi
10th September 2010, 19:09
Concerning this bug, giving problems in new builds of MPC-HC: http://forum.doom9.org/showthread.php?p=1430936#post1430936

It's enough to make a small adjustment to the contents of ffavisynth.avsi that's installed by ffdshow. A simple try... catch... will do.

try { Load_Stdcall_Plugin("ffavisynth.dll") }
catch(err_msg) { NOP() }
What do you means exactly by "enough ??" :confused:
I tried but MPC-HC still crash when I use avisynth with ffdshow :mad:
The only working solution I found is to not use MPC-HC :devil:

jmartinr
11th September 2010, 00:25
@Tschi

You might have another avsi-file in your avisynth plugin directory that loads a dll. Delete it, move it or edit it. ;)

dansrfe
11th September 2010, 16:03
Slight n00b question. I have made a script which resizes to 1080p depending on the source A/R in ffdshow and I am not quite sure if ffdshow's "Output" tab picks up the original video resolution from the initial video input before AviSynth or after AviSynth for the purpose of determining YCbCr Specification being ITU-R BT.601 or ITU-R BT.709. I hope it picks it up before AviSynth. Another probably more important question I have is that does YCbCr Specification matter if I am outputting only YV12 for madVR? In this case does madVR determine the colorspace by itself? If so then that is probably messing up due to my AviSynth resize script. Any explanation for this whole situation would be great. Thanks.

STaRGaZeR
11th September 2010, 17:18
Slight n00b question. I have made a script which resizes to 1080p depending on the source A/R in ffdshow and I am not quite sure if ffdshow's "Output" tab picks up the original video resolution from the initial video input before AviSynth or after AviSynth for the purpose of determining YCbCr Specification being ITU-R BT.601 or ITU-R BT.709. I hope it picks it up before AviSynth.

It picks the initial video input dimensions, so it guarantees that the correct matrix is used. You can check it by changing between the two to see which one is actually used.

Another probably more important question I have is that does YCbCr Specification matter if I am outputting only YV12 for madVR? In this case does madVR determine the colorspace by itself? If so then that is probably messing up due to my AviSynth resize script. Any explanation for this whole situation would be great. Thanks.

The whole "RGB conversion" tab affects things only when you're outputting RGB from ffdshow (obviously :p). If you're outputting YV12 no conversion is done in ffdshow, the video renderer (madVR in this case) does all the stuff. You should ask madshi when madVR uses each one. However, if it uses one or another based on the video dimensions that it receives from the previous filter the whole thing will be incorrect if you resize before madVR, since the resized image may toggle 709 when the video is 601 and viceversa.

Any kind of postprocessing is yet another situation where RGB32 input would make perfect sense in madVR, but madshi didn't want to add it the last time I asked for it, not even with an option to disable it.

Keiyakusha
11th September 2010, 18:02
It picks the initial video input dimensions, so it guarantees that the correct matrix is used. You can check it by changing between the two to see which one is actually used.

If we talking about avisynth script, then output colors will be wrong. What you said is valid for internal resizer only. However I'm not sure, maybe this was fixed in some of the recent revisions.
EDIT: also SD -> 1080p using internal resizing AND keeping it YV12 -> wrong colors.

STaRGaZeR
11th September 2010, 20:08
If we talking about avisynth script, then output colors will be wrong. What you said is valid for internal resizer only. However I'm not sure, maybe this was fixed in some of the recent revisions.
EDIT: also SD -> 1080p using internal resizing AND keeping it YV12 -> wrong colors.

If you're not outputting RGB ffdshow doesn't do anything. You have to convert whatever you have to RGB somewhere in the filter chain. These settings are only used when the YCbCr-->RGB conversion is done inside ffdshow. If you resize, with avisynth or the resize filter, and output YV12 or any other non-RGB colorspace, colors will be wrong if your video was mastered using 601 and the filter doing the conversion uses 709 because of the new resolution. This is not a bug in ffdshow, nor in the renderer. The selection 601 vs 709 is done assuming that certain resolutions are 601 and 709.

Example: you have SD video, ffdshow and renderer assume 601. If you resize to 1080p within ffdshow AND you output RGB, the RGB conversion will be done inside ffdshow with 601, as it should, because ffdshow knows that the source is SD. If you're NOT outputting RGB no conversion is done in ffdshow, but in the renderer. Now, the renderer sees 1080p YV12 video, it doesn't know what the original dimensions were, so it assumes 709 --> wrong colors. Again, this is not a bug, is a limitation.

Midzuki
11th September 2010, 21:16
Bug in ffdshow r3529 Audio Processor:

when a 4.0 FLAC is decoded by the latest madFlac and then sent to ffdshow audio processor, this produces a 3.1 output. :rolleyes: No problem when madFlac connects to AC3Filter, OTOH.

madshi
11th September 2010, 22:25
Bug in ffdshow r3529 Audio Processor:

when a 4.0 FLAC is decoded by the latest madFlac and then sent to ffdshow audio processor, this produces a 3.1 output. :rolleyes: No problem when madFlac connects to AC3Filter, OTOH.
FWIW, the latest madFlac version outputs a correct dwChannelMask value in the media type information. So if Midzuki's bug report is true (haven't checked), then ffdshow probably doesn't properly handle a 4.0 dwChannelMask.

Midzuki
11th September 2010, 22:36
@ madshi: the audio processor works fine when connected to the audio decoder of ffdshow, so it seems there is a "language barrier" :) between the audio processor and madFlac's decoder filter.

madshi
11th September 2010, 22:44
Can you please post the dwChannelMask information for both cases? Don't need the whole media type, just the channel mask for comparison.

Midzuki
12th September 2010, 23:52
I'm afraid I spoke too early :o ... I will have to re-create the test .WAVs and .FLACs, not only because I've already deleted them :p , but principally because, now that I think it all over, it's quite possible that they were VERY "non-standard" :( ... Just out of curiosity, does madFlac (or/and eac3to) support ALL "weird" channel masks --- let's say, 0x003C (FC, LFE, BL, BR) --- :confused:

madshi
13th September 2010, 07:30
madFlac (at least in theory) supports all channel mask combinations that can be expressed with the MS flags.

Snowknight26
13th September 2010, 16:48
Now that MPC-HC checks for the profile level of the video (so that High 4:4:4 Predictive H.264 isn't decoded with DXVA), any chance of implementing this in ffdshow? And while we're at it, perhaps fixing the broken colorspace output?

Alexander01
13th September 2010, 18:08
Can I use madVR with ffdshow?

SamuriHL
13th September 2010, 18:10
That's a question I've been tackling today. I'm told yes. My problem is that madVR appears to be 32 bit only.

nevcairiel
13th September 2010, 19:46
I can confirm that it works fine. Why wouldn't it? As long as a renderer ouputs YV12, it should work fine with madVR

SamuriHL
13th September 2010, 19:53
Yup, not only does it work, but, WOW. Just wow. It's now the setup I intend to use. And because I'm an idiot, they got me set up in 32 bit land so that Haali and MPC splitters co-exist without stepping on each other in MPC-HC. Quite frankly, madVR rocks.

P.S. I will be switching to LAVF at some point. :)

SamuriHL
13th September 2010, 20:15
Hey, can someone using 3569 tell me if subtitles are working with DXVA? They seem to have stopped working for me in both 32 bit and 64. I've tried 2 different splitters to make sure it wasn't a splitter issue. I've also tried in 2 different players. In 64 bit land I've not touched my config so this doesn't seem good. In 32 bit land I've switched to using madVR, but, even switching back to EVR CP subtitles are not showing for me. Help?

clsid
13th September 2010, 21:32
@Snowknight26
I have updated the DXVA check

magic144
14th September 2010, 16:07
@SamuriHL - have you tried changing the "Smoothing method" - I've seen before where subs appear to have stopped working between one version of ffdshow and the next, but changing to a different Smoothing method makes them reappear - dunno if that means one of the methods is no longer working of course, but that's what worked for me in the past.

SamuriHL
14th September 2010, 16:19
Yea, I had looked at that to make sure it was set right. I'll take another look when I get home. I'll report back what I find in a few hours. Thanks!

Alexander01
15th September 2010, 03:53
Is it possible to implement this in ffdshow: http://ffdshow-tryout.sourceforge.net/phpBB2/viewtopic.php?t=1000

Would be great if a start videofile with xx fps in WMC , ffdshow changes the refresh rate to xx hz. If I stop the video ffdshow should change the refresh rate back.