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
20th May 2011, 11:03
LAV Splitter does not change media types on the fly, instead it will always export at least two media types on every Audio Pin, first all format specific types, and at the end of the list the MEDIASUBTYPE_FFMPEG_AUDIO. Connection Logic should always try the media types in order, starting with the first, and if that one fails advancing to the next.

MEDIASUBTYPE_FFMPEG_AUDIO is my own special media type which allows LAV Audio to playback all audio codecs that LAV Splitter can split without having to hook every codec up to its special separate media type first. Using this, i can basically ensure that every file that ffmpeg supports can be played - well, at least the Audio part of it.

Mark_A_W
20th May 2011, 11:06
Yep, I corrected the sub-type for E-AC3, and it's all working now :)

pankov
20th May 2011, 12:15
Nev,
I see the logic and it's perfect. And ZoomPlayer works according to it. It reached to this MEDIASUBTYPE_FFMPEG_AUDIO because it didn't find any profile using the correct MEDIASUBTYPE_DOLBY_DDPLUS. It did exactly what it was "told" to do by user. That is so typical of software - doesn't do what the user wants but only what it's told to do.
;)

Gleb Egorych
20th May 2011, 12:34
http://forum.inmatrix.com/index.php?showtopic=13088
Note it's a thread from a closed forum, not everyone has an access there.


BTW, I tested some M2TS files with E-AC3 tracks, there is something about LAV Source. I've found that LAV Source + ArcSoft Audio Decoder HD (ASAudioHD.ax) work badly, channel mapping is wrong and a part of channels are muted.

LAV Source + LAV Audio and LAV Source + ffdshow are OK. MPH-HC mpeg splitter is OK with LAV, ffdshow and ArcSoft.

CruNcher
20th May 2011, 12:54
LAV Splitter does not support adjusting the playback rate. 1x, or get out! :p

Huh and what for a reason is their for such a limitation, i mean Cyberlink does it also but many others don't, I mean MPC-HC seems also to force it but only when used in a Player environment it doesn't happen when direct264 for example requests it with this bitstream and 25 -> 30 fps (and lock) isn't 1x either ?

nevcairiel
20th May 2011, 13:10
The "rate" only matters for playback, as that defines if timestamps need to be adjusted. You can still pull frames as fast as you want. The only difference a different rate would make would be different timestamps, so in a playback scenario, stuff plays back faster.

CruNcher
20th May 2011, 13:23
Ok but why it locks then to 30 fps if you could pull the frames as fast as you want (in my example 42 fps the max i can get from the other tested splitter with those encoding settings http://forum.doom9.org/showthread.php?p=1502105#post1502105 ) it accelerates once to 35 fps and then goes down and stays @ 30 fps some strange behavior for lav splitter and cyberlinks demuxer compared to how the others handle it.

nevcairiel
20th May 2011, 13:28
A limitation/bug in that tool you're using.

CruNcher
20th May 2011, 14:29
A limitation/bug in that tool you're using.

so graphstudio is also limited buged ?

MPC-HC Splitter
http://imageshack.us/m/689/9136/mpchcsplitterframereque.png

Lav Splitter
http://img29.imageshack.us/img29/9689/lavsplitterframerequest.png

Something itchy is going on if you ask me ;)

nevcairiel
20th May 2011, 15:07
I don't have the MainConcept decoder, but on some H264 file, CoreAVC pumps out reliable 370-380fps for me.

CruNcher
20th May 2011, 15:23
As i said this is reproducible with any Decoder not only Mainconcepts (tried so far FFdshow,Dscaler,MPC-HC) and i can't say anything about H.264 bitstreams in .ts didn't checked if the same happens also in that scenario yet only Mpeg-2 .ts so far and only this specific Studio stream tested.
Im also going to try some older lav splitter builds maybe 1 of them works though if it is ffmpeg specific so a problem between how ffmpeg handles that and dshow i guess it wont be easy to fix. And as you can see the read process push into memory is unevenly distributed it looks hackish compared to MPC-HC continuous evenly distributed read. Also that its 30 (NTSC) fps or near that makes me wonder if it's hard coded behavior somewhere (maybe it was even more efficient todo it on *nix this way) ?

Carpo
20th May 2011, 17:39
using LAV Filters + LAV CUVID, playing Bluray discs on my laptop sounds better and plays better than PowerDVD :-)

CruNcher
20th May 2011, 17:44
hehe not surprising depending on your dshow player you use :) PowerDVD is bloated with features that can also be very destructive (how many screenshots i saw of users having their motion interpolation enabled and so strange results from it cant count that anymore or their dynamic color enhancement on) :P
Especially if you rate some source by that lower quality then it actually is in Real :(

Carpo
20th May 2011, 17:46
it came with the laptop, so i used it, now i dont have to, coupled with XBMC i have a nice HTPC now, also saves me having to move to Linux :D

VipZ
20th May 2011, 19:16
Ok but why it locks then to 30 fps if you could pull the frames as fast as you want (in my example 42 fps the max i can get from the other tested splitter with those encoding settings http://forum.doom9.org/showthread.php?p=1502105#post1502105 ) it accelerates once to 35 fps and then goes down and stays @ 30 fps some strange behavior for lav splitter and cyberlinks demuxer compared to how the others handle it.

I just did a quick test in MPC with LAV Audio+Splitter+ffdshow on MKV/AC3/h264. I had no issues getting 50fps at 2x playback while getting no dropped frames at under 10% CPU usage.




Nev, I am not sure what has changed but new builds are sweet, I can finally change from decoding to bitstreaming and back without MPC crashing :)

ranpha
21st May 2011, 03:18
With the latest git commit (https://github.com/Nevcairiel/LAVFSplitter/commit/f8698abe69f96ed13aaaf245bd358d482c296300), audio track switching from a FLAC track (decoded by LAV Audio) to a DTS-HD MA track (also decoded with LAV Audio with Arcsoft dll) will cause loud static sound to be produced. This happens only if I have AC3Filter between LAV Audio and the audio renderer.

This problem doesn't happen with the stable 0.26, where audio format switching happens just fine.

kniff
21st May 2011, 05:12
First time poster, long time reader!

Got nothing to contribute, i just registered to thank you Nev for the development and release of LAV filters. I recently setup my new fusionbased htpc and after changing a few settings my Onkyo greeted me with this

http://i.imgur.com/cHZO6.png

I will keep an eye on this thread for updates, thanks again (you should think about getting a paypal account up for donations like someone else asked about)

nevcairiel
21st May 2011, 07:28
With the latest git commit (https://github.com/Nevcairiel/LAVFSplitter/commit/f8698abe69f96ed13aaaf245bd358d482c296300), audio track switching from a FLAC track (decoded by LAV Audio) to a DTS-HD MA track (also decoded with LAV Audio with Arcsoft dll) will cause loud static sound to be produced. This happens only if I have AC3Filter between LAV Audio and the audio renderer.

This problem doesn't happen with the stable 0.26, where audio format switching happens just fine.

It should be fixed again. The problem is that AC3Filter does fail if you send it a special channel mask, which is totally weird.

In general, i strongly recommend against using AC3Filter for anything. Its outdated, unmaintained and severly broken.

nevcairiel
21st May 2011, 08:33
So, here is a test build with the new code that will map channels around.
The main use of that function is to make sure that when using WASAPI output over HDMI, the receiver will get a channel layout that it knows how to play back, because there is no metadata to indicate which channel goes to what speaker.
To solve this, all layouts will get expanded to 5.1/6.1/7.1 (except Mono and Stereo).

In addition, there are options to expand Mono to Stereo, and 6.1 to 7.1

http://files.1f0.de/lavf/LAVFilters-0.26-31-g6b06639.zip

I have one specific testing request.
Anyone that can natively play 6.1 content (i cannot, my receiver always only outputs stereo in that case), please run this test:

- Use ReClock for WASAPI playback, so the windows mixer is out of the game
- Play http://files.1f0.de/samples/331.dts
- Check if the Back-Center really comes out the Back channel(s) (even if you dont understand the guy, the order he says it is FL/FR/FC/SL/SR/BC)

Thanks!
PS:
There is also debug versions included which will create debug logs on your desktop. Either just register the debug versions, or rename them appropriately to activate.

VipZ
21st May 2011, 08:46
Nev I have a favor to ask if its not to much of a hassle :)

When the splitter get's reg'ed it deletes the forced extensions, what would your thoughts of a reg key which if set to 0, wont do this?

This function could make installers bit more flexible.

If the above is too much of a hassle, could you let me know where to edit the code for this?

Thanks

Andy o
21st May 2011, 10:23
In addition, there are options to expand Mono to Stereo, and 6.1 to 7.1

http://files.1f0.de/lavf/LAVFilters-0.26-31-g6b06639.zip

I have one specific testing request.
Anyone that can natively play 6.1 content (i cannot, my receiver always only outputs stereo in that case), please run this test:

- Use ReClock for WASAPI playback, so the windows mixer is out of the game
- Play http://files.1f0.de/samples/331.dts
- Check if the Back-Center really comes out the Back channel(s) (even if you dont understand the guy, the order he says it is FL/FR/FC/SL/SR/BC)

6.1 working OK now with the dca decoder. The 6.1->7.1 option is also working as intended (similarly to what the Arcsoft decoder does).

ranpha
21st May 2011, 10:29
It should be fixed again. The problem is that AC3Filter does fail if you send it a special channel mask, which is totally weird.

In general, i strongly recommend against using AC3Filter for anything. Its outdated, unmaintained and severly broken.

Just recompiled the build after the commit here (https://github.com/Nevcairiel/LAVFSplitter/commit/a17c8aa60eb42ee355ef0d529db509ee1affb373), and audio format switching now works with AC3Filter, at least in my tentative tests.

But I forgot to mention in my previous post that the same problem also happens if I have ffdshow Audio Decoder between LAV Audio and the audio renderer too. And even with the latest commit, the screeching noise will still happen if I were to switch from the FLAC track to the DTS-HD MA track.

nevcairiel
21st May 2011, 10:55
The difference is only channel masks. If one specific channel mask makes a filter go crazy, its a bug in that filter, not in my decoder. The logic right now is good the way it is, i cannot (and will not) change it because of buggy software like ffdshow or AC3Filter.
It has nothing to do with the outgoing data at all, its just one flag in the media type. I don't know how any filter can be so stupid to mess up because of that.

Also, i cannot work with the zero information you provide. There are dozens of different DTS and FLAC channel layouts around, how the hell am i to know which causes this problem. The layout is shown in the channel field on the status page of LAV Audio, it'll say "6 / 0x3f" for example, channel count and layout.
Also, i included those debug versions for a reason. :)

ranpha
21st May 2011, 11:23
The difference is only channel masks. If one specific channel mask makes a filter go crazy, its a bug in that filter, not in my decoder. The logic right now is good the way it is, i cannot (and will not) change it because of buggy software like ffdshow or AC3Filter.
It has nothing to do with the outgoing data at all, its just one flag in the media type. I don't know how any filter can be so stupid to mess up because of that.

Also, i cannot work with the zero information you provide. There are dozens of different DTS and FLAC channel layouts around, how the hell am i to know which causes this problem.
Also, i included those debug versions for a reason. :)

I believe it has nothing to do with channel configurations, but more on stream format.

Switching from a stereo FLAC track to a 5.1 DTS-HD MA track will cause static sound in ffdshow.
Switching from a 5.1 FLAC to a 5.1 DTS-HD MA track also cause the same thing.

Sample: http://www.filesonic.com/file/1000967784/
Log: http://dl.dropbox.com/u/132004/lavsplitterlog.7z

AC3Filter/ffdshow audio decoder are still important because of their mixer support, I can upmix stereo or downmix 7.1 tracks to my 5.1 speakers with them

nevcairiel
21st May 2011, 11:54
I cannot reproduce any problems with ffdshow. I was using LAV Audio for decoding, with ffdshow accepting uncompressed audio. Make sure you actually turn off decoding in ffdshow, at least DTS and FLAC in this case, or on track switch ffdshow might take over, at least in MPC-HC.
(or use ffdshow audio processor instead of decoder)

With AC3Filter, i encounterd a playback problem if DTS decoding was not turned off in its config, because AC3Filter cannot deal with DTS-HD, but it was just broken, no constant noise or anything.

Any particular settings you're using? Which output formats?
Which player?

ranpha
21st May 2011, 12:35
Player is MPC-HC build 3123 x86.
ffdshow is x86 build 3853.
Audio renderer is Reclock in WASAPI mode.
The Arcsoft dll is from TMT5.
LAVSplitter is still the one committed at this stage (https://github.com/Nevcairiel/LAVFSplitter/commit/a17c8aa60eb42ee355ef0d529db509ee1affb373), haven't pulled newer revisions yet.

Audio decoding has been turned off in ffdshow Audio Decoder (all decoders are disabled). Tried it with ffdshow Audio Processor too and the problem still persists. The same happened even if all post-processing filters are disabled.

BTW, you won't get the static sound immediately after you switch the audio track in the sample. When I first load the clip, MPC-HC will play the clip normally, with the default FLAC audio track being played. Then I switched the audio track to the DTS-HD MA track and the video continued playing, but without any sound. I then tried to seek the clip backwards (or forward) and the high-pitch static sound will start to appear.

Switching back to the FLAC track and the audio will return to normal.

More tests with AC3Filter seems to confirm that the problem has been solved there. Have to use it then as a mixer.

nevcairiel
21st May 2011, 12:43
BTW, you won't get the static sound immediately after you switch the audio track in the sample. When I first load the clip, MPC-HC will play the clip normally, with the default FLAC audio track being played. Then I switched the audio track to the DTS-HD MA track and the video continued playing, but without any sound. I then tried to seek the clip backwards (or forward) and the high-pitch static sound will start to appear.


I can reproduce it now, and this didn't happen with 0.26?
I'll run some tests.

First tests look like ffdshow is still thinking its getting 24-bit audio, but i'm actually sending 16-bit audio.

Edit:
Ah, there we go, i see what the problem is.
ffdshow is not capable to switch between 16int and 24int input on the fly. This sucks.
You can fix this by only selecting one output format in ffdshow.

If you want, you can bring this up with the ffdshow developers, maybe they can fix this, as it should be perfectly possible to switch on the fly.
Other decoders don't suffer from this as they typically do not switch to the best format on the fly, and rather are stuck with one format.

I recommend using either always 24-bit int or always 32-bit float output in the ffdshow processor, it internally uses float for matrixing anyway, i think.
Just disable all other output formats, keep 32-bit float active, and it should be fine.

Added to the FAQ too.

For the record, if this is just about up/down mixing, LAV will be able to do this at a later stage.

clsid
21st May 2011, 13:33
I know you are not a fan of workarounds. Adding an option to force 32float output in LAV when being connected to ffdshow is not going to happen, right?
Hopefully this can be fixed in ffdshow, since I prefer things to work directly out-of-the-box.

nevcairiel
21st May 2011, 13:34
Right now, i don't have the capabilities to force a specific output format.
Once i add format conversion, there will be an option for the user to force it, i may also consider forcing it when connecting to ffdshow.

The problem is, its not easy to detect that. I would need to know if its ffdshow connecting before i send it any media type .. we'll see.

Virtual_ManPL
21st May 2011, 14:16
Is bug with crack and noise when playing some explosions know maybe ?
It happens IIRC in some FLAC/DTS/AC3 (5.1/6.1/7.1). I don't remember details, but I can give it it will be needed ;p

nevcairiel
21st May 2011, 14:35
If there is any audio distortion, its rooted in ffmpeg itself, as i don't modify the audio.

Samples which clearly show the problem would be appreciated, though.

Mercury_22
21st May 2011, 15:08
Small request :) can you please, please ... separate the settings for x86 and x64 versions

Gleb Egorych
21st May 2011, 20:01
nevcairiel, am I right that for the latest test version the best dtsdecoderdll.dll version is 1.1.0.0 from 25.04.2008?

nevcairiel
21st May 2011, 20:17
Yes. However, 1.1.0.8 works nearly as good, just 6.0 content will not work properly, you'll not get the back channel. 6.1 works as expected, and there is not much 6.0 content .. so in practice, it wont matter much.

yesgrey
21st May 2011, 20:45
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.
I get the "dts" word even when the dtsdecoder.dll file is not in the LAV Audio folder. So, how could I know if the Arcsoft decoder is being used?

nevcairiel
21st May 2011, 21:23
I get the "dts" word even when the dtsdecoder.dll file is not in the LAV Audio folder. So, how could I know if the Arcsoft decoder is being used?

I just instruct it to load the dll, if its in any common dll path (windows system dir, etc), it'll load it from there. I didn't think it would be super useful to only load it from the LAV Audio dir, but if people think thats better, i can switch it to that.

Anyhow, if it says "dts", then its using it - from somewhere. :)

SamuriHL
21st May 2011, 21:36
I didn't think it would be super useful to only load it from the LAV Audio dir, but if people think thats better, i can switch it to that.


No....

yesgrey
21st May 2011, 21:43
if people think thats better, i can switch it to that.
No, keep it like it is now, it's the best way. Update your instructions instead, saying what you have just said. This way we only need to have it in one place. ;)

By the way, thanks for this new feature. You seem to be trying to dethrone madshi on giving us things that we didn't know that we would need them. :D

bjd
21st May 2011, 22:17
I get the "dts" word even when the dtsdecoder.dll file is not in the LAV Audio folder. So, how could I know if the Arcsoft decoder is being used?

Check the status page of the LAV Audio.

ffmpeg outputs 32bit float and Arcsoft 24 bit int - what do you see?

nevcairiel
21st May 2011, 22:23
giving us things that we didn't know that we would need them. :D

Those are the best things. :)

yesgrey
21st May 2011, 22:32
ffmpeg outputs 32bit float and Arcsoft 24 bit int - what do you see?
I see 24 bit int, but nevcariel already explained that the dtsdecoder.dll doesn't need to be in LAV Filter directory to be used... but thanks for the tip.

nevcairiel
21st May 2011, 22:33
It can also be 16 bit, when a lossless track is marked as such. ;)

Dogway
22nd May 2011, 01:20
I couldn't bitstream, ffdshow audio gets used instead. I dont know what might be but sorry for my ignorance, to bitstream do I need a receiver? or can I just plug it to the TV and let the TV do the downmix? It could be the TV or just the HDMI cable, a very cheap one... Not that Im stressed about this, I was just testing out of curiosity.

Sebastiii
22nd May 2011, 07:39
Hi,

To follow discussion on IRC, i just see that with .m2ts or .mpls and when ffdshow video decoder is in graph, when changing subtitle stream (memory grow up) if i do multiple sub change, my app crash (MP or Graphstudio).
This is log :
http://dl.dropbox.com/u/10536084/lav/LAVSplitter-log1.rar
http://dl.dropbox.com/u/10536084/lav/LAVSplitter-log2.rar

I have tested with official and own build (LAVF and FFDShow).
It didn't happen with other splitter (i have try with old xbmcsplitter ver7, MPC MPEG Gabest).

On mkv, it seems ok or memory didn't jump higher with m2ts/mpls.

I hope that someone can try and see the same thing, i have tested on 2 PC(s).
It did happen when ffdshow is decoder or post-process filter.
Cheers,
Seb.

Mark_A_W
22nd May 2011, 08:20
I just instruct it to load the dll, if its in any common dll path (windows system dir, etc), it'll load it from there. I didn't think it would be super useful to only load it from the LAV Audio dir, but if people think thats better, i can switch it to that.

Anyhow, if it says "dts", then its using it - from somewhere. :)

Umm...ahhh...I'll have to beg to differ from the others.

I'd really prefer it to ONLY load from the LAVAudio directory. Then you are in control.

Or, at the very least report the version.

Otherwise you are going to get people complaining that this version does this, or that version does something stupid....when all along they are running some other version stuck somewhere on their system.

I for one have a few versions floating around, and bonus paths set in environment from jumping through hoops trying to get the arcsoft decoders to work for directshow for eac3to in the early days. (And then madshi lets the cat out of the bag that he didn't really need the directshow registration...).

Keep up the good work!

Mark

VipZ
22nd May 2011, 09:45
Hi Nev, I have found that LAV Splitter cant deal with MP3's with embedded cover art, here is a quick sample for this http://www.mediafire.com/?xq9nw1kiiaz04iz

I have also got some MPEG-PS files that don't load LAV Splitter, will PM sample.

Thanks

nevcairiel
22nd May 2011, 10:07
Fixed, both samples work fine with my very latest change.

VipZ
22nd May 2011, 10:22
Fixed, both samples work fine with my very latest change.

Thanks :)

ranpha
22nd May 2011, 10:23
Umm...ahhh...I'll have to beg to differ from the others.

I'd really prefer it to ONLY load from the LAVAudio directory. Then you are in control.

Or, at the very least report the version.

Otherwise you are going to get people complaining that this version does this, or that version does something stupid....when all along they are running some other version stuck somewhere on their system.

I for one have a few versions floating around, and bonus paths set in environment from jumping through hoops trying to get the arcsoft decoders to work for directshow for eac3to in the early days. (And then madshi lets the cat out of the bag that he didn't really need the directshow registration...).

Keep up the good work!

Mark

I also second this proposal. LAV Splitter should only load it from the the same directory as the .ax files. I have some of those dll files splattered in Program Files.

At least make it an option?

jmone
22nd May 2011, 10:29
nevcairiel, I've been testing subtitle handling for MC16 latest beta changes with V0.26 of LAVSplitter (you opinions in that thread would be welcome) using Avatar to test Forced Subs. I notice that at the 47:00 minute mark is the forced sub "Why me? That's not fair...", and this one hangs around for a very very long time (eg till the next forced sub at around 53:45). I know you touched on the logic for this previously...