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
4th July 2011, 20:04
The MPC-HC splitter is stupid and claims TrueHD is AC3 as well .. don't mind that, its just broken. MPC-HCs MKV splitter also does not have any advantages over LAV or Haali, i don't see any reason to use it.

Edit:
Apparently Haali also claims its AC3. WTF is with these bugged things.

The good news is, using LAV Splitter, you can now also use ffdshow for MLP decoding.
The bad news, Haali or the MPC-HC splitter still don't work with LAV Audio. Screw them and claiming they are sending AC3.

I have been putting off dealing with these broken things for too long, i guess. Maybe i should just add a detection for TrueHD/MLP when the source reports AC3, like ffdshow does.

robpdotcom
4th July 2011, 20:40
Yeah, I never use the MPC-HC splitter anyway - just tried it to see what would happen.

Rather than "fix" dealing with broken splitters, I'd rather just see you work on ordered chapters and segment linking in Matroska, which is the only reason I can see to still use Haali.

BTW: A while back you added wtv as a format LAVsplitter can split, and it works great (big thanks for that), with one exception:

Since wtv is recorded TV, it's not uncommon to want to play a program that is still being recorded. When using Microsoft's StreamBufferSouce, the program length is constantly updated (you can always jump to the end to watch "live TV"). With LAVSplitter, playback will stop when you reach the last part that was recorded when the file was opened. Is there any way LAVSplitter could do what StreamBufferSource does?

clsid
4th July 2011, 20:55
Haali offers on request the source for a core parser library for Matroska on his site. That might be useful.

nevcairiel
4th July 2011, 21:27
Haali offers on request the source for a core parser library for Matroska on his site. That might be useful.

I have that code, but its only the very basic Matroska parsing, returning what is in the file. Any processing, mapping to DirectShow and whatnot is not included, and thus not terribly useful.
The problem is getting the missing features implemented in ffmpeg, and the design of ffmpeg demuxers is kind of limiting this in itself, which makes coding this very hard.


Since wtv is recorded TV, it's not uncommon to want to play a program that is still being recorded. When using Microsoft's StreamBufferSouce, the program length is constantly updated (you can always jump to the end to watch "live TV"). With LAVSplitter, playback will stop when you reach the last part that was recorded when the file was opened. Is there any way LAVSplitter could do what StreamBufferSource does?

While its of course theoretically possible, its not something easily done. ffmpeg does all the reading, and on other streaming formats reading will actually continue, even though the time does not update. However, this would appear to be one feature not implemented in the ffmpeg wtv code, so the best way would be to ask them to add it, however you might as well just use the streambuffersource. Is there actually an advantage that LAV Splitter offers over it?

robpdotcom
4th July 2011, 22:09
Is there actually an advantage that LAV Splitter offers over it?

Really, only one that I've found so far: ffdshow video will not connect to StreamSourceBuffer. So, to use yadif on 1080i video, I have to set ffdshow to accept uncompressed video and use another decoder (and make sure that decoder isn't doing any deinterlacing). It's a very minor annoyance, but I figured it wouldn't hurt to ask.

I guess I should post something in the ffdshow thread about it not connecting to StreamSourceBuffer?

sneaker_ger
4th July 2011, 22:44
While its of course theoretically possible, its not something easily done. ffmpeg does all the reading, and on other streaming formats reading will actually continue, even though the time does not update. However, this would appear to be one feature not implemented in the ffmpeg wtv code, so the best way would be to ask them to add it, however you might as well just use the streambuffersource. Is there actually an advantage that LAV Splitter offers over it?

The funny thing is that your splitter seems to be able to cope with "progressive http streaming" when playing mkv just fine, while Haali and MPC-HC will stop at the last position that was completed when playback started. (At least if I didn't mix things up yet again)

clsid
4th July 2011, 23:28
The MPC/Gabest splitter can rebuild the index of truncated or partially download AVI files, allowing seeking to work in such files. Any chance of such a feature in LAV in the future?

Midzuki
5th July 2011, 06:04
OK, I've just uploaded a .7z archive to my Skydrive folder:

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

mlp-samples.7z contains various uncommon :devil: channel setups. Have fun! :)

nevcairiel
5th July 2011, 06:50
The MPC/Gabest splitter can rebuild the index of truncated or partially download AVI files, allowing seeking to work in such files. Any chance of such a feature in LAV in the future?

Not unless ffmpeg supports it, i have no plans to do any special work for a format like AVI.

Po
5th July 2011, 10:59
About thumbnails in general? Any plans to enchase compatibility, because ffmpeg unfortunately is a mesh.

nevcairiel
5th July 2011, 17:14
mlp-samples.7z contains various uncommon :devil: channel setups. Have fun! :)

I tested the files, and they all play with the proper channel layout. The only issue here is that ffmpeg seems unable to determine the duration of raw .mlp files. Did you create them for testing, or do you actually have real media in .mlp files?

Proper containers with MLP tracks in them will of course not suffer from this problem.

Midzuki
5th July 2011, 17:47
^ Yes, I took the time to create them for testing. But I thought LAV Splitter could not handle "raw" MLPs ? :confused: Anyway, when they are wrapped in MKV containers, ffdshow r3771 screws their channel layouts, as usual, :mad: , and LAV Audio, even though it detects the channel layouts correcty, strongly attenuates the Front Center, and sends the Rear Channels + the LFE to "nowhere" :( OTOH, foobar2000 almost-always has had zer0 issues with any type of MLP streams :p

nevcairiel
5th July 2011, 18:21
It supports raw MLP files, but it has no duration and you cannot seek.
Anyhow, those samples play fine here, LFE and Rear come out where they are supposed to.

Note that "odd" layouts will usually break in the Windows Mixer (sending some channels to wrong speakers). LAV Audio supports expanding those layouts into a "full" 5.1 layout, filling the missing channels with silence, which makes the files play properly even when the mixer is broken ("Convert Output to Standard Channel Layouts" option).
It *may* also be possible that something was fixed in ffmpeg since the last release, i can't be sure about that without some deeper checks.

I can try to throw one into a MKV later, but i doubt it makes a difference.

Midzuki
5th July 2011, 19:21
Note that "odd" layouts will usually break in the Windows Mixer (sending some channels to wrong speakers). LAV Audio supports expanding those layouts into a "full" 5.1 layout, filling the missing channels with silence, which makes the files play properly even when the mixer is broken ("Convert Output to Standard Channel Layouts" option).

Well, I serious doubt that the DirectSound engine on my XP machine is broken or something. :confused: Or that there exists an unknown problem in the kx audio drivers and/or my Audigy-2 cards. :confused: Especially when multichannel .WAVs, DTSs, AC3s, and AACs, are having N0 issues with the channel layouts that "nobody will ever use" :rolleyes:

Still, many thanks :thanks: for the constant attention.

nevcairiel
5th July 2011, 19:28
DirectSound is broken by design, fwiw. :)
Maybe something was fixed since the last release, it does work as intended here.

Midzuki
5th July 2011, 19:59
<TROLLING>

OK, now I understand everything.

The Open-Source community does not like MLP, period. :p

</TROLLING>

nevcairiel
5th July 2011, 20:09
All the samples you gave me play perfectly, i have no idea what else you want. :D

Midzuki
5th July 2011, 21:55
Hummm, I've just downloaded and tested a 5.1 TrueHD sample, both ffdshow and LAV Audio didn't ignore any channels... perhaps that should be a starting point. http://forum.doom9.org/images/icons/icon3.gif

clsid
5th July 2011, 22:01
You can start by updating your software. r3771 is old.

Midzuki
6th July 2011, 04:37
OK, with ffdshow r3919,

a 3/0/1 + LFE mlp .MKA is decoded this way:

Front Left and Front Right = okay
Front Center = okay
Back Center becomes Back Left :rolleyes:
LFE becomes Back Right :rolleyes:

BTW, the installer keeps resetting the merit of the audio processor to "DO_NOT_USE" :mad: How smart is that ???

nevcairiel
6th July 2011, 05:55
This is the latest development release of LAV Filters, when using LAV Splitter and LAV Audio from this, i get proper channel layouts on all your samples

http://files.1f0.de/lavf/LAVFilters-0.29-15-g11a7822.zip

Midzuki
6th July 2011, 07:32
Over here, the newest LAV Audio sends all the MLP channels to the front speakers. :eek: :( Definitely there exists a conspiracy against the proper decoding of non-Microsoft multichannel lossless audio under DirectShow. :)

http://forum.doom9.org/showthread.php?t=150139

nevcairiel
6th July 2011, 07:47
Its only a conspiracy against you, it works flawlessly for me. :)
As long as the audio format itself holds metadata to identify the channel layout, it'll work properly. It only fails when we have audio without metadata, then its "guessed" based on the channel count, which of course only works for one layout for every channel count - but MLP does have this metadata. :)

nevcairiel
6th July 2011, 07:58
LAV Audio does not care about any of that, it just takes the audio and decodes it, exactly the same on every system. Open the status property page during decoding, and you can see the channel layout its using and which channels have audio. On your channel id samples, all channels go exactly where they are supposed to - anything after that is no longer the decoders doing.

Anyway, all samples i have decode perfectly with LAV Audio, so the case is closed for me.

Midzuki
6th July 2011, 08:10
All right. I'll keep using LAV Audio for DTS-HD only --- ffdshow still is correct enough for AAC and AC3. :)

Sebastiii
6th July 2011, 09:16
Hi,
I have tested all MLP sample and channel output is OK and Correct except when i use option "Convert Output to Standard Channel Layouts" but i tested on non HDMI Output.
Effectively we can't seek on it.
Thanks.

tetsuo55
6th July 2011, 09:38
All right. I'll keep using LAV Audio for DTS-HD only --- ffdshow still is correct enough for AAC and AC3. :)What i hear nevcairiel saying is that there is something wrong with your graph or configuration.

I suggest checking:
* No other filters in the graph
* Which audio renderer are you using? Nev uses Reclock
* Is your windows speaker setting correct?
* Has your reciever been configured to remix the audio channels?
* Are you using the newest driver for your soundcard/hdmi port?

If it is none of these he'll probably need screenshots and exact details on your used hardware and configuration

Midzuki
6th July 2011, 09:52
What i hear nevcairiel saying is that there is something wrong with your graph or configuration.

Except there is nothing really wrong in them, apparently. :confused:


I suggest checking:
* No other filters in the graph

I normally use ffdshow audio processor for resampling, but removing it from the filter chain makes no difference.

* Which audio renderer are you using? Nev uses Reclock

"Default DirectSound Device". I don't like Reclock, and it's not a panacea (BUT I might give it another try, a.s.a.p.)

* Is your windows speaker setting correct?

But of course.

* Has your reciever been configured to remix the audio channels?

No.

* Are you using the newest driver for your soundcard/hdmi port?

The kx drivers are the b3st for the EMU-10k* cards, and my old machine does not and will not support HDMI.

If it is none of these he'll probably need screenshots and exact details on your used hardware and configuration

We'll see...

foobar2000 almost-always has had zer0 issues with any type of MLP streams :p

Well, I serious doubt that the DirectSound engine on my XP machine is broken or something. :confused: Or that there exists an unknown problem in the kx audio drivers and/or my Audigy-2 cards. :confused: Especially when multichannel .WAVs, DTSs, AC3s, and AACs, are having N0 issues with the channel layouts that "nobody will ever use".

nevcairiel
6th July 2011, 10:16
I only know that LAV Audio decodes it properly, tested on three systems, one of which is XP32, its not my job to debug your playback environment.

PS:
I dislike people that replace letters with numbers to be "cool", or something. Just sayin'

Midzuki
6th July 2011, 10:53
its not my job to debug your playback environment.

I have never meant that. But if you just want to misunderstand me, go ahead.

PS:
I dislike people that replace letters with numbers to be "cool", or something. Just sayin'

:) :) :) :) :)

clsid
6th July 2011, 12:45
OK, with ffdshow r3919,

a 3/0/1 + LFE mlp .MKA is decoded this way:

Front Left and Front Right = okay
Front Center = okay
Back Center becomes Back Left :rolleyes:
LFE becomes Back Right :rolleyes:

BTW, the installer keeps resetting the merit of the audio processor to "DO_NOT_USE" :mad: How smart is that ???
The installer re-registers the filter each time. That is normal. The audio processor is supposed to be manually inserted by the player, not to load by itself. The regular audio decoder can process all audio if you enable uncompressed in it.

Gleb Egorych
6th July 2011, 18:00
nevcairiel, here (http://forum.doom9.org/showthread.php?p=1507627#post1507627) I wrote about nosound issue with a particular sample and 1.1.0.0 and 1.1.0.1 versions. Now with 0.29.15 it is fixed, behaviour is the same for all versions 1.1.0.0-1.1.0.8. But after the breakpoint in the sample there is audible reduction of playing volume which doesn't happen with ASAudioHD.ax.

nevcairiel
6th July 2011, 18:40
I just applied another fix for this. I previously had it working, but some fix for that fix broke the previous fix which required a new fix! Anyway, its fixed!

Phew, that was alot of fixes.

SamuriHL
6th July 2011, 18:42
I just applied another fix for this. I previously had it working, but some fix for that fix broke the previous fix which required a new fix! Anyway, its fixed!

Phew, that was alot of fixes.

Uhhhh, don't do that. :D

Gleb Egorych
6th July 2011, 20:21
Thanks!

Midzuki
7th July 2011, 09:57
* Which audio renderer are you using? Nev uses Reclock

tetsuo55, your guess was right :) :) :)

ReClock is making LAVAudio work "as it should" on my old rig.

:thanks: :thanks: :thanks: :thanks: :thanks:

Luv
7th July 2011, 22:04
Nevcairiel,has your splitter been tested with Zoomplayer,on XP32 ? I use an almost four years old splitter from Haali and it delivers except for one things:
LPCM/PCM blu-ray channel mapping
Is it working with your splitter?
Thanks.

APorter819
8th July 2011, 00:57
I tried searching for an answer but may have missed it. I'm trying the LAV Filters for the first time. Can LAV handle multiple tracks in a mkv container? My default audio track in mkv container is ac3 with the second track being TrueHD or DTS-MA. In MPC-HC I'm only seeing the first audio track with no way to select track 2.

Thanks

nevcairiel
8th July 2011, 06:01
Navigate -> Audio Language, all tracks are there.

somy
8th July 2011, 08:34
The MPC-HC splitter is stupid and claims TrueHD is AC3 as well .. don't mind that, its just broken. MPC-HCs MKV splitter also does not have any advantages over LAV or Haali, i don't see any reason to use it.

Edit:
Apparently Haali also claims its AC3. WTF is with these bugged things.

The good news is, using LAV Splitter, you can now also use ffdshow for MLP decoding.
The bad news, Haali or the MPC-HC splitter still don't work with LAV Audio. Screw them and claiming they are sending AC3.

I have been putting off dealing with these broken things for too long, i guess. Maybe i should just add a detection for TrueHD/MLP when the source reports AC3, like ffdshow does.

Gabest does a better job switching among different audio tracks and it has its advantage over Halli IMO. I'm using Gabest in mediaportal for MKVs and TS videos and it works great. This brings my next question, what are the real benefits of LAV splitter and audio decoder?

nevcairiel
8th July 2011, 08:42
The MPC-HC/Gabest MKV Splitter does not do any stream switching at all.

somy
8th July 2011, 08:58
Hi nevcairiel,

Thanks for the reply, maybe I misunderstood how it works. I just followed the configuration by Sebastiii to make audio switching work in MP:
http://forum.team-mediaportal.com/codecs-external-players-55/mpc-splitter-mkv-2-audio-streams-problems-79385/#post593924

Anyway, I'd very much like to try LAVF, is it compatible with 64bits Windows 7? Thanks!

APorter819
8th July 2011, 17:50
Navigate -> Audio Language, all tracks are there.

Thanks, was use to looking under Play -> Audio.

nevcairiel
8th July 2011, 17:52
Yeah i hate how MPC-HC is so inconsistent there and has two menus with completely different contents.

Underground78
8th July 2011, 17:52
Thanks, was use to looking under Play -> Audio.

I don't really understand why it is not there any more. Is that by design or is it a bug on MPC-HC side ?

Edit:

Yeah i hate how MPC-HC is so inconsistent there and has two menus with completely different contents.

So it is a bug in MPC-HC ?

clsid
8th July 2011, 18:15
Navigate -> Audio language shows the streams selectable in the splitter (if it has internal stream switching). This happens with LAV and Haali.

Play -> Audio shows all connected incoming streams to the stream switcher. That is just one with Haali and LAV. The MPC splitters create a pin for each audio stream.

Perhaps the behavior can be change so that Play->Audio shows the contents of the Navigate list when the audio stream switcher has only 1 input stream.

Underground78
8th July 2011, 18:17
Yeah those two menus probably need to be somehow merged I guess.

nevcairiel
9th July 2011, 06:50
Here is a new test build for anyone brave enough:

http://files.1f0.de/lavf/LAVFilters-0.29-20-g66b84fa.zip

And i'm off for the weekend, have fun. :p

Gleb Egorych
9th July 2011, 11:06
nevcairiel, thanks!
DTS no_sound/low_volume bug is fixed and Zoom Player compatibility is improved by adding "Remove Audio Decoder on Audio Stream Switch" option.

mark0077
9th July 2011, 16:15
nev, I have tried you're latest splitter again today on some mkv files, and I'm not sure if they were badly made or not (made about 6 months ago using MakeMKV), but with lav splitter I can't seek to any point in them again. With haali I can. If you need a sample let me know or maybe you already know if this is something that can be improved or not?

For the moment I have to use haali for mkv, although I'd rather have your filters / decoders 100%