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
16th July 2014, 22:06
Please test which specific setting triggers the crash.

MPC-HC already has subtitle and picture properties (options > miscellaneous) functionality. Why are you using ffdshow for that?

Boardlord
16th July 2014, 22:27
Please test which specific setting triggers the crash.

MPC-HC already has subtitle and picture properties (options > miscellaneous) functionality. Why are you using ffdshow for that?

Ok, enabling Picture properites causes the crash. If only Deband&Subtitles are enabled the crash doesn't occur.

The reason I use ffdshow for these is simply ease of use - getting easy access to everything from the tray (enabling/disabling options, selecting subtitles etc.), and being used to this for the past countless years :)

Edit: Oh, and also using it because of being able to set profiles based on extensions, resolutions etc. :)

clsid
17th July 2014, 01:30
The resize workaround I mentioned before works.

I will apply a quick and dirty fix tomorrow.

Boardlord
17th July 2014, 08:58
1000x thank you :)

Boardlord
17th July 2014, 19:45
Today's build fixes the crash, thank you!

j7n
18th July 2014, 12:51
Is it known that still frame Grabbing doesn't work on oddball width (mod-2) video? I get a skewed picture with alternating red, green and blue lines in the BMP output, as if the row length was specified incorrectly. The position of the Grab filter makes no difference. Playback is correct. I can capture frames if I use AviSynth with AddBorders(0,0,2,0) above Grab, which adds a black column to bring the width to mod-4.

clsid
19th July 2014, 00:37
Now it is known. It would not surprise me if more stuff is broken for non-MOD4 widths/heights.

Don't expect this to get fixed. I only do trivial fixes. There are no active developers present in the project.

Empatojayos
13th November 2014, 02:30
I found a new SVN build (4533) in the sourceforge site. What's new?

ryrynz
13th November 2014, 04:38
I found a new SVN build (4533) in the sourceforge site. What's new?

4531: Updated to QuickSync Decoder 0.45 (r99). No ffdshow code change
4532: Avoid crash when applying Luminance gain/offset on a video with a height than is not modulo 4.
4533: Fix huffyuv encoding crash.

4532 and 4533 are patches by SpOeK!. Looks like another player has joined the game.

clsid
13th November 2014, 16:29
Nope. Development is still inactive.

mandarinka
3rd March 2015, 16:29
Is it known that still frame Grabbing doesn't work on oddball width (mod-2) video? I get a skewed picture with alternating red, green and blue lines in the BMP output, as if the row length was specified incorrectly. The position of the Grab filter makes no difference. Playback is correct. I can capture frames if I use AviSynth with AddBorders(0,0,2,0) above Grab, which adds a black column to bring the width to mod-4.

This is weird, because grab definitely used to work with non-mod4. If you need this feature, revert to some older build. (BTW if you by chance isolate at which revision this got broken, post it here, even if currently nobody is willing to fix it... it might be useful to somebody.)

Edit: I have revision 4499 (2 years old by now) installed on W8.1 64 and it works with 714x478 video (both 10-bit and 8-bit H.264). Note that I have SSE2-capable CPU, it might be different on processors without that. Also maybe try if it starts to work if you disable decoding in ffdshow and use it as a postprocessor after LAV video. Proofs :) (http://imgur.com/a/pk8Bi)

clsid
3rd March 2015, 21:32
You don't have to bother testing that older version, because nothing has changed with regard to the Grab filter. In fact, there haven't been any significant changes to ffdshow at all in the past years.

I can confirm the problem with mod2 width for BMP. PNG output works ok, so use that, or use Resize&Aspect to expand to a multiple of 4.

mandarinka
4th March 2015, 00:25
Ah, I see, I didn't try BMP. It didn't occur to me that the trouble could actually be just in the output part (IIRC png uses different colorspace). That is pretty acceptable workaround, too.

j7n
4th March 2015, 10:44
I do have SSE2, but I find PNG too slow to be practical for any kind of screen grabs without a computer from space. I usually take dozens and discard most that don't show what I want. It would be cool if the quality slider that doesn't do anything could perhaps adjust the PNG compression between none and max. I would of course use no compression for temporary grabs.

The workaround with AddBorders(0,0,2,0) works for me. I then easily crop off the extra columns with IrfanView. As far as I understand both BMP and PNG are in RGB24 color space. Here is how a broken still frame looks like: 710*480 (https://dl.dropboxusercontent.com/u/61700377/screens/_ff00074.png)

mandarinka
4th March 2015, 15:44
I do have SSE2, but I find PNG too slow to be practical for any kind of screen grabs without a computer from space. I usually take dozens and discard most that don't show what I want. It would be cool if the quality slider that doesn't do anything could perhaps adjust the PNG compression between none and max. I would of course use no compression for temporary grabs.

The workaround with AddBorders(0,0,2,0) works for me. I then easily crop off the extra columns with IrfanView. As far as I understand both BMP and PNG are in RGB24 color space. Here is how a broken still frame looks like: 710*480 (https://dl.dropboxusercontent.com/u/61700377/screens/_ff00074.png)

Both is R/G/B 8/8/8 bit, but the arrangement of the channel can be different IIRC or something - BGR/RGB etc.

foxyshadis
8th March 2015, 18:41
Moved increasingly off-topic posts about audio sampling to audio forum (https://forum.doom9.org/showthread.php?t=171895).

djonline
18th March 2015, 14:39
There is no FFV1 version 3 in ffdshow ?
Is there is any vfw build of ffv1.3 for encoding/decoding ?

HackAR
27th March 2015, 02:13
I've written a neat Avisynth script to do some transformations on the videos. But it involves changing YV12 to YV16. If I create a avs file and load the video in it, everything displays fine. But if I put the same script into Avisynth section of ffdshow (so it is active with all videos), the output is shown in wrong colorspace and colors are displaced.

Anyone met this bug? Any idea how to solve it or is there a workaround?

LigH
27th March 2015, 09:30
I doubt ffdshow supports YV16...

clsid
27th March 2015, 13:28
Try converting back to a more common colorspace at the end of the script. Like RGB32.

LigH
27th March 2015, 13:42
YUY2 would be more appropriate. It has about the same amount of information (both YUV 4:2:2), just that YV16 is planar, and YUY2 is interleaved (packed pixels).

HackAR
27th March 2015, 20:01
Yes I did a major rearrangement in my filter (Planar YV16 to Packed YUY2)
Now it works almost well in ffdshow. There are still 2 things: for some reason ffdshow still tries to output in NV12, messing with chroma values. If I deactivate the 4:2:0 output modes, it chooses RGB :confused:. Only if I deactivate RGB output too, it stays with YUY2. Why?

Btw, all other processing steps are deactivated, only the AviSynth is active.

foxyshadis
6th April 2015, 17:51
YUY2 is probably the least-commonly output colorspace of all, so it's no surprise it's the victim of driver and ffdshow bugs. It's chosen dead last because compatibility is so low.

HackAR
6th April 2015, 18:01
My first chose was YV16 ;)
But I assumed ffdshow outputs the best matched (and supported) colorspace. I was very surprised about 4:2:2 to 4:2:0 and also about YVU to RGB conversions.

shae
12th April 2015, 15:01
Is ffdshow-tryouts still the recommended way to add video/audio processing over other decoders (such as LAV)? For example, I want to get a histogram.

LigH
13th April 2015, 08:51
With both numerous built-in post-processing filters and the additional support for AviSynth filter scripts, ffdshow is probably still unrivaled.

HackAR
13th April 2015, 11:42
Yes, if ffdshow dies, an important and unmatched piece of software will be lost.

clsid
13th April 2015, 12:35
ffdshow is already dead. There are no active developers and there haasn't been any serious development in years.

Of course, it will always remain available in its current form.

mandarinka
13th April 2015, 20:51
That's the upside of windows ecosystem - you can use software that is unmaintained, and stability of frameworks like dshow sorta give it chance to work with newer components.

Hmm, now I realise that when I'll get 64bit MPC/LAV Video/MadVR now, I won't be able to use FFDshow for decimating, IVTCing and other such things... I hope having a parallel 32bit and 64bit components is going to work.

madshi
14th April 2015, 02:00
Parallel installation works just fine, no problems whatsoever. And for decimating & IVTC madVR's forced film mode should do the trick. It does even things like 720p60 -> 720p24 decimation etc...

Olivier C.
16th April 2015, 18:37
Hi clsid,

I have some questions to the great expert you are.

I've seen this in FFDShowAPI.cs :

public String ActivePreset
{
get
{
string tmpStr = getStringParam(FFDShowConstants.FFDShowDataId.IDFF_OSDcurPreset);
if (tmpStr != null && !tmpStr.Equals(""))
{
return tmpStr;
}
else
{
return DefaultVideoPreset;
}
}
set
{
if (IsFFDShowActive)
{
PlayState playState = getState();
if (playState == PlayState.PlayState || playState == PlayState.FastForwardRewind)
pauseVideo();
Win32.COPYDATASTRUCT cd = new Win32.COPYDATASTRUCT();
cd.dwData = new UIntPtr((uint)FFDSM_SET_ACTIVE_PRESET_STR);
#if UNICODE
cd.lpData = Marshal.StringToHGlobalUni(value);
#else
cd.lpData = Marshal.StringToHGlobalAnsi(value);
#endif
cd.cbData = (uint)Win32.GlobalSize(cd.lpData);
if (receiver == null)
receiver = new FFDShowReceiver(Thread.CurrentThread);
receiver.ReceivedString = null;
receiver.ReceivedType = 0;
//receiver.ParentThread = Thread.CurrentThread;
Win32.SendMessage(new IntPtr(ffDShowInstanceHandle), Win32.WM_COPYDATA, receiver.Handle.ToInt32(), ref cd);
if (playState == PlayState.PlayState || playState == PlayState.FastForwardRewind)
startVideo();
}
DefaultVideoPreset = value;
}
}


Problem 1 :

I realized that changing preset while a video is playing can crash the player, especially when avisynth is enabled within ffdshow.
I realized that pausing the video before changing preset helps a lot.
But if we look in the code above, we can see that you already did this stuff.

At the beginning of the ActivePreset set Method, if the video is playing or seeking, it is paused because of this :
PlayState playState = getState();
if (playState == PlayState.PlayState || playState == PlayState.FastForwardRewind)
pauseVideo();


At the end of the function, we have :
Win32.SendMessage(new IntPtr(ffDShowInstanceHandle), Win32.WM_COPYDATA, receiver.Handle.ToInt32(), ref cd);
if (playState == PlayState.PlayState || playState == PlayState.FastForwardRewind)
startVideo();

Maybe a sleep between the SendMessage and startVideo could help ?


Problem 2 :

ActivePreset get method does not seem to work. It contains the wrong current preset.
Maybe a bug ?

ActivePreset set method works fine !


System :

Windows 7 x64
ffdshow last release (32 bit)
32 bits chain : MPC-HC + LAV splitter + LAV video decoder + ffdshow Raw filter + madVR
VS 2013 / C# & VB .NET / .NET Framework 4.5

Thanks a lot

Olivier

thomaz909
19th April 2015, 16:56
BUG IN FFDSHOW OR AVISYNTH ?
30fps.avi (http://www7.zippyshare.com/v/sktyv6yc/file.html)
mediainfo says:

Video
ID : 0
Format : MPEG-4 Visual
Format profile : Advanced Simple@L5
Format settings, BVOP : Yes
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Codec ID : XVID
Codec ID/Hint : XviD
Duration : 25s 167ms
Bit rate : 1 300 Kbps
Width : 624 pixels
Height : 352 pixels
Display aspect ratio : 16:9
Frame rate : 30.000 fps
Original frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.197
Stream size : 3.90 MiB (99%)
Writing library : XviD 1.2.1 (UTC 2008-12-04)

in ffdshow an avisynth script uses the "original frame rate" value instead of the "frame rate" value.
ffdshow info tab says 30.000 fps but avisynth still thinks that its 23.976. :(
and due to this my changefps script doesnt work correctly:
(FrameRate < 25.001) ? ChangeFPS(FrameRate * 2) : last
the video is faster than 25.001 fps and changefps(framerate * 2) must not be done. but it is used.

i dont know if its ffdshows or avisynths fault.

with .mkv all runs fine.

any ideas ?

SeeMoreDigital
19th April 2015, 18:10
BUG IN FFDSHOW OR AVISYNTH ?
More likely an issue with the MPEG-4 ASP video stream, where the 3:2 pull-down flags have become borked!

This provides a good example of why the .avi container is no longer used ;)

thomaz909
19th April 2015, 21:01
lav splitter
lav video decoder
ffdshow raw decoder > avisynth

how does avisynth gets the information ?

lav splitter reports "original framerate" to lav video decoder.
lav vid dec reports ffdshow "original framerate" ?
and finally ffdshow passes this value to avisynth ?

i have no idea from where avisynth gets the "original framerate" information.

any chance that ffdshow devs can force avisynth to use the "frame rate" value instead of "original framerate" ?

LigH
19th April 2015, 21:12
Where exactly is AviSynth involved at all? MediaInfo is not related to AviSynth.

thomaz909
20th April 2015, 13:44
now i tried to achieve my goal with "automatic preset loading" and guess what happens.
exactly the opposite.
i use "on frame rate match" with "fps<25" and with the 30fps.avi (http://www7.zippyshare.com/v/sktyv6yc/file.html) the correct preset is loaded but with 30fps_native.avi (http://www90.zippyshare.com/v/YTToX4UM/file.html) (which has no "original framerate" info in it) the preset is not loaded and the default one is used.

on both files ffdshow says "movie fps: 30.000" but different presets are loaded !!!

i now think its absolutely ffdshow related and has to get fixed *dream*.

clsid
20th April 2015, 15:14
If you turn on the OSD in ffdshow you can see that the "Movie FPS" value changes from 23.975 to 30.000 after the first few frames. The present is selected based on the initial value and isn't changed during playback.

clsid
20th April 2015, 15:16
@Olivier
The people who wrote all that code are not around anymore. I will gladly commit any patches for bug fixes that people submit here, but other than that I am not able to provide any assistance.

thomaz909
21st April 2015, 16:24
If you turn on the OSD in ffdshow you can see that the "Movie FPS" value changes from 23.975 to 30.000 after the first few frames. The present is selected based on the initial value and isn't changed during playback.

yep. i see it.
it jumps from 23.975 to 30.000.
so the component which causes this must get fixed.
ffmpeg ?
btw. when i use xvid decoder it jumps from 25.000 to 30.000.

Olivier C.
23rd April 2015, 17:58
@Olivier
The people who wrote all that code are not around anymore. I will gladly commit any patches for bug fixes that people submit here, but other than that I am not able to provide any assistance.

Thanks a lot for your answer.
I will try to fix it myself.

kiwijunglist
19th May 2015, 02:13
Hi I have a couple of questions about ffdshow audio decoder.

1. Are there any recent good guides for using ffdshow for room correction? - The guides I've found are all from about 5-10 years ago, and I wonder if things have become simplified since then.

2. Is it possible to load a seperate ffdshow audio configuration depending on whether the decoded audio is 5.1 vs 6.1 vs 7.1? - The reason I ask is because I run 5.1 audio but want to run a custom mixdown to 5.1 where I mixdown surround rear right into 80% surround rear + 20% surround rer left, etc. Creating virtual rear speakers. All of the current mixdown methods eg. ffdshow default mixing, windows mixing, my avr all just copy surround rear right directly into surround right channel.

EDIT: I see you can load a preset based on number of channels match.

3. It looks like the decoder now support DTS-HD MA/Dolby TrueHD lossless audio. That is great news!

clsid
19th May 2015, 16:11
ffdshow does not support DTS-HD MA. You must be confusing it with LAV Audio Decoder.

Redmist
6th June 2015, 04:54
Is there any way to detect video frame rate for auto preset loading for the audio decoder?

My 2011 Samsung 65" plasma has a ~250ms processing delay when running in 24Hz mode and a ~70ms delay when running in 50/60Hz mode.

I would like to load an FFDShow audio preset with a 250ms delay if the video is 23.976 or 24fps else use a 70ms audio delay.

Is it possible? At the moment, I'm just defaulting to 250ms and then manually creating a preset file for any non-24fps videos which is a bit of a pain.

jmartinr
6th June 2015, 09:24
Is there any way to detect video frame rate for auto preset loading for the audio decoder?

My 2011 Samsung 65" plasma has a ~250ms processing delay when running in 24Hz mode and a ~70ms delay when running in 50/60Hz mode.

I would like to load an FFDShow audio preset with a 250ms delay if the video is 23.976 or 24fps else use a 70ms audio delay.

Is it possible? At the moment, I'm just defaulting to 250ms and then manually creating a preset file for any non-24fps videos which is a bit of a pain.

If you use a ~180ms delay in 50/60Hz mode through a FFDSHOW _video_ preset, you might be able to even it out.

ryrynz
6th August 2015, 05:49
Anyone else getting crashes when the Avisynth box is ticked even with nothing in it on Windows 10?

*EDIT* Fixed it, rogue plugin.

LigH
24th August 2015, 09:08
A discussion came up in the German doom9/Gleitz board regarding FFV1 as an "archival format", and its support in ffdshow. According to Wikipedia, the format v3 is "frozen" since 2013. But AVIs generated with ffvfw seem to contain the version number 0 (not sure how to check that, ffdshow version information tells little details, only the libav date stamp). I'd assume that the last build from clsid would contain current ffmpeg sources of that time (2014), so is it quite certain that FFV1 videos created by this version (as long as there are VfW based workflows, e.g. while capturing) are in a stable format?

clsid
24th August 2015, 12:29
The ffmpeg stuff was last updated in ffdshow 3 years ago. But a lot of code is even older, because ffdshow uses old ffmpeg APIs. So updating would require rewriting a lot of code. It would be far easier to write a whole new VFW wrapper for ffmpeg.

foxyshadis
25th August 2015, 13:43
If you use the same ffdshow, it's always stable, of course. To be frank, I don't think ffdshow will be updated to any new formats; LAV has taken over the decoding side of things.

Whether that applies to FFV1 as an ongoing format, you'd have to ask the ffmpeg devs. They control the format.

clsid
25th August 2015, 14:14
He was referring to the FFV1 encoder.

The FFV1 decoder in LAV/FFmpeg should be fully backward compatible.

LigH
25th August 2015, 15:50
To summarize again: A few people may be interested in using FFV1 in version 3 to capture video. May it just be due to curiosity. Unfortunately, ffdshow may not provide such a recent FFV1 encoder code, and there may not yet be any other FFV1 VfW codec; LAV Filters may provide FFV1 as DirectShow encoder (if Wikipedia is correct), but hardly any software supports DirectShow encoders at all (I only know some GrassValley software as prominent exception). As a CLI encoder, ffmpeg provides FFV1 in version 3, but is not usable as "inline" encoder (especially not for capturing).

Because ffdshow's VfW bridge to the ffmpeg API (ffvfw) won't be updated anymore, clsid concluded that ffdshow won't be the solution for these few people; instead, rather any other possible VfW bridge for ffmpeg (provided anyone would ever create one)...