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

SamuriHL
30th April 2011, 23:51
Well i can already bitstream plain AC3, next will be default DTS .. after that my poor SPDIF connection to the receiver is done being useful, and i probably have to somehow figure out how to test on the HTPC o.O

I'm also still pondering moving it over into LAV Audio, it wouldn't be that much more work to do it there .. the spdif muxing code is pretty stand-alone, it parses all the info it needs from the audio stream itself, plus the advantage that you can use it with whatever other splitter you might want to use for whatever reason.

I think i'll sleep on that before i develop alot more stuff.

I can test it no problem. I was one of the testers that helped Albain code it blind. LOL! :) Whenever you're ready to have someone test it, I have both nVidia and AMD hardware to play with so that should help quite a bit. Putting it in the audio decoder has one other benefit, too. Say I wanted to bitstream DTS-HD MA for which there's no open source decoder but wanted to decode TrueHD. That should be possible if you add the bitstreaming to your decoder. I think I can already do that with ffdshow but I'm stubborn. :D I think I should go try that though as that might be an interesting idea.

SamuriHL
30th April 2011, 23:59
Oh BLANK ME! Ok, so, I tested this little theory of decoding TrueHD to PCM because I'm told that's what I probably SHOULD be doing. Yeaaaaa, I have WAY WAY more audio dropouts now with Megamind! :mad: What the?!??!!?

nevcairiel
1st May 2011, 00:04
Did you decode with ffdshow audio? Try with LAV Audio for decoding, there i know it works with LAV Splitter provided data. :p

TrueHD is especially tricky to do timing correct when decoding, i tinkered quite a while in LAV Audio to get it right.
Probably also why its so easy to break when bitstreaming, huh.

LAV Audio should in theory never get drop outs, unless there is a really broken packet in the stream that cannot be decoded. If the mastering is bad, it could eventually lead to A/V sync issues..

SamuriHL
1st May 2011, 00:06
Already ahead of you. That's where I was going next. Just had to get something else installed first. I wish I knew how to make the stupid ArcSoft settings stick for DTS-HD MA. sigh :) It'll take a few minutes to test LAV Audio to see if it gets the dropouts, as well. Working on it now. :)

SamuriHL
1st May 2011, 00:12
Nevermind about the settings sticking. jmone inadvertently helped me out without knowing it. :D (Nice one, jmone ;)) I'm almost there.

nevcairiel
1st May 2011, 00:19
Secret tip for ArcSoft Audio decoder: Use the ASAudioHD.ax from TMT3, and the dtsdecoder.dll from TMT5 - the TMT3 .ax allows full 24-bit/96khz output (the TMT5 version doesn't, for some reason), and the new dtsdecoder fixes some bugs. :)

SamuriHL
1st May 2011, 00:27
That would explain a few things. ;) So, with the ArcSoft decoder it took over TrueHD decoding from LAV Audio (WTF?) and was only giving me 16 bit. So I removed it for a few minutes to test LAV Audio. Getting 24 bit now and SEEMS so far to not have any drops. (ArcSoft's didn't, either). So maybe I just do it this way from now on. This also allows ReClock to do its thing and chip in on the video/audio sync issue. Hmmm....this might in fact do it. Why the hell did ArcSoft take TrueHD decoding from LAV Audio when I added both to MC16? That wasn't nice! :D

nevcairiel
1st May 2011, 00:37
I have never seen ArcSoft do TrueHD decoding .. probably needs some DLL that i didnt copy.. i only have the .ax and the dtsdecoder.dll... :)

SamuriHL
1st May 2011, 00:40
Yea, well, I grabbed a package off J River's forum that has an ASAudioHD+.ax in addition to a bunch of other DLL's. So I think they included TrueHD decoding. HOWEVER, that being said, I'm only getting 16 bit from any source, so, clearly something ain't working right. sigh. :( (The settings do stick, so, that's always nice. :D) I don't have TMT3 installed at the moment on any of my machines. Removed it since I went to TMT5 so I can't even build my own package. This would be pretty slick to have their commercial decoder working for all formats. LOL! :D

nevcairiel
1st May 2011, 00:42
I never got that silly wrapper working right...

Aaand i finally found it, here is the post that explains how to do it without the wrapper, and the minimal sets of files you need: http://www.avsforum.com/avs-vb/showthread.php?p=19420488#post19420488

SamuriHL
1st May 2011, 00:46
Ah, very kuel! Gonna give that a try now as I'd really like to get this whole setup working. And I've never been a proponent of "bitstreaming is better" from a quality stand point, so, as long as it's ArcSoft's decoder, I'm good. Cyberlink's is junk, so, I'd never go there. :D And with ReClock using exclusive mode, channel mapping isn't a problem, either. So, as long as I can get the bit depth back, this will be an awesome setup. Thanks!

nevcairiel
1st May 2011, 00:53
Thats what i do, ArcSoft for DTS, LAV Audio for everything else. :)

jmone
1st May 2011, 01:00
I also just use the method nevcairiel linked to (the Win.ini method) but others use the modified wrapper approach. The minimum you need to just get DTS-HA is the ASAudioHD.ax, checkactivate.dll, and dtsdecoderdll.dll from the link and you get full bitrate and debth. Register the ASAudioHD, do the win.ini mod and reboot. If you want dynamic filter settings changes you will need to use the modified wrapper as per the other post you found.

jmone
1st May 2011, 01:06
And with ReClock using exclusive mode, channel mapping isn't a problem, either. So, as long as I can get the bit depth back, this will be an awesome setup. Thanks!

MC uses WASAPI Exclusive mode and you have a heap of channel mapping options in the DSP. Note: in Tools --> Options --> Video you have to set your Playback Device as "Same as decice used in audio playback" and check "Video Clock" (this resamples the PCM to keep in track with the video frames). In Tools --> Options --> Audio you now can set your OutputMode (WASAPI, WASAPI - Event Style), Output Mode Settings (Exclusive, Buffer Flushing etc), and in the DSP a whole heap of stuff but under Output Format you can select either the number of channels you want everthing mixed for or "Source"). Have fun! With madVR now doing basic frequence rate changes I no longer use reclock with the combo.

SamuriHL
1st May 2011, 01:07
I'm getting there, guys. The wrapper would be nice if I could get it to work. But, I've modified the win.ini. I tried adding the dll's from TMT5 and it hard locked MC16. I think I know how to deal with that issue (had to reboot). So I'm really close to having this setup on one machine. :D

SamuriHL
1st May 2011, 01:09
MC uses WASAPI Exclusive mode and you have a heap of channel mapping options in the DSP. Note: in Tools --> Options --> Video you have to set your Playback Device as "Same as decice used in audio playback" and check "Video Clock" (this resamples the PCM to keep in track with the video frames). In Tools --> Options --> Audio you now can set your OutputMode (WASAPI, WASAPI - Event Style), Output Mode Settings (Exclusive, Buffer Flushing etc), and in the DSP a whole heap of stuff but under Output Format you can select either the number of channels you want everthing mixed for or "Source"). Have fun! With madVR now doing basic frequence rate changes I no longer use reclock with the combo.

I may play with that once I get this thing stabilized. I have no issue with ReClock, but, if it's built into the player it's one less thing I have to worry about. If I'm doing PCM, it MUST be done in exclusive mode so as to bypass the nonsense of windows audio. Basically I want the stream decoded and sent directly to my receiver as is. Period.

SamuriHL
1st May 2011, 01:26
Ok, my setup isn't what you guys would probably consider ideal, but, at the moment I have perfect sound so I'm not messing with this again for a while. I'm ONLY using the ArcSoft audio decoder. No LAV Audio for now. Perfect 24 bit audio. ReClock is behaving, so, I'm gonna leave it in there and let it have at it. So, let's recap today's lesson for the class, shall we? What have we accomplished this week....good time to reflect:

We have unbelievable progress with madVR (thank you madshi!)
We have amazing forced sub support to make our DirectShow players act more like a commercial player in regard to subs (holy hell, Nev! Thank you!!!!)
We have perfect bit depth decoded audio (thanks, jmone and Nev!!)
We have the ability to simply open discs in MPC-HC and MC16 (thanks, Nev!)

What an awesome week!!!!! Very very very happy with the incredible work that has been done!

Andy o
1st May 2011, 01:37
What I don't get is what's the difference between "light", "normal" and "threaded" in the dynamic range option.

SamuriHL
1st May 2011, 01:41
Yea, I was wondering that myself. I've got it set to normal and it sounds identical to bitstreaming in all cases, so, whatever. :) Now I need to replicate this setup on my nVidia box. Won't THAT be a good time.

jmone
1st May 2011, 02:04
FYI - I just test this wrapped version of the Arcsoft on my Desktop (need to to on my HTPC later) and it seems fine with settings being kept and full sample rate on DTS-HD. http://yabb.jriver.com/interact/index.php?topic=63282.msg424968#msg424968 I did a manual reg of the ASAudioHD+.AX then had to up it's merit from "do not use" for some reason. Anyway the reason this may be a good package is it is a mix of various compoenents including the matching ASAudioHD.ax (to work with the wrapper) but the 185 DTS decoder (to get full bit rate). Will have to change over on my HTPC and test to be sure however (but this will have to be later in the day)!

SamuriHL
1st May 2011, 02:12
The problem with that is that with the included ASAudioHD.ax file you only get 16 bit audio. Trust me on this. I wouldn't have gone through all that if it had simply worked. :) So yes, you can get audio, but, it's only 16 bit.

Andy o
1st May 2011, 02:14
Yea, I was wondering that myself. I've got it set to normal and it sounds identical to bitstreaming in all cases, so, whatever. :) Now I need to replicate this setup on my nVidia box. Won't THAT be a good time.

I'm thinking that since to my knowledge only the Dolby formats offer the dynamic range metadata, it will only work on those. I'm fine decoding those with ffdshow anyway.

Andy o
1st May 2011, 02:20
I'm trying out working with the ATI driver and decoding everything. I'd rather use the Realtek one but it doesn't work well with WASAPI exclusive and ReClock (I think it's something ReClock does when closing exclusive mode). I'll have to live with the MC problems now, I think I'll leave my mixer on stereo.

I'm having trouble with the aforementioned DTS-HD MA 2.0 stream though, it's not decoding properly and the volume is extremely low (inaudible at normal volume), just like when I was bitstreaming it to my Pioneer receiver. It might be good news if it's not my receiver.

SamuriHL
1st May 2011, 02:25
I'm thinking that since to my knowledge only the Dolby formats offer the dynamic range metadata, it will only work on those. I'm fine decoding those with ffdshow anyway.

Very likely. At some point I will likely get LAV Audio in the mix here. But for now I've got the dolby stuff decoding just fine in ArcSoft so I'm going to leave it alone for now. I trust the ArcSoft decoder. We all spent months complaining to ArcSoft til they got it right, so, it's by far the most bug free commercial decoder out there. I have nothing against LAV Audio at all. I know Nev's worked hard on the underlying ffmpeg code, etc. So, like I said, I'll probably switch to it at some point going forward.

SamuriHL
1st May 2011, 02:27
I'm trying out working with the ATI driver and decoding everything. I'd rather use the Realtek one but it doesn't work well with WASAPI exclusive and ReClock (I think it's something ReClock does when closing exclusive mode). I'll have to live with the MC problems now, I think I'll leave my mixer on stereo.

I'm having trouble with the aforementioned DTS-HD MA 2.0 stream though, it's not decoding properly and the volume is extremely low (inaudible at normal volume), just like when I was bitstreaming it to my Pioneer receiver. It might be good news if it's not my receiver.

Weird. I don't have any 2 channel DTS-HD material at all so I can't test that on either of my Pio receivers.

Andy o
1st May 2011, 02:31
Never mind my post above, DTS-HD MA 2.0 is apparently decoding properly after putting the thing in an mkv.

SamuriHL
1st May 2011, 02:33
Nice. So in an m2ts file it doesn't work right?

Andy o
1st May 2011, 02:34
Weird. I don't have any 2 channel DTS-HD material at all so I can't test that on either of my Pio receivers.

From googling, it appears to affect Pioneer receivers. You might wanna try and rent one of these discs to test before your warranty runs out, you might be able to upgrade the firmware. Mine just ran out a couple of months ago, I think.

SamuriHL
1st May 2011, 02:35
I don't know when my warranty runs out, but, yea, I may try and get a hold of a disc to test it.

Andy o
1st May 2011, 02:44
Nice. So in an m2ts file it doesn't work right?

I opened the m2ts, but I only have one movie with this audio. It's weird though. This movie has the primary DTS-HD MA 2.0 track (which when bitstreaming, my receiver detects a Neo:6 flag and shows the "mono surround" speaker active as well, but doesn't decode properly), and a bunch of DD tracks of other languages.

The weird part is that on my filter list I got both the Arcsoft decoder, and PowerDVD 8 audio decoder. If I block the PDVD8 one, the PDVD9 one appears. So I think the DD streams are calling it. But, I have ffdshow set up for DD so it's not following the priority (?).

Anyway, I remuxed this to mkv, keeping the MA, making a new track with just the core, and keeping one DD stream, and DTS-HD 2.0 magically gets decoded. Now I don't see the PDVD decoder there, but I see AVI<->DTS or some such there, which appears to be doing something.

It just occurred to me that DTS-HD 2.0 in fact is still not being decoded, and with the mkv somehow the DTS core is playing. I'm remuxing another mkv with just the DTS-HD MA audio so only the Arcsoft decoder gets called.

Andy o
1st May 2011, 02:45
I don't know when my warranty runs out, but, yea, I may try and get a hold of a disc to test it.

If you do, please let me know how it went.

SamuriHL
1st May 2011, 02:48
Be curious as to how that goes. As long as i can decode them to PCM, I don't really care if I can bitstream them. So, as long as there's *A* solution for us Pio users, I'm good. :)

SamuriHL
1st May 2011, 02:52
If you do, please let me know how it went.

Yup. Will do.

Andy o
1st May 2011, 02:52
Well yeah for me, if I'm all good with decoding everything, I can put back in my Nvidia card without worrying about the less than perfect 23.976, and use ReClock. And I'll be able to use the LAVcuvid thingie too. Oh wait... silent stream!

Inspector.Gadget
1st May 2011, 02:54
Hey nevcairiel, a question about possible future developments:

Will your splitter handle the ASF container at some point, and if so will it be able to work around the somewhat broken ASF handling in MPC-HC ("Use WMV ASF Splitter" seems to be a null op, can't get any alternate VC-1 decoder to work instead of WMVIDEO DMO with ASF input, etc.)? The present MPC-HC behavior doesn't seem to be based strictly on Directshow merits so maybe you have a better idea of what's going on behind the scenes then I do. Thanks!

jmone
1st May 2011, 03:13
The problem with that is that with the included ASAudioHD.ax file you only get 16 bit audio. Trust me on this. I wouldn't have gone through all that if it had simply worked. :) So yes, you can get audio, but, it's only 16 bit.

Yup false hope on my part for the wrapper, back to the win.ini version / method if you want full bitrate/debth

FYI - the wrapper was written by shard using the asaudiohd.ax from TMT3 for HDAV1.3 but he has long since stoped posting so I don't think we will see an update on this method anytime soon. http://forum.doom9.org/showthread.php?t=154070

SamuriHL
1st May 2011, 03:29
Well, I'd write one if I knew how. One would think that you could set the params on the fly as part of the filter chain. I have no knowledge in this area of coding at all.

Andy o
1st May 2011, 03:32
Be curious as to how that goes. As long as i can decode them to PCM, I don't really care if I can bitstream them. So, as long as there's *A* solution for us Pio users, I'm good. :)

I'm still getting the other filter AVI<->AC3/DTS. I think that's what's decoding the DTS core, and the MA audio is not playing. I don't get that filter with regular multichannel MA content.

SamuriHL
1st May 2011, 03:35
I'm still getting the other filter AVI<->AC3/DTS. I think that's what's decoding the DTS core, and the MA audio is not playing. I don't get that filter with regular multichannel MA content.

Perfect. Maybe Nev will have some ideas tomorrow.

Andy o
1st May 2011, 03:42
Not a huge deal, but my problem before when bitstreaming was that I couldn't even decode the core, since the receiver was detecting the MA stream but failing to decode it properly. Now at least I can hear the audio.

Andy o
1st May 2011, 03:50
OK my bad when I said above that my receiver was detecting the MA audio and a Neo:6 flag. Apparently it's detecting regular DTS (the DTS light is on and the display just reads STEREO, not DTS-HD MSTR like it should), and the input speakers lights that are on are the two fronts, and the mono surround. I think these decoders (the receiver and Arcsoft's) just don't know about DTS-HD MA 2.0.

Andy o
1st May 2011, 04:16
OK here's a list (http://forum.blu-ray.com/blu-ray-movies-north-america/158996-list-bds-dts-hd-ma-1-0-2-0-3-0-4-0-mixes.html) of blu-rays with oddball formats. Turns out several of those movies with DTS-HD MA 2.0 are in my queue. I'm checking out the 3.0 and 4.0 movies as well.

nevcairiel
1st May 2011, 07:54
I'm confused after reading the last 2 pages. So did you guys try to decode the DTS-HD MA 2.0 with the ArcSoft decoder, or did it not work either? I had some DTS-HD MA 1.0 (mono) tracks that i threw at it, and it seemed to work fine.
(Note that i used the mentioned trick - TMT3.185 ASAudioHD.ax and TMT5.87 dtsdecoderdll.dll)

Oh wait... silent stream!

I really don't notice that on my NVIDIA card. When using PCM output the handshakes are so fast that there is maybe half a second missing audio, if even that much. Bitstreaming handshakes take longer, though, and you really notice it there.
Thats of course also dependent in your receiver.

madshi
1st May 2011, 08:40
I have around ~100 BDs, out of these i have maybe 5 TrueHD discs, none of which are seamless branching. Hell i have more discs with LPCM. :p
You don't have Spiderman? I think Spiderman 1 and/or 2 are seamless branching TrueHD.

Andy o
1st May 2011, 08:42
I have to try the dtsdecoder.dll from tmt5, then. How do you know if it's decoding the MA or the core, though?

nevcairiel
1st May 2011, 08:54
You don't have Spiderman? I think Spiderman 1 and/or 2 are seamless branching TrueHD.

Nope. Might put it on the shopping list then.

I have to try the dtsdecoder.dll from tmt5, then. How do you know if it's decoding the MA or the core, though?

Unless the disc is 96kHz, you will never know*. But neither do you with your receiver. :p

* short of some complicated Wave Form analysis comparison with some decoder known to only decode the core.

Andy o
1st May 2011, 08:55
I think I can tell by what decoder is doing the decoding. For some reason, with that disc LAVFsplitter apparently loads another decoder for decoding the core.

Wait a minute though, how do you know that your 1.0 track is being decoded losslessly then?

nevcairiel
1st May 2011, 08:59
Wait a minute though, how do you know that your 1.0 track is being decoded losslessly then?
I don't. But i get the ArcSoft decoder decoding it, and i trust it to do its job - thats all i can do.

madshi
1st May 2011, 09:01
Nope. Might put it on the shopping list then.
Just double checked. Not sure about Spiderman 1 but Spiderman 2 (USA Blu-Ray) is definitely seamless branching TrueHD. Probably EU edition, too.

nevcairiel
1st May 2011, 09:04
Funny thing, in the amazon comments on the Blu-ray release of Spiderman 2, people actually comment on short audio glitches on scene changes. Fascinating.
Well i'll have those discs here by tuesday then.