Log in

View Full Version : LAV Filters - DirectShow Media Splitter and Decoders


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 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508

nevcairiel
5th March 2012, 13:36
If you want DXVA on Windows XP, LAV is not for you.

madshi
5th March 2012, 13:50
DXVA2 isn't available on Windows XP, as Nev said two posts above yours...
That is not true. DXVA2 works just fine on XP, if you install .NET 3.0. When nevcairiel really meant is: "DXVA2 is only supported by LAV Video Decoder on Windows Vista/7".

DragonQ
5th March 2012, 13:57
lol what I meant was:

DXVA2 Native/Copy-Back isn't available on Windows XP, as Nev said two posts above yours...

(implying LAV)

madshi
5th March 2012, 14:01
Ah, ok... :)

nevcairiel
5th March 2012, 14:08
I haven't seen any evidence that DXVA2 decoding actually works on XP. DXVAChecker isn't exactly proof.
Not that it really matters, i have no DXVA capable PC with XP on it to test and confirm, and i usually don't implement/enable features that i cannot test myself.

dead_screem
5th March 2012, 14:17
I haven't seen any evidence that DXVA2 decoding actually works on XP. DXVAChecker isn't exactly proof.

Yeah really. Under XP on my 9800GTX, it shows as DXVA1/2 for the partial acceleration modes (IDCT) but DXVA1 for the H.264 VLD. If it was checking the hardware and not careing about OS support, then a H.264 DXVA2 mode should show... but it doesn't.
It also shows all modes as supporting 4K resolution... but my 9800GTX is VP2/VDPAU A, and 4K decoding wasn't added until VP5/VDPAU D. So yeah, DXVAChecker can't exactly be trusted.

madshi
5th March 2012, 15:57
I haven't seen any evidence that DXVA2 decoding actually works on XP. DXVAChecker isn't exactly proof.
Not that it really matters, i have no DXVA capable PC with XP on it to test and confirm, and i usually don't implement/enable features that i cannot test myself.
This is not really important to me, but I do like to have things cleared up. So I just tested decoding an SD VC-1 sample with the ffdshow DXVA decoder with EVR Custom on my XP machine and it worked just fine, saying "Playing [DXVA]" in the MPC-HC status line. Also CPU was < 10% instead of 35% when using software decoding. Ok, I got corruption when trying to play a HD movie, but I guess that's probably a bug in ffdshow. Anyway, it generally seems to work just fine, and as far as I know, EVR Custom does not support DXVA1, so ist must be DXVA2.

DragonQ
5th March 2012, 17:09
This is not really important to me, but I do like to have things cleared up. So I just tested decoding an SD VC-1 sample with the ffdshow DXVA decoder with EVR Custom on my XP machine and it worked just fine, saying "Playing [DXVA]" in the MPC-HC status line. Also CPU was < 10% instead of 35% when using software decoding. Ok, I got corruption when trying to play a HD movie, but I guess that's probably a bug in ffdshow. Anyway, it generally seems to work just fine, and as far as I know, EVR Custom does not support DXVA1, so ist must be DXVA2.
According to Microsoft:

If the graphics drivers uses the older Windows XP Display Driver Model (XPDM), DXVA 2 API calls are converted to DXVA 1 DDI calls.

madshi
5th March 2012, 17:25
What happens behind the scenes is not important. Fact is that DXVA2 decoding + deinterlacing generally seems to work just fine in XP, from the view point of DirectShow decoders and renderers (provided that .NET 3.0 was installed).

CharlieCL
5th March 2012, 17:58
When I select Native DXVA2 in LAV Video Configuration, it worked fine in my program and faster. But when I selected Quick Sync or DXVA2 (Copy-Back) there were some troubles which caused the ActiveMovie window displayed. So what is the function of Native DXVA2? Is it compatible to Microsoft's DXVA2? In my testing Native DXVA2 and Nivada CUDA looks all called the hardware acceleration.

nevcairiel
5th March 2012, 18:04
Native DXVA2 is exactly the same as Microsofts DXVA2 or most other DXVA2 decoders, hence "native".

All other hardware decoders in LAV only use the hardware internally and to everyone else look like a software decoder.

RobertinoM
5th March 2012, 18:30
as on my old old old pc with XPsp3 and an AMD690G in version 0.46 I could check DXVA and it seemed to work for all my videos ... after upgrading to 0.47/0.48 it was impossible it was impossible to check and I had a bunch of vidoes not working.. ...

so you see why I am confused..

regs robertino

CharlieCL
5th March 2012, 18:35
Native DXVA2 is exactly the same as Microsofts DXVA2 or most other DXVA2 decoders, hence "native".
...


I can set prefer codec to Microsoft or LAV in Native DXVA2. LAV Decoder include a DXVA2 compatible decoder?

dead_screem
5th March 2012, 19:44
What happens behind the scenes is not important. Fact is that DXVA2 decoding + deinterlacing generally seems to work just fine in XP, from the view point of DirectShow decoders and renderers (provided that .NET 3.0 was installed).

not in my setup it doesn't. DXVA + EVR with MPC-HC and it falls back to software.

pururin
5th March 2012, 21:52
The way I currently have it is: All output formats checked in LAV Audio. Everything except Dithering and Noise Shaping checked in Processing for ffdshow...

My question is, is it better to just uncheck everything BUT 32 Float...
As far as I know, for quality, every processing done to the sound(even volume change) should be done in much higher bit depth for the precision
and then dither just once at the end when converting down to target bit depth.
Take a look at this http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=29963&view=findpost&p=259681

e.g. calculate with double precision float(64fp) : ReClock internal volume adjustment (like when you change the volume bar in mpc-hc with wasapi excl. mode), J.river media center (always, internally), etc.

single precision float(32fp) : many players such as foobar, lightweight music player AIMP, etc.
and even the not so preferable windows audio engine always work 32fp internally.

So, I'm thinking that in my current set-up, LAV outputs Integer for blu-rays with lossless and then that is converted internally by ffdshow to 32float for downmixing and processing and downconverted back to integer for output? If not, then ffdshow is processing in integer, which is less precise, right?

I know Nev recommends having all output formats checked, but since I'm always going to be resampling the audio with ReClock and downmixing with ffdshow, I'm leaning towards your method and just using 32 float all the way to the end
LAV automatically choose the bit depth in "as is" manner which IMHO is good for compatibility and bit exact output after decoding.

But in case you do post-processing, Nev suggested it should be ffdshow making decisions, but it seems that ffdshow don't quite automatically choose what's best for you.
From what I observe, mostly ffdshow tends to processing "as is" at the input bit depth level. Unlike those media players mentioned, these filters are quite manual as you can select the processing bit depth and also the output bit depth.

So, yes, it can be less precise. Especially if your source is 16 bit, mostly it'll just working at that level which is quite bad.
But since you watch only those stuffs and most blu-rays come with 24 bit audio I think, so it'll be ok (except you do TONs of post-processing).

(Btw, which resampler do you prefer? libsamplerate in ffdshow or libresample in ReClock? I heard that maybe libsamplerate is better)

Reino
5th March 2012, 22:46
not in my setup it doesn't. DXVA + EVR with MPC-HC and it falls back to software.If you tried a H.264 sample...it's only the case with VC-1:
So I just tested decoding an SD VC-1 sample...

dead_screem
5th March 2012, 23:40
If you tried a H.264 sample...it's only the case with VC-1:

I tried H.264, MPEG-2, AND VC-1. All fall back to software on my 9800GTX. Except, VC-1, which falls to the MS WMVideo Decoder DMO. And even that falls to software with VC-1. But since that is an XP decoder... I would expect it to be DXVA1 only anyway.
(DXVA is on by default on XP MS WMVideo Decoder DMO)

madshi
5th March 2012, 23:54
Well, what can I say. It works for me. Maybe your GPU driver doesn't support it. But anyway, I guess this discussion is moot since nevcairiel has already stated that he doesn't want to support DXVA2 in XP. So end of story. My last comment on this topic... :)

dukey
6th March 2012, 00:14
Technically there is no DXVA2 under XP. It's not supported in the drivers.

If the graphics drivers uses the older Windows XP Display Driver Model (XPDM), DXVA 2 API calls are converted to DXVA 1 DDI calls.

Pat357
6th March 2012, 00:34
PS: Yep Arcsoft stopped working with the new Driver Cyberlink still works http://img535.imageshack.us/img535/6205/cyberlinkfullintelwmvvc.png
Though still no go in MPC-HC (won't connect http://img62.imageshack.us/img62/4116/failsmpchc.png , must be a bug) :(
What splitter are you using ? ASF-reader, Lav, AV ?
The Graphbuilder in MPC does sometimes strange things : you can change the behavior in Options -> playback -> start-up --> use worker thread to construct the graph.. (uncheck it).
Maybe it works ... Can't test myself cause I don't own PDVD 12 (still on v11)

mbordas
6th March 2012, 01:29
sorry to change the subject...:)

I noticed that if I use dslibdvdnav in order to see dvd menus with mpc-hc, I get the Microsoft DTV-DVD Video decoder showing up in the filter list instead of Lav Video. If I add this to external filters and set it to block, I then get "Mpeg-2 Video Decoder (low merit)".

The workaround seems obvious, don't use dslibdvdnav. I'm just wondering why it's doing that.

FlashGordon
6th March 2012, 04:10
As far as I know, for quality, every processing done to the sound(even volume change) should be done in much higher bit depth for the precision
and then dither just once at the end when converting down to target bit depth.

I see. I just let Reclock do the final float to int conversion (32float --> 24 int padded to 32). Not sure if that dithers or if it is even necessary

LAV automatically choose the bit depth in "as is" manner which IMHO is good for compatibility and bit exact output after decoding.

But in case you do post-processing, Nev suggested it should be ffdshow making decisions, but it seems that ffdshow don't quite automatically choose what's best for you.
From what I observe, mostly ffdshow tends to processing "as is" at the input bit depth level. Unlike those media players mentioned, these filters are quite manual as you can select the processing bit depth and also the output bit depth.

So, yes, it can be less precise. Especially if your source is 16 bit, mostly it'll just working at that level which is quite bad.

Yeah, I noticed that ffdshow's output varied depending on the source, and sometimes I do get 16 bit output. For now I just have 32 bit float checked in LAV Audio and having it do the integer to float conversion in the first place for those type of sources

(Btw, which resampler do you prefer? libsamplerate in ffdshow or libresample in ReClock? I heard that maybe libsamplerate is better)

At the moment I have Reclock doing the resampling to 96kHz. I figure Reclock is going to end up resampling it again anyway for media adaptation so I guess it seemed redundant having ffdshow upsampling before Reclock resampled it again

nevcairiel
6th March 2012, 07:02
I noticed that if I use dslibdvdnav in order to see dvd menus with mpc-hc, I get the Microsoft DTV-DVD Video decoder showing up in the filter list instead of Lav Video. If I add this to external filters and set it to block, I then get "Mpeg-2 Video Decoder (low merit)".

The workaround seems obvious, don't use dslibdvdnav. I'm just wondering why it's doing that.

LAV Video does not support DVD Decoding yet, neither with the MS DVD Navigator nor with dslibdvdnav.

Mercury_22
6th March 2012, 08:40
LAV Video does not support DVD Decoding yet, neither with the MS DVD Navigator nor with dslibdvdnav.
Nev I'm doing some testing with the new dslibbluray (http://forum.doom9.org/showthread.php?t=164314) and native it's not working for mpeg2 but CB and SW it's working
So is this the same problem, as "LAV Video does not support DVD Decoding" ? or I'm missing something ?

P.S. Please, please :p add the tray icons, just show it when LAV it's used, cause I have no way to know if LAV it's used with the demo_player from dslibbluray, and any other dumb players :)

Trib
6th March 2012, 11:44
At the moment I have Reclock doing the resampling to 96kHz. I figure Reclock is going to end up resampling it again anyway for media adaptation so I guess it seemed redundant having ffdshow upsampling before Reclock resampled it again

I was wondering is there any benefit to resample say 48kHz to 96kHz like resampling the bit depth from say 16int to 24int?

Basically is it lossless to convert 48kHz 16-bit audio to be processed with LAV Audio as 48kHz 32-bit float and rendered as 96kHz 24-bit with say reclock?

nevcairiel
6th March 2012, 11:53
The reason for resampling to 96kHz is pretty simple. In theory it reduces the quality loss when using ReClocks main function, the resampling to match video rates. If you do it at 96kHz the impact on quality is (in theory) lower.
Converting the sample rate is probably not always lossless, but increasing it by a factor of 2 can probably be considered lossless.

Trib
6th March 2012, 14:28
The reason for resampling to 96kHz is pretty simple. In theory it reduces the quality loss when using ReClocks main function, the resampling to match video rates. If you do it at 96kHz the impact on quality is (in theory) lower.
Converting the sample rate is probably not always lossless, but increasing it by a factor of 2 can probably be considered lossless.

Thanks for the answer and for the awesome LAV Filters =)

pururin
6th March 2012, 14:48
At 24 bit int as target bit depth, dithering or not won't matter much.
Also ReClock developer did say that the float->int code in ReClock is correct.

->96kHz 24-bit in ReClock at last step, although theoretically not lossless, should be pretty much fine as nev said.

@FlashGordon
Your audio pipeline seems the best already.
Though few filters in ffdshow could force it back to 16 int, but you won't use those filters anyway. :p

Spooky_
6th March 2012, 14:51
Edit:
Found the problem, if YADIF was activate it was claiming to the renderer that it wasn't interlaced anymore - of course for DXVA2 native that wasn't true.thx, I recently tried to use only LAV in MediaPortal (with DXVA2 native) and was disappointed at first, that Deinterlacing was going "wrong" (i.e. only with 25 FPS output and strong motion blur, in my case). Thankfully it was only something so simple :). Watching any TV content worked great during my test.



A short technical question: is the software decoder of LAV in any way multi-threaded?

nevcairiel
6th March 2012, 15:43
A short technical question: is the software decoder of LAV in any way multi-threaded?

For many formats, including H264 and MPEG2, it is - but not for all formats.

nevcairiel
6th March 2012, 17:14
Lav Splitter isn't finding any audio tracks with the Eternal Sunshine of the Spotless Mind Blu-ray, whether I load up the index.bdmv or m2ts file.

The disc arrived, and this should be fixed in the next version (only if you run the bdmv/mpls, though)

nevcairiel
6th March 2012, 21:07
Here is a new test build, i consider this a release candidate. Its essentially feature complete for what i wanted to get into the next version, just hoping also relatively bug-free. ;)

http://files.1f0.de/lavf/LAVFilters-0.48-44-g4f49e3d.zip

The big thing in this release is of course the WMV9 DMO decoder for WMV3 and VC-1 content.
Otherwise, some fixes and optimizations, ffmpeg updates and whatnot.

I also removed the forced limitation of DXVA2 to only work on Vista/7 again, so if it works on XP for you, good for you. I cannot and will not support usage on XP, however.

If no issues crop up, this will be released at the end of the week.

fastplayer
6th March 2012, 21:15
FWIW, I haven't had any issues with my WMV3 progressive samples and the new DMO decoder. :)

VipZ
6th March 2012, 21:30
Here is a new test build, i consider this a release candidate. Its essentially feature complete for what i wanted to get into the next version, just hoping also relatively bug-free. ;)

Thanks for the update.

I found one bug for you :)

h264 seems to be broken (Software decode + DXVA), crashes in LAVVideo.ax in any MP4/MKV I open.

I have noticed that both ffmpeg now seemed to add WMA lossless properly and you started with adding some config for this. At present it still doesn't work, is code such as below missing the reason?
{ &MEDIASUBTYPE_WMAUDIOLOSSLESS, CODEC_ID_WMALL },

Thanks

madshi
6th March 2012, 21:31
I also removed the forced limitation of DXVA2 to only work on Vista/7 again, so if it works on XP for you, good for you. I cannot and will not support usage on XP, however.
I've just tried VC-1 DXVA2 decoding with your test build on my XPSP3 dev machine and it worked just fine in the first try for 3 different sample files (SD, HD interlaced, HD progressive). Unfortunately in the 2nd try the PC totally froze and I had to power cycle it off/on. Well, I know why I prefer software decoding... :D

Alexey1975
6th March 2012, 21:46
h264 seems to be broken (Software decode), crashes in LAVVideo.ax in any MP4/MKV ...

I confirm, CUVID mode - the same thing. :sly:

nevcairiel
6th March 2012, 22:34
h264 seems to be broken (Software decode + DXVA), crashes in LAVVideo.ax in any MP4/MKV I open.
I confirm, CUVID mode - the same thing. :sly:

Fixed.

I Uploaded a new build for testing:
http://files.1f0.de/lavf/LAVFilters-0.48-44-g4f49e3d.zip

Stupid bug, shouldn't code after a long day at work. :p

mindbomb
6th March 2012, 22:50
what happens if you have lav audio set to bitstream ac3, but not truehd, and you run into an m2ts with truehd with embedded ac3?
does it bitstream the ac3 or decode the truehd?

also, i love the addition of the new vc-1 decoder.

nevcairiel
6th March 2012, 22:52
what happens if you have lav audio set to bitstream ac3, but not truehd, and you run into an m2ts with truehd with embedded ac3?
does it bitstream the ac3 or decode the truehd?

LAV Splitter will always split such streams, so that there is a separate TrueHD stream and a separate AC3 stream. They do not reach the decoder still combined.
In fact, the decoder does not support playing such combined streams. LAV Audio requires the splitter to separate them.

So, due to the normal codec selection rules in LAV Splitter, the TrueHD track will be played (decoded), because it has a higher quality then AC3.

Sebastiii
6th March 2012, 23:10
Thanks for the new build :)

Kotik
6th March 2012, 23:37
Thanx for the build and for the constant time you invest into the project.

Keep up the good work.

hubblec4
6th March 2012, 23:46
how it looks with ordered chapter? Is this feature now available?

Midzuki
7th March 2012, 00:35
Regarding the wrapper for the M$ DMO decoder:

Graphstudio.exe - Application Error

The instruction at "0x029cb120" referenced memory at "0xffffffff". The memory could not be "read".

OS = Windows XP ( of course :) ), samples = MKVs with VC-1 ( of course :rolleyes: )

red5goahead
7th March 2012, 00:43
I'm starting to convert the header files in Delphi format.

A good features for the audio codec would allow to mute a specific audio channel.

ryrynz
7th March 2012, 01:00
how it looks with ordered chapter? Is this feature now available?

Not yet, it's on his todo list though.

aufkrawall
7th March 2012, 01:15
I've just tried VC-1 DXVA2 decoding with your test build on my XPSP3 dev machine and it worked just fine in the first try for 3 different sample files (SD, HD interlaced, HD progressive). Unfortunately in the 2nd try the PC totally froze and I had to power cycle it off/on. Well, I know why I prefer software decoding... :D
When did Windows XP not freeze while doing anything? :D


Stupid bug, shouldn't code after a long day at work. :p
Why? ;)
Concept of RCs seems to be working to me.
That just doesn't seem to stop codec pack creators to release a new version for every new LAV nightly. :(

nevcairiel
7th March 2012, 07:15
Regarding the wrapper for the M$ DMO decoder:

OS = Windows XP ( of course :) ), samples = MKVs with VC-1 ( of course :rolleyes: )

Does it happen with all files, or just the one?
If its only one file, a sample would be nice.

Also, which source filter?

DragonQ
7th March 2012, 12:02
I've just tried VC-1 DXVA2 decoding with your test build on my XPSP3 dev machine and it worked just fine in the first try for 3 different sample files (SD, HD interlaced, HD progressive). Unfortunately in the 2nd try the PC totally froze and I had to power cycle it off/on. Well, I know why I prefer software decoding... :D

DXVA2 doesn't work on XP for me with that latest test build (just falls back to software mode). Didn't expect it to though, so no loss. :p

Midzuki
7th March 2012, 15:30
Does it happen with all files, or just the one?
If its only one file, a sample would be nice.

Also, which source filter?

Source Filter = File (Async) ALWAYS :)

But regardless of the container (Matroska, AVI, ASF, TS) and/of the splitter used,
it seems the DMO-wrapper doesn't like
** VC-1 with non-aquare pixels ** http://forum.doom9.org/images/icons/icon3.gif

And the samples have always been in the same well-known place :p

https://skydrive.live.com/#cid=5ACF098E0EBAE8D5&id=5ACF098E0EBAE8D5!126

Esperado
7th March 2012, 15:48
As a photographer, i'm very involved in images quality. Using Intel QSync in LAV video filter, WMR9 renderer, sharpen in Intel graphics and a little Xsharpen added in post processing with FFDshow raw filter, i get a fantastic result with my I5-2500K CPU. (Tried quite everything)

With good HD (H.264) TV programs, images are sooo sharp, perspectives, reliefs and perception of the depth of field astonishing, without this "video game" non natural feeling i used to get with other decoders with enhanced sharpening. And no "sparkling" or over-lined sharpening effects neither.

De-interlacing is perfect and only limited by the latency of my screen. Stability and CPU usage problems forgotten.

Even in a non interesting program, it is a physical pleasure to look at the image's quality. Equal if not even better than my best digital post-processed photos.

Egur and nevcairiel, (and Intel) thank-you so much for your "state of the art" perfect work. I am very appreciative and grateful.