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

tal.aloni
13th December 2008, 23:09
Soulhunter,
Please test AC3Filter, and see if you get a similar behavior.

Tal

Atak_Snajpera
14th December 2008, 00:08
Im not sure if its just "GTAIV.exe" or if "LaunchGTAIV.exe" is also involved, I blocked both!
i wonder why GTAIV crashes? FFdshow does not load if you do not accept it in pop-up window. Fallout3 does not crash but that pop-up window may annoy some gamers.

Soulhunter
14th December 2008, 00:15
Soulhunter,
Please test AC3Filter, and see if you get a similar behavior.

Tal

- Activating AC3filter's passtrough while playback -> Works, just like in ffdshow (Receiver switches from 2ch PCM -> 5.1 AC3)

- Starting playback with already activated passtrough -> Outputs a signal my receiver accepts as AC3, but its just noise/crackling

- Changing the default audio renderer to WaveOut -> Playback with already activated passtrough works! (Guess I'll use this solution for now...)

- Changing ffdshow's output to WaveOut (because it worked for AC3filter) -> Outputs a signal my receiver accepts as AC3, but audio + video playback is choppy


Bye

Soulhunter
14th December 2008, 00:26
i wonder why GTAIV crashes? FFdshow does not load if you do not accept it in pop-up window. Fallout3 does not crash but that pop-up window may annoy some gamers.
What popup window? ^^;


Bye

clsid
14th December 2008, 00:50
If you enable the whitelist, then a "compatibility manager" dialog appears whenever some unknown application tries to load ffdshow. It can easily be disabled in the options. The whitelist is disabled by default anyway so most people will never see such a dialog.

Atak_Snajpera
14th December 2008, 00:59
What popup window? ^^;
http://img262.imageshack.us/img262/1672/new1rc7.th.png (http://img262.imageshack.us/my.php?image=new1rc7.png)

you have to enable these 2 options

The whitelist is disabled by default anyway so most people will never see such a dialog.
is there any reason why it is disabled by default. Forgive me but my common sense tell me that it should be enabled by default to avoid crashes in new games.

fastplayer
14th December 2008, 01:16
We can't whitelist all existing apps/games. There are just too many. If we enable the whitelist, then we would exclude tons of apps/games that have no problem with ffdshow whatsoever.

Atak_Snajpera
14th December 2008, 07:35
then we would exclude tons of apps/games that have no problem with ffdshow whatsoever.
in this case you will see pop-up window to enable decoding or disable decoding by ffdshow. it's better than adding manually each time .exe to 'Don't use' section when the game crashes. Many users do not even know that crash is caused by ffdshow. Instead they blame game programmers.

_xxl
14th December 2008, 10:01
The whitelist is disabled by default anyway so most people will never see such a dialog.
We can't whitelist all existing apps/games. There are just too many. If we enable the whitelist, then we would exclude tons of apps/games that have no problem with ffdshow whatsoever.
I would like the whitelist to be enabled by default.

leeperry
14th December 2008, 10:23
well, set the whitelist to your media players only...and you're good to go?

fastplayer
14th December 2008, 13:41
it's better than adding manually each time .exe to 'Don't use' section when the game crashes.
In a perfect world, you would not need to patch your game. Unfortunately, we live in an imperfect one, and you have to patch your game and sometimes even the video drivers to keep it from crashing and doing other abnormal things. Heck, game publishers release patches even before the game gets on the market! So, if you can patch your game and upgrade the video drivers, you can certainly update ffdshow.
Many users do not even know that crash is caused by ffdshow. Instead they blame game programmers.
Why does ffdshow get called in a game in the first place? Maybe to display in-game video sequences, maybe for audio playback? Isn't it possible to do that in a DirectShow-compliant way?
I'm more interested in the cause of the crashes than playing The Blame Game™...

I've just taken a look at our whitelisted/blacklisted apps that get reported via the compatibility manager.
Reported since Nov, 1st until today:
- Whitelist: 2173 (including duplicates: 4830)
- Blacklist: 629 (including duplicates: 908)
This should give you an rough idea of the dimensions we're dealing with here.

roozhou
14th December 2008, 16:24
Through the avisynth filter you can get the DAR, resize and reset the DAR to the old value.

But I'm quite positive that you can also achieve what you want by using the resize & aspect filter with "keep original aspect ratio" and "process pixel aspect ratio internally" enabled.

So i need to manually calculate PAR myself? Is there an automatical way? I mean adding a "keep PAR unchanged" in crop filter, and "keep DAR unchanged" in resize & aspect.

jmartinr
14th December 2008, 17:14
So i need to manually calculate PAR myself? Is there an automatical way? I mean adding a "keep PAR unchanged" in crop filter, and "keep DAR unchanged" in resize & aspect.
Do use the avisynth filter for cropping. In my experience that's the only way to automatically keep the PAR unchanged in ffdshow whilst cropping.

CruNcher
14th December 2008, 19:12
2460

09.12.2008

Added support for FourCC WMVA

Finally :) that took a long time though
http://forum.doom9.org/showthread.php?p=1192845#post1192845
2 month adding a FourCC ?

clsid
14th December 2008, 19:45
Actually someone else recently also requested it. I thought ffdshow already supported that FourCC, but it turned out it didn't.

roozhou
14th December 2008, 20:04
Do use the avisynth filter for cropping. In my experience that's the only way to automatically keep the PAR unchanged in ffdshow whilst cropping.

Why not implement this in ffdshow internally? Consider this as a feature request.

Atak_Snajpera
14th December 2008, 21:59
Heck, game publishers release patches even before the game gets on the market! So, if you can patch your game and upgrade the video drivers, you can certainly update ffdshow.
tell that to angry gamers amigo! Please update drivers , .Net , Visual C++ and the most important part kids is installing latest ffdshow :) have fun! Do you really what to blame every game developer for calling DirectShow filter/codec ??? We can easlly avoid that by setting whitelist by default. If app is not listed then let's ask user for permission. I had white list enabled from the beginning and never had problems with crashing games.

tal.aloni
14th December 2008, 22:32
Albain, clsid, Haruhiku,
a while ago I reported that 44,100 DTS tracks are playing back too fast when passing through, and I found the cause.


I was able to fix this,
+ Added support for SPDIF sample rates different than 48,000.
(pass-through of 44.1Khz AC3/DTS streams will now be played back correctly)

Guys, please test this release, I'm now able to pass-through everything correctly.

Note: some work is still needed on encoding to 44.1 kHz AC3, my patch only cover pass-through issues.
(currently, encoding 44.1 kHz AC3 will result in choppy playback, so it's recommended to resample to 48kHz before, this is not a new issue)

patch:
http://iknowu.net/files/public/ffdshow/SPDIF/2486-SPDIF.patch

build:
http://iknowu.net/files/public/ffdshow/SPDIF/ffdshow_rev2486-SPDIF_20081210.exe

Tal

tal.aloni
14th December 2008, 22:38
We can easlly avoid that by setting whitelist by default.

I'm against it as well.

CruNcher
14th December 2008, 23:31
@clsid
would it be possible to support Elecards Mpeg and Mp4 Demultiplexers :) watching RAW bitstreams (Annex B Progressive AVC for example) with ffdshow with them isn't really nice CoreAVC, Cyberlink and DivX are interoperable with them ffdshow, MPCs Video Decoder and Arcsoft have problems (garbaged output,black screen, no connection) :(

clsid
15th December 2008, 00:26
tell that to angry gamers amigo! Please update drivers , .Net , Visual C++ and the most important part kids is installing latest ffdshow :) have fun! Do you really what to blame every game developer for calling DirectShow filter/codec ??? We can easlly avoid that by setting whitelist by default. If app is not listed then let's ask user for permission. I had white list enabled from the beginning and never had problems with crashing games.
Enabling the whitelist causes it own share of problems. Mainly lots of confused people that unexpectedly get a pop-up dialog about ffdshow. Games may still show problems due to the dialog. Hiding the dialog by default is also not a good option.
Changing the whitelist settings also isn't going to solve problems for people running old versions of ffdshow.
Only few games use DirectShow in a way where ffdshow could interfere. All popular ones are already blacklisted. A problem is that many people have outdated blacklists. I think should hardcode part of the blacklist (mostly games) to solve that issue.

clsid
15th December 2008, 00:28
@clsid
would it be possible to support Elecards Mpeg and Mp4 Demultiplexers :) watching RAW bitstreams (Annex B Progressive AVC for example) with ffdshow with them isn't really nice CoreAVC, Cyberlink and DivX are interoperable with them ffdshow, MPCs Video Decoder and Arcsoft have problems (garbaged output,black screen, no connection) :(
Sorry, I can't do that. Haruhiko knows more about that. If you can supply him those filters and some samples files, then maybe he can take a look at it for you.

Atak_Snajpera
15th December 2008, 01:17
Games may still show problems due to the dialog.
Dialog disappears after 20 seconds so I see no problem.
Mainly lots of confused people that unexpectedly get a pop-up dialog about ffdshow
Between two evils I would choose stability in new game over pop-up window which in fact automatically disappears. Do you really want to maintain blacklist to the rest of your days? It's like fighting with viruses. You will always be one step behind.

haruhiko_yamagata
15th December 2008, 10:40
I was able to fix this,
+ Added support for SPDIF sample rates different then 48,000.
(pass-through of 44.1Khz AC3/DTS streams will now be played back correctly)

Guys, please test this release, I'm now able to pass-through everything correctly.
Good work. Please commit it to the trunk. We'll merge it to beta6 branch before release.Note: some work is still needed on encoding to 44.1 kHz AC3, my patch only cover pass-through issues.
(currently, encoding 44.1 kHz AC3 will result in choppy playback, so it's recommended to resample to 48kHz before, this is not a new issue)
Yes, it's necessary. I've been too lazy to fix it. :thanks:

fastplayer
15th December 2008, 11:03
Added to changelog.

Shinigami-Sama
15th December 2008, 18:25
Dialog disappears after 20 seconds so I see no problem.

Between two evils I would choose stability in new game over pop-up window which in fact automatically disappears. Do you really want to maintain blacklist to the rest of your days? It's like fighting with viruses. You will always be one step behind.

you've never tried to play a game and have it crash from ffdshow hanging it for those 20 seconds then have you?

tal.aloni
15th December 2008, 22:31
currently, encoding 44.1 kHz AC3 will result in choppy playback, so it's recommended to resample to 48kHz before, this is not a new issue)


I've invested a few hours today to find the root cause of this issue.
eventually, I found out that it's a bug in ffmpeg,
ffmpeg simply cannot produce valid 44.1kHz AC3 streams.
(48kHz and 32kHz are fine)

this issue affects BeHappy as well (ffmpeg AC3 Decoder).

Edit:
it's more complicated,
I can pass-through the AC3 created with BeHappy and it plays fine,
the one created with ffdshow is choppy.
both are choppy when decoded with AC3Filter.

tal.aloni
15th December 2008, 22:59
I've commited a tiny improvement to the AC3 Encode mode,
as I see it, in some rare occasions, a sample would be unnecessary delayed.


Index: src/audioFilters/TaudioFilterOutput.cpp
===================================================================
--- src/audioFilters/TaudioFilterOutput.cpp (revision 2492)
+++ src/audioFilters/TaudioFilterOutput.cpp (working copy)
@@ -179,7 +179,7 @@
TbyteBuffer::iterator inputsamples=ac3inputbuf.begin();
int inputsize=(int)ac3inputbuf.size();
int ac3framesize=avctx->frame_size*fmt.blockAlign();
- while (inputsize>ac3framesize)
+ while (inputsize>=ac3framesize)
{
int ret=libavcodec->avcodec_encode_audio(avctx,ac3buf,AC3_MAX_CODED_FRAME_SIZE,(const short*)&*inputsamples);
HRESULT hr;

nautilus7
15th December 2008, 23:18
It's really good that someone is taking care of all these small bugs. Thank you.

tal.aloni
16th December 2008, 14:19
Commited as rev. 2495:

+ Updated FIR filter description
+ Added tooltip to AC3 encode mode, detailing the supported sample rates.

(http://iknowu.net/files/public/ffdshow/2491-Hint.patch)

I hope this is a good work-around for now, another one would be to automatically resample to 48kHz before encoding.
(this is less prefered since in the future, when 44,100 will be supported, it may start causing problems to some users with equipment that does not support 44,100kHz)

Jeremy Duncan
17th December 2008, 02:19
link (https://sourceforge.net/tracker/index.php?func=detail&aid=2436501&group_id=173941&atid=867363)

To the ffdshow developers. I have made a thread in the sourceforge website for a requested feature.

And for some reason I can't get ffdshow audio to let me use windows media player for mp3. I use vista 32 bit premium and xp pro.
I tried various versions of ffdshow. These are my ffdshow audio settings.

________ FFdshow Audio Decoder ________

Codecs tab
- AC3 Tab
Decoder liba52
Do Not Check "Dynamic Range compression"
Do Not Check Use SPDIF when AC3 output set

- DTS Tab
Decoder libdts
Do Not Check "Dynamic range compression"
Do not Check "...for DTS in WAV"
Do Not Check Use SPDIF when AC3 output set

- Uncompressed Tab
Set it to "all supported"

Mixer tab
- 5.1, or stereo

Output tab,
analog.) 24 bit sound,

rack04
17th December 2008, 14:17
Is anyone else experiencing ~2x playback speed using libavcodec for mp3 in ffdshow tryouts mt svn 2484? Plays fine using libmad.

This problem still exists with ffdshow-mt revision 2497.

clsid
17th December 2008, 14:30
And for some reason I can't get ffdshow audio to let me use windows media player for mp3. I use vista 32 bit premium and xp pro.That is because WMP uses its own DMO decoder for MP3 files. No solution for that, except to go harass MS.

haruhiko_yamagata
17th December 2008, 15:41
This problem still exists with ffdshow-mt revision 2497.
Is the trunk build OK?

rack04
17th December 2008, 18:17
Is the trunk build OK?

libavcodec plays mp3 at normal speed using ffdshow rev2498.

clsid
17th December 2008, 19:14
Selecting the option in the installer to reset the ffdshow settings only applies to the current Windows user account. However, it is of course desirable to reset the settings for all user accounts. It is technically not possible to do that from the installer, so it has to be implemented into ffdshow. I propose the following scheme:

The installer creates to following registry value (when reset option is enabled):
HKLM\Software\GNU\ffdshow, ResetSettingsIfOlderThanRevision: dword

Whenever ffdshow loads, it checks if the above registry value exists. If the value exists, then it should check if this value also exists:
HKCU\Software\GNU\ffdshow, SettingsResetAtRevision: dword
Settings should be reset when the above value does not exist, or if it has a value that is smaller than ResetSettingsIfOlderThanRevision.

Resetting the settings means deleting the registry keys
HKCU\Software\GNU\ffdshow*
And then create value SettingsResetAtRevision with value that equals ResetSettingsIfOlderThanRevision.

This should all be done when ffdshow initializes, and before it reads any settings.
It may be tricky if the audio/video decoder are loading simultaneously. So a critical section or some other solution may be needed.

Opinions? Comments?
Is there anyone that has time to implement this scheme?

leeperry
17th December 2008, 19:36
I was just trying the 2488 build of ffdshow-mt

first, if you don't install the VFW components you get an error msg that "pthreadGC2.dll was not installed" :(

also it's not ICL10 compiled so ffdshow audio code is not optimized as much for my Q6600 I guess.

anyway results on a test h264 file are pretty impressive....I guess CoreAVC will soon have to support CUDA otherwise it's gonna become more and more useless :o

CoreAVC 1.85 + ffdshow Avisynth/sharpening :
User: 8s, kernel: 1s, total: 10s, real: 13s, fps: 48.6, dfps: 37.7
User: 8s, kernel: 2s, total: 10s, real: 13s, fps: 48.9, dfps: 37.7
User: 8s, kernel: 1s, total: 10s, real: 13s, fps: 48.4, dfps: 37.7

ffd 2447 icl10 :
User: 8s, kernel: 2s, total: 10s, real: 14s, fps: 46.1, dfps: 34.5
User: 8s, kernel: 2s, total: 10s, real: 14s, fps: 46.6, dfps: 34.6
User: 8s, kernel: 2s, total: 10s, real: 14s, fps: 46.5, dfps: 34.6

ffd 2488 mt :
User: 8s, kernel: 2s, total: 10s, real: 13s, fps: 48.9, dfps: 37.2
User: 8s, kernel: 1s, total: 10s, real: 13s, fps: 48.1, dfps: 37.3
User: 8s, kernel: 2s, total: 10s, real: 13s, fps: 47.5, dfps: 37.1

fastplayer
17th December 2008, 20:37
Opinions? Comments?
Why not take this one step further? Allow during setup to choose between per user (HKCU) vs. global settings (HKLM).

Edit: Regarding ffdshow_prebeta6_rev2504_20081217.exe (http://downloads.sourceforge.net/ffdshow-tryout/ffdshow_prebeta6_rev2504_20081217.exe):
Looks like Beta 6 is 32-bit-only. No 64-bit version planned, right?

clsid
17th December 2008, 21:40
Why not take this one step further? Allow during setup to choose between per user (HKCU) vs. global settings (HKLM).That would require major changes to ffdshow. Also, regular user accounts can't write to HKLM. Storing settings in an INI file would be a better alternative. But I doubt anyone is willing to implement that, so forget about it.

Looks like Beta 6 is 32-bit-only. No 64-bit version planned, right?64-bit builds are not stable yet

Atak_Snajpera
17th December 2008, 22:04
I was just trying the 2488 build of ffdshow-mt

first, if you don't install the VFW components you get an error msg that "pthreadGC2.dll was not installed"

also it's not ICL10 compiled so ffdshow audio code is not optimized as much for my Q6600 I guess.

anyway results on a test h264 file are pretty impressive....I guess CoreAVC will soon have to support CUDA otherwise it's gonna become more and more useless
What is still missing in MT version? Will normal version be replaced by MT soon?

fastplayer
17th December 2008, 22:08
64-bit builds are not stable yet
OK, I'll update the new homepage accordingly. Haruhiko wasn't quite sure when I asked whether there'll be a 64-bit build...

clsid
17th December 2008, 22:13
What is still missing in MT version? Will normal version be replaced by MT soon?
Not anytime soon. It may take several more months before it is ready. Certainly since its developer is not very active.

fastplayer
17th December 2008, 22:14
What is still missing in MT version?
http://gitorious.org/projects/ffmpeg/repos/ffmpeg-mt/blobs/master/mt-work/todo.txt

LoRd_MuldeR
17th December 2008, 22:52
http://gitorious.org/projects/ffmpeg/repos/ffmpeg-mt/blobs/master/mt-work/todo.txt

But do any of these TODO's actually affect ffdshow? Are there any known regressions?

I switched over to ffdshow-MT a while ago and didn't notice any problems, at last no additional problems (compared to "normal" branch). Seems pretty stable :)

So far I only saw one H.264 sample that had display errors (was posted in this thread) and that issue could be fixed by settings threads to 1.

Well, I certainly don't use/test any single aspect of ffdshow, so there might be problems I don't notice...

tal.aloni
17th December 2008, 23:22
it is of course desirable to reset the settings for all user accounts.

I tend to disagree,
why does another user should have the power to reset my equalizer settings? I think another user should be able to reset his own settings and the "common" settings. this should be able to ensure a "clean slate" with minimum damage to other users.

Mr VacBob
18th December 2008, 05:36
But do any of these TODO's actually affect ffdshow? Are there any known regressions?

I switched over to ffdshow-MT a while ago and didn't notice any problems, at last no additional problems (compared to "normal" branch). Seems pretty stable :)

So far I only saw one H.264 sample that had display errors (was posted in this thread) and that issue could be fixed by settings threads to 1.


Well, that is a regression.

I had no time to work on it during school, but now I can again, and I think I found the problem with that sample (some problem with Picture.ref_index). I'll try to fix it soon.

Even after I fix everything in the todo, there are some API and philosophical issues to work out before submitting it to mainline again, though.

edit: actually, it was because the dequant matrix changes in the middle of the stream

squid_80
18th December 2008, 09:23
I guess CoreAVC will soon have to support CUDA otherwise it's gonna become more and more useless :o
Before jumping on the GPU decoding bandwagon I suggest you run benchmarks comparing the decoding speed of DGAVCDecNV vs. ffdshow-MT/CoreAVC. (I don't meaning disabling the display in DGAVCIndexNV and pressing F6, it's not an accurate benchmark.)

cca
18th December 2008, 09:40
i was just trying the 2488 build of ffdshow-mt

first, if you don't install the vfw components you get an error msg that "pthreadgc2.dll was not installed" :(



That's strange, haruhiko fixed that in revision 2353, do we have a regression?

haruhiko_yamagata
18th December 2008, 10:31
I had no time to work on it during school, but now I can again, and I think I found the problem with that sample (some problem with Picture.ref_index). I'll try to fix it soon.Wonderful news. And nice to see you in this thread.

leeperry
18th December 2008, 10:37
That's strange, haruhiko fixed that in revision 2353, do we have a regression?
yeah, that's how I found out that I had to install the VFW components...some hiccup in the installer I guess.
Before jumping on the GPU decoding bandwagon I suggest you run benchmarks comparing the decoding speed of DGAVCDecNV vs. ffdshow-MT/CoreAVC. (I don't meaning disabling the display in DGAVCIndexNV and pressing F6, it's not an accurate benchmark.)
well if it lets my GPU do the job, this will leave my CPU alone for HD post-processing(gamut conversion/LSF etc) :D