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

VipZ
15th May 2011, 14:24
That version doesn't help either, the build I did 2 days ago also had this issue. I don't recall which revision it was, but it was maybe d1a6c61.

I am not sure how to roll back changes to compile an older build in git, if you could give me a tip of this, I can do some testing to try find which one broke the sync.

This issue isn't to all DTS in MKV though it seems to be somewhat to this file only and maybe others, though 0.25 worked perfectly for this file. Decoded DTS doesn't have the sync issue with this file either.

I mostly found bitstreaming to have better sync than decoding, especially so for the build 2 days ago.

nevcairiel
15th May 2011, 14:24
I have no issues whatsoever, so i claim your file is broken.
With the latest version, and the A/V sync thing enabled, it'll always match against the timestamps of the incoming data, and make sure it fits.

Edit: Try with this older version; http://files.1f0.de/lavf/LAVFilters-0.25-22-g9f7db6b.zip

VipZ
15th May 2011, 14:42
Nope, that is also out of sync :(

nevcairiel
15th May 2011, 14:42
You're out of luck then, get rid of the broken file. :)
Or give me a sample to reproduce the problem. :p

I could revert some of those changes, and when bitstreaming, just trust whatever timestamps the source gives me (like 0.25 did), so if they are messed up, its clearly the files fault.
Except, the audio jitter is horrible then, and the graph of EVR-CP looks like crap because the audio timings jitter so much, so its clearly not good.

However, with A/V sync thing enabled, i really do not see how there could be sync issues, ever. It'll compare all timings to the input time of the data, and if there is a too bad drift, it'll adjust to that. Its just impossible that my calculated timings cause a 2-3 second desync. Its just not possible.
It uses the same timing the decoding would use, it reads the data, and figures out how long it would be - and then increments the clock by that. Thats a perfect match to the source timings, minus the jitter of DTS in MKV, of course.

noee
15th May 2011, 15:09
I am not sure how to roll back changes to compile an older build in git, if you could give me a tip of this, I can do some testing to try find which one broke the sync.


fyi, you can go to the github for LAVFsplitter, choose "History" link on the right, just above the file listing,then you can browse the commits and select a commit, then with the "Download" option you can extract that "branch" and build it.

nevcairiel
15th May 2011, 15:13
So i have a new theory, maybe its the ffmpeg parser that somehow causes something funny.

Please try this:
http://files.1f0.de/lavf/LAVAudio-0.25-15-g19442af.zip

This version already includes the ffmpeg parsers, but still the old timing logic.

VipZ
15th May 2011, 15:20
fyi, you can go to the github for LAVFsplitter, choose "History" link on the right, just above the file listing,then you can browse the commits and select a commit, then with the "Download" option you can extract that "branch" and build it.

Thanks

So i have a new theory, maybe its the ffmpeg parser that somehow causes something funny.

Please try this:
http://files.1f0.de/lavf/LAVAudio-0.25-15-g19442af.zip

This version already includes the ffmpeg parsers, but still the old timing logic.

Which build should I drop this AX in, or it doesn't matter?

nevcairiel
15th May 2011, 15:21
The latest one i posted earlier should work, maybe all other 0.25 builds too.

VipZ
15th May 2011, 15:24
The latest one i posted earlier should work, maybe all other 0.25 builds too.

Yep, LAVFilters-0.25-55-g31d0dd6 with the AX from LAVAudio-0.25-15-g19442af fixes the issue :)

madshi
15th May 2011, 15:30
Thats where that extra stream switching filter comes in, basically a multiplexer that takes all decoders, and forwards only the active one to the renderer.
Ah, I see, I missed that part, makes sense to me now.

But yeah, its not a viable solution, unless a player fully supports this mode.
If you support IAMStreamSelect in one of the filters involved shouldn't that make stream switching work with most players? Maybe you'll have to make LAV Splitter support IAMStreamSelect and then forward that to the switching filter, cause it might be possible that players expect IAMStreamSelect only from the splitter.

nevcairiel
15th May 2011, 15:36
If you support IAMStreamSelect in one of the filters involved shouldn't that make stream switching work with most players? Maybe you'll have to make LAV Splitter support IAMStreamSelect and then forward that to the switching filter, cause it might be possible that players expect IAMStreamSelect only from the splitter.

That would be possible. Maybe i'll build such a multiplexer in due time. Of course it'll look a bit weird in the graph list, say you have 6 audio tracks, you suddenly have 6 decoders in there...

I'll draft up a full concept, and post it for commenting somewhere.

Yep, LAVFilters-0.25-55-g31d0dd6 with the AX from LAVAudio-0.25-15-g19442af fixes the issue :)

I properly fixed the issue now. Thanks for the sample.
The calculation for the DTS durations was off for that file, not sure why. But i changed it, and it should work better now.
I would've kinda hoped that my A/V sync code would've taken care of this, but the timings were drifting apart so fast, that it couldn't keep up. :(

http://files.1f0.de/lavf/LAVFilters-0.25-56-g41ca5a7.zip

VipZ
15th May 2011, 15:46
I properly fixed the issue now. Thanks for the sample.
The calculation for the DTS durations was off for that file, not sure why. But i changed it, and it should work better now.
I would've kinda hoped that my A/V sync code would've taken care of this, but the timings were drifting apart so fast, that it couldn't keep up. :(

http://files.1f0.de/lavf/LAVFilters-0.25-56-g41ca5a7.zip

No problem. Thanks, its working good now :)

madshi
15th May 2011, 15:55
Is there any reason *not* to use LAV Audio for FLAC?
madFlac uses the official FLAC library / source code and has been working for years with perfect A/V sync, no stability problems and bit perfect output, with all kinds of channel configurations, bitdepths and samplerates. AFAIK, the LAV FLAC decoder uses a different code base (not the "official"/original one) and has not been extensively tested yet. Why would you even consider going away from a pretty much perfectly working decoder? I don't really understand that. There's nothing to gain, from what I can see. From my experience, everytime a different FLAC decoder was (accidently) activated on my PC, I ran into all kinds of playback problems. That also includes LAV Audio Decoder, although it was an older version, the problem might be fixed in the latest version.

nevcairiel
15th May 2011, 16:16
Yea, ffmpeg implemented their own FLAC decoder, and i'm not sure if its working perfectly.
There was a problem that caused sync issues in earlier LAV Audio versions, but that was fixed a long while ago, and everything is working good now. Since its a lossless codec, we could compare the PCM output, couldn't we?
Anyhow, i don't use FLAC that much, and i have other things to do. :)

nevcairiel
15th May 2011, 17:15
LAV Filters 0.26

General
- The VC2010 runtime is no longer required to be installed

LAV Splitter
- Further VC-1 in MKV improvements
- Added a separate "mpegvideo" (m2v files) option to the Format section
- Added a flag for secondary audio streams
- Changed the default DTS media type (better compatibility)

LAV Audio
- Added the ability to use the ArcSoft DTS decoder directly through LAV Audio
- Added an automatic algorithm to keep A/V sync stable
- Improved Bitstreaming with splitters other then LAV Splitter
- Improved timestamp generation when bitstreaming
- Fixed LPCM 24-bit Media Types


Download: Installer (both x86/x64) (http://files.1f0.de/lavf/LAVFilters-0.26.exe) -- Zips: 32-bit (http://files.1f0.de/lavf/LAVFilters-0.26.zip) & 64-bit (http://files.1f0.de/lavf/LAVFilters-0.26-x64.zip)

Using the ArcSoft DTS decoder
LAV Audio can now directly interface with the ArcSoft DTS decoder. You do no longer need any complicated setup or installation.
To use the ArcSoft decoder in LAV Audio, simply get the "dtsdecoderdll.dll" from your TMT3/5 Codecs directory, and put it in the same directory as LAV Audio.
Thats all you need to do, no configuration, no hacked checkactivate.dll, no extra filter to be used.

When playing a file, you can see if its being used on the "Status" page of the LAV Audio propertys sheet. "dca" is the ffmpeg based decoder, "dts" (and any variations of that) is the ArcSoft decoder.

This will allow you full decoding of DTS-HD MA and all other variations of DTS.

One thing, though.
Do NOT ask where to get the ArcSoft decoder. If you own TMT3 or TMT5, it will be in the TMT Codecs folder. If you do not own it, you should buy it. I respect their work, and so should you!

Bitstreaming Improvements
Bitstreaming should now work much better with other splitters. Note that there is still one limitation however, TrueHD only works properly if its actually flagged as TrueHD, and the interleaved AC3 was removed. Therefor, it will most likely not work with Haali and the MPC-HC/Gabest splitters.


As always, please report any regressions or still persistent bugs directly here, with all the relevant details, and if possible a sample file.

SamuriHL
15th May 2011, 17:24
Just an FYI...I tested last night's code with MC16 build 160090 and Star Trek 2009 off the disc. I have LAV Audio decoding everything to PCM. I'm using ReClock at the moment for exclusive mode (plan on playing with MC16's exclusive mode at some point, but, in testing I had sync issues). Star Trek was rock solid. That's a good thing as that's always been one of the "trouble" discs for TrueHD. I'm very pleased! Building 0.26 now and will test it out at some point. Thanks, Nev!!

Gleb Egorych
15th May 2011, 18:12
How about that avi crash?
This testing took a bit more time because the bug appeared pretty random. Seems it is fixed :). Tested 0.25-53 and slightly 0.26.

I'll also watch if player hang bug is also fixed with those patches.

Thanks, nevcairiel!

madshi
15th May 2011, 18:35
Since its a lossless codec, we could compare the PCM output, couldn't we?
Yes, but you'd have to test all bitdepths, channel configurations and samplerates. Furthermore you'd have to test whether the decoder works with all containers (that support FLAC) and all splitters and produces perfect A/V sync with all splitters, including seeking etc. Then, there are also extra tricks to support non-standard channel configurations which I'd bet ffmpeg does not implement by itself. Finally, since ffmpeg is constantly being worked on, with FLAC only being one of the less important small parts of ffmpeg, there's always a chance that some future ffmpeg revision might accidently break something without being noticed. FATE tests don't cover everything.

CruNcher
15th May 2011, 19:31
Crazy we can do DTS-HD MA transcoding live now, i guess madshi helped you here with where to hook into ;) :D thx

nevcairiel
15th May 2011, 19:32
i guess madshi helped you here with where to hook into

Nope, thats all my doing. It actually wasn't that hard to figure out. Just some leg-work, testing and debugging to figure out the arguments.

joeydrunk
15th May 2011, 20:00
Nev, in what scenario would it be better to use arcsofts dts decoder? Anything specific, or is completely a matter of opinion on wich you prefer?

SamuriHL
15th May 2011, 20:01
If you want to decode dts-hd ma, it's your only option. Period. Otherwise bit stream.

Carpo
15th May 2011, 20:04
glad i just use DTS on my backups, seems dts-hd ma is a pain in the ass :/

noee
15th May 2011, 20:09
glad i just use DTS on my backups, seems dts-hd ma is a pain in the ass :/

Au contraire, it's a piece of cake, now. ;)

So smooth, like butter.

nevcairiel
15th May 2011, 20:12
Indeed, now its as easy as any other format, you just need a copy of TMT, and drop that dll into the LAV Audio directory. Easy! :)

Carpo
15th May 2011, 20:12
well it would be a pita for me to re-rip them to add dts-hd just in case in the future i get a receiver capable of decoding it :p, although it is tempting ;)

SamuriHL
15th May 2011, 20:12
Yea I agree...no problem at all now. Drop in a DLL, enjoy fully decoded dts-hd ma.

SamuriHL
15th May 2011, 20:13
Decode it on the PC...that's what we're talking about. :-)

Carpo
15th May 2011, 20:36
i do, but i only have a set of z5500, just wondering if there is any point

SamuriHL
15th May 2011, 20:37
Going forward I would just do the HD audio. Is there any point in your current setup? Probably not. But, if you do upgrade, do you want to have to go back and rerip everything? (Even just anything you rip after this point, I mean). You might as well just throw the HD audio in there and call it good.

Carpo
15th May 2011, 20:39
Thats what im thinking about atm, that and i mainly use linux as an htpc, will do a test rip of a bluray and see how it fairs, guessing it should be fine as it should just drop back to plain dts

SamuriHL
15th May 2011, 20:43
Right, DTS-HD MA contains a DTS core so even if your decoder doesn't support DTS-HD MA, it'll decode the core audio track and you'll lose nothing by keeping the HD.

Carpo
15th May 2011, 20:45
now all i have to decide is whether to re-rip and convert 20 blurays using crf --18 (used 2 pass before i saw the light) or just remuxing the ones i have with the audio......i think i need a stiff drink first :D

SamuriHL
15th May 2011, 20:47
HEHE. Good luck. :) Personally, I'm SOOOOO happy with how things are progressing with LAVF Splitter and LAV Audio. The ability to watch movie only blu-rays in my player of choice is awesome. The ability to decode HD audio in full bitdepth, full quality is awesome. Add madVR to the mix and wow...just wow. :)

Carpo
15th May 2011, 20:49
Yes i have to admit that since i switched to madVR+LAV CUVID+Lav Audio, my image and sound quallity have gone through the roof, now if i could just replace mpc-hc (hint hint nevcairiel) ;)

nevcairiel
15th May 2011, 20:50
Its fine (for now) :p

The main problem with replacing MPC-HC is that the subtitle quality would go significantly down by using ffdshow or DirectVobSub, so that would have to be replaced first, or alot of people will be unhappy. Personally, i dont usually watch with subtitles, but when i do (mostly only forced subs), i won't accept blurred and washed out subs. :p

SamuriHL
15th May 2011, 20:51
I already have. :D I'm using J River's MC16. Admittedly not free, but, just a joy to use. Nonetheless, I still custom build my own MPC-HC builds that don't include ANY internal filters. :D

nevcairiel
15th May 2011, 20:54
I have all my content neatly organized into folders, most library-like players will always try to force some stupid organization scheme of their own..
That said, i did kinda like the library of XBMC, too bad its not DirectShow (and just using it for the front-end, using MPC-HC for playback, is kinda crappy).

SamuriHL
15th May 2011, 20:57
I was surprised to learn that XBMC didn't use directshow, as well. MC16, once I forced it to do things *MY* way in terms of library handling, works very well for me. I agree, that I've never really been one for library players, either, but, I have it setup quite well now.

nevcairiel
15th May 2011, 20:58
I wasn't surprised, its a multi-platform player, sparked back on the XBox, i would've been surprised if it used DirectShow. :P
Does MC16 support scrapping series infos and automatic tagging from like thetvdb? That was really neat in XBMC, i had to rename maybe a handful of folders, and it imported my whole TV series library without a single hiccup.

SamuriHL
15th May 2011, 20:59
Well, I guess you do have a point there. :)

nevcairiel
15th May 2011, 21:11
I wish there was another player with a neat 10ft UI, which i could just point at my TV series library, tell it "these are TV series", and it would do all the magic.
I've really only seen this in XBMC. Using regex'es on folder and file names to separate stuff by show, and season. Downloading coverart by itself, tagging based on video/audio codecs used, and everything in a neatly organized interface.

I just want a menu structure like this, in a usable 10ft UI:


Movies
- Foo
- Bar
- ...
TV Series
- Show1
- Season 1
- Episode 1
- Episode 2
-...
- Season 2
-...
- Show2
-...


That can't be too hard, or?
Can i get MC16 to do that, even if i have to manually organize my data in there?

Oh well, can't have it all, i guess.

HeadlessCow
15th May 2011, 21:17
I wish there was another player with a neat 10ft UI, which i could just point at my TV series library, tell it "these are TV series", and it would do all the magic.
I've really only seen this in XBMC. Using regex'es on folder and file names to separate stuff by show, and season. Downloading coverart by itself, tagging based on video/audio codecs used, and everything in a neatly organized interface.

I just want a menu structure like this, in a usable 10ft UI:


Movies
- Foo
- Bar
- ...
TV Series
- Show1
- Season 1
- Episode 1
- Episode 2
-...
- Season 2
-...
- Show2
-...


That can't be too hard, or?
Can i get MC16 to do that, even if i have to manually organize my data in there?

Oh well, can't have it all, i guess.

http://www.mediabrowser.tv/ perhaps?

SamuriHL
15th May 2011, 21:18
That's a good question if it can do that or not. If not, we can always request it. :) I think they'd be interested in that idea. (Referring to MC16)

nevcairiel
15th May 2011, 21:18
The Media Browser UI is ok, but then i'm stuck with WMC playing the stuff, which is ugh. :P

hoborg
15th May 2011, 21:19
Try this:
http://files.1f0.de/lavf/LAVFilters-0.19-audio-jitter-test.zip

@nevcairiel:
Using "dtsdecoderdll.dll" will reintroduce this DTS stuttering issue :/

nevcairiel
15th May 2011, 21:20
Using "dtsdecoderdll.dll" will reintroduce this DTS stuttering issue :/

No it doesn't.
There are no differences in which decoder is used, unless your system is too slow to real-time decode DTS-HD MA. :p

If there is any stuttering again, first try to turn off the new A/V sync option, as DTS-HD in MKV can sometimes be so f'ed up, that it might confuse it and cause a resync.

SamuriHL
15th May 2011, 21:20
The Media Browser UI is ok, but then i'm stuck with WMC playing the stuff, which is ugh. :P

Yea, NO. Just NO. I gave up on 7MC. It just doesn't handle everything I want. And since MC16 allows me to play WTV files I can have 7MC record and use MC16 to play them back. Works for me! In any case, I need to play around with the library features more in MC16 as i've had to manually setup a lot of what I have.

hoborg
15th May 2011, 21:23
No it doesn't.

You are right. I forgot to disable MPC-HC internal decoders...
Sorry for that. It is working just fine.

nevcairiel
15th May 2011, 21:35
Yea, NO. Just NO. I gave up on 7MC. It just doesn't handle everything I want. And since MC16 allows me to play WTV files I can have 7MC record and use MC16 to play them back. Works for me! In any case, I need to play around with the library features more in MC16 as i've had to manually setup a lot of what I have.

If nothing else helps, there is always the ability to use XBMC with an external player configured (MPC-HC), not sure how that plays with madVR however, as XBMC is already a full screen D3D application .. maybe i should test that one day.