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
16th October 2015, 16:18
Please open your own thread if you want to continue your discussions, its entirely unrelated to LAV at this point.

DragonQ
18th October 2015, 16:13
Nev, are there any features you're looking to include before the release of 1.0? Just curious, as it seems LAV Filters is really stable at this point and not much is blocking such a release except features.

nevcairiel
18th October 2015, 23:02
I don't put much meaning in such version numbers. I don't have any concrete plans when or what to do specifically for a 1.0. Maybe one day it'll feel right, and I'll use the chance to re-do some of LAVs control interfaces (a bunch of cruft accumulated that I never removed because of backwards compat).

Neeto
19th October 2015, 02:30
@nevcariel
Any chance of getting a 3.1 down mix in the mixer? The 4.0 down mix seems to be for a quad system, not a 3.1 system or am I missing something?

Anyone? :thanks:

tekko
20th October 2015, 17:37
After "Switched ASF/WMV demuxing to a new demuxer from Libav", the splitter no longer plays all of my wmv's. "wm asf reader" is used instead when that happens. I went back to 0.65.0.25 and it can handle all of them. The ones that are having problem shows "... unneeded bytes at end of file" in gspot. Trying to fix the wmv's index might fix the problem, but I will no longer be able scan for duplicates and some are on read-only media. Can you make LAV Splitter fall back to the old demuxer when that happens? Thanks.

nevcairiel
20th October 2015, 18:34
Please provide samples that don't work instead, that way they can be fixed instead of worrying about some fallback.

nevcairiel
21st October 2015, 23:22
@nevcariel
Any chance of getting a 3.1 down mix in the mixer? The 4.0 down mix seems to be for a quad system, not a 3.1 system or am I missing something?

I don't currently plan to offer every kind of unusual speaker setup in the options, it would just overwhelm the list.

If you really want to, you can cheat the options box by editing the channel layout in the registry entry (HKCU\Software\LAV\Audio -> MixingLayout), 3.1 would likely be hexadecimal 0x0F (0x1+2 for L/R, 0x4 for C, 0x8 for LFE)
Maybe I should add a custom option and let you specify hex channel layouts in the options panel, huh.

Neeto
22nd October 2015, 05:06
I don't currently plan to offer every kind of unusual speaker setup in the options, it would just overwhelm the list.

If you really want to, you can cheat the options box by editing the channel layout in the registry entry (HKCU\Software\LAV\Audio -> MixingLayout), 3.1 would likely be hexadecimal 0x0F (0x1+2 for L/R, 0x4 for C, 0x8 for LFE)
Maybe I should add a custom option and let you specify hex channel layouts in the options panel, huh.

Thanks nevcairiel will take a look.
Will using the hex values allow the sliders to vary the mixing of the back/side L/R channels into the front L/R?
The ffdshow custom matrix mapping/mixing tab is probably overkill, but still a nice flexible solution IMHO.

foxyshadis
22nd October 2015, 13:46
I just found Equalizer APO (https://sourceforge.net/p/equalizerapo/), which has support for reordering and regaining channels, although it requires you to set each channel's gain manually, and cannot mix multiple channels into one. It doesn't support compression/limiting, because the author is mostly all about EQ, but with some prodding it could happen. Still, it's easy to get in the chain. This is the kind of thing DirectShow was made for; LAV shouldn't have be the whole audio chain end-to-end.

There must be other filters out there that do generic audio processing well. Better to discover them than beg nev to do something he won't.

nijiko
22nd October 2015, 16:47
Will LAV be planed to support BD ISO image / folder or BD navi / menu?

nevcairiel
22nd October 2015, 16:56
No plans.

nevcairiel
23rd October 2015, 15:46
I have an original DVD(Alien 2) on hard disk which plays fine in previous versions of LAV.

Now i dont see any "button". Only the mouse changed when comes over a "button".

When I start this DVD a black screen is only what I see.
After a jump in the timeline you see the screen.


I managed to get ahold of Homeland Season 3 DVDs which you said also had this problem (and their IFO files match the files you send me), and I cannot reproduce any problems. I'm playing from the original DVD in the drive, and all is working fine.
Latest nightly, of course.

clsid
23rd October 2015, 16:17
Maybe related to the Windows update?
https://support.microsoft.com/en-us/kb/3001554

hubblec4
23rd October 2015, 22:12
I managed to get ahold of Homeland Season 3 DVDs which you said also had this problem (and their IFO files match the files you send me), and I cannot reproduce any problems. I'm playing from the original DVD in the drive, and all is working fine.
Latest nightly, of course.

OK, thanks,
I will try it with the Latest nightly.

With another DVD(series) "EUREKA" there are no problems.


EDIT: it works with the latest nightly!

Magik Mark
24th October 2015, 06:44
Nev

Is it possible to put release notes on nightly builds so we know what to test?

Thanks

nevcairiel
24th October 2015, 09:59
Is it possible to put release notes on nightly builds so we know what to test?


If there is something in particular I want tested, I'll usually mention it.
Otherwise you can read the commit logs:
https://github.com/Nevcairiel/LAVFilters/commits/master

I'll not write a proper user-readable changelog for the nightly versions otherwise, sorry.


shouldn't Intel's Bay Trail be able to do hardware accelerated decoding of VP8 video?

There is no VP8 or VP9 hardware acceleration in LAV Video of any kind (yet). The main reason for this is that until recently there was no specification on how to access the VP8/9 hardware decoders. Microsoft has released this specification recently, so now all we have to do is hope that new drivers show up which actually implement hardware acceleration compatible to this spec. For VP9 its at least possible on Broadwell, Braswell and Skylake (and I have this nearly finished implementing in LAV). Haven't seen any VP8 support exposed in drivers yet.

P.J
24th October 2015, 17:55
For VP9 its at least possible on Broadwell, Braswell and Skylake (and I have this nearly finished implementing in LAV). Haven't seen any VP8 support exposed in drivers yet.

And Nvidia? :)

nevcairiel
24th October 2015, 17:56
And Nvidia? :)

Current drivers are not working. Maybe in the future.

andybkma
25th October 2015, 12:57
Hi nev,

I see that you changed the wmv splitter in LAV .66. I have many wmv files that will not seek and/or play now with .66 but worked fine with LAV .65 so this leads me to believe that this new wmv splitter (Changed: Switched ASF/WMV demuxing to a new demuxer from Libav) perhaps isn't quite ready for general use yet (?). I have included two samples here (I have many more but they are much bigger to upload) : http://depositfiles.com/files/nksp2h699

Note: This should be easy to duplicate... I have LAV .66 set as wmv splitter and LAV as wmv decoder and the sample vids won't seek and or play. As soon as I switch the wmv splitter in Zoom Player to WMReader or use LAV .65 as the wmv splitter the files play and seek fine.

Thank you

sneaker_ger
25th October 2015, 19:28
Have you already tried the latest nightly (http://files.1f0.de/lavf/nightly/) (0.66.0-31)? If so, provide samples.

andybkma
26th October 2015, 03:26
Have you already tried the latest nightly (http://files.1f0.de/lavf/nightly/) (0.66.0-31)? If so, provide samples.

Not sure if you are responding to my post above yours because I obviously provided samples in my post (with download link)... but yes, the .66-31 has the same wmv splitter problems as .66

sneaker_ger
26th October 2015, 07:22
Yes, I was responding to you. (I overlooked the samples)
For me 478_SPV_.wmv plays&seeks using 0.66.0-31 but seeking takes very long (like 20 seconds). 489_SPV_.wmv plays but falls back to start on seeking attempt. No problem using Microsoft splitter. VLC seeks fast but playback seems stuttery or too slow.

andybkma
26th October 2015, 09:42
Yes, I was responding to you. (I overlooked the samples)
For me 478_SPV_.wmv plays&seeks using 0.66.0-31 but seeking takes very long (like 20 seconds). 489_SPV_.wmv plays but falls back to start on seeking attempt. No problem using Microsoft splitter. VLC seeks fast but playback seems stuttery or too slow.

Yes my testing exactly... using LAV .65 also works great. It's that new wmv demuxer in LAV .66

nevcairiel
26th October 2015, 10:37
There is a long list of samples that didn't work so great on the old one, so its not so easy to judge. The goal is to fix/improve the new one, and not just switch back.
Anyway, my finding is that the first file works fine in playback, just seeking is slow. The second file stops playback after about 11 seconds and also doesn't seek beyond this point. Will see what can be done.

LigH
26th October 2015, 11:10
Although I replaced the MPC-HC internal copy of LAV filters with a just even also installed "nightly" (0.66.0-31) – so both available LAV filters, internal and external-DS, are most recent – MPC-HC just skips a webm created with vpxenc (v1.4.0-1562-g56cfbee) using VP10. Does it not yet contain a matching decoder? Or is the issue rather outside LAV Filters?

nevcairiel
26th October 2015, 11:15
What made you think VP10 would even be remotely supported? :)
Its bitstream is not even finalized yet, and of course there is no decoder in ffmpeg yet.

LigH
26th October 2015, 11:32
I didn't know any details about the specs development... was just surprised that VP10 could be enabled in vpxenc at all, already. So for now, the only way to test it seems to be in conjunction with vpxdec. Alright, will stay curious and look forward to reading about news "when it's done".

andybkma
26th October 2015, 15:54
There is a long list of samples that didn't work so great on the old one, so its not so easy to judge. The goal is to fix/improve the new one, and not just switch back.
Anyway, my finding is that the first file works fine in playback, just seeking is slow. The second file stops playback after about 11 seconds and also doesn't seek beyond this point. Will see what can be done.

Hi nev, thanks for taking a look at this. Also just noticed another problem with the new wmv demuxer in LAV .66... it has broken slow-motion with wmv files. With LAV .65, in Zoom Player I can press L while the wmv video is playing and it plays slow-motion. But with LAV .66 nothing happens... it still keeps playing at normal speed.

Thanks again

thomponth
27th October 2015, 11:50
Hi,

I am trying to build the LAV filters under Visual Studio 2015.

First, I have downloaded the source code of the LAV filters (v0.66).

Then, as indicated in the README file of LAV filters' source code, I have downloaded:
- the fork of ffmpeg from http://git.1f0.de/gitweb?p=ffmpeg.git;a=summary
- libblurray from http://git.1f0.de/gitweb?p=libbluray.git;a=summary
- IntelQuickSyncDecoder from sourceforge

However, Visual Studio 2015 does not find a file called "config.h" which is included in ffmpeg\libavcodec\mathops.h

I have searched on the Internet and I couldn't find any solution for this 'config.h" problem.

I guess some of you guys know how to build the LAV filters.

So could you please tell me how to fix this problem? Where is the config.h file that I should include.

Thanks in advance!

nevcairiel
27th October 2015, 12:13
config.h is auto-generated, use build.bat to build everything properly. Please note that I can't really give support to people trying to setup their own dev environment. LAV doesn't require anything special though.

NTSky
27th October 2015, 15:05
Hi,

I supported application that is using DirectShow Editing Services (DES) and it internally creates graph with circle connections and when LAV video decoder is used, the application is crashing, due to stack overflow.

The reason is "CLAVVideo::ReconnectOutput" method, that recursively enumerate filters through their connections, and as DES creates circle connection, recursion become infinite.

Need some help.

nevcairiel
27th October 2015, 16:15
What LAV Video does in that function is pretty standard dynamic reconnection for format changes, you should make your application deal with that. It cannot be disabled.

NTSky
27th October 2015, 17:38
"CLAVVideo::ReconnectOutput" method contains 2 calls of "CLAVVideo::FilterInGraph" method to check if "CLSID_madVR" or "CLSID_OverlayMixer" filters exist in a graph. But in "FindFilterSafe" function we have recursive call of itself with filters it is connected to, which cause infinite recursive in case of circle connections in a graph, that is not forbidden by DirectShow and work fine with other decoders.

nevcairiel
27th October 2015, 18:20
How would a circular connection make sense, you would never get any data out of the graph at the end, it would just roam in circles.
There is even an error code for this, namely VFW_E_CIRCULAR_GRAPH, which would suggest circular graphs are not all what you are making them out to be.

Tracking circular connections in those functions would be somewhat complex since they are recursive, so for now I'll just call it unsupported.

andybkma
28th October 2015, 02:06
Hi nev, thanks for taking a look at this. Also just noticed another problem with the new wmv demuxer in LAV .66... it has broken slow-motion with wmv files. With LAV .65, in Zoom Player I can press L while the wmv video is playing and it plays slow-motion. But with LAV .66 nothing happens... it still keeps playing at normal speed.

Thanks again

Hi nev, just want to make sure that the above report that the new wmv splitter has broken slow-motion didn't get lost in the shuffle. Thanks

aufkrawall
28th October 2015, 11:02
Hello,
DXVA2 CB requires more PCIe bandwidth than software decoding, or am I mistaken?
The frame has to be copied twice and decoded 4k 10 Bit should be quite huge. Especially bandwidth needed increases with frame rate.
Do you think PCIe 2.0 is sufficient for 10 bit 4k 60fps?
Would the bandwidth needed even increase more with BT.2020?

nevcairiel
28th October 2015, 11:10
I just build software, I don't really want to give hardware advice. You can calculate the bandwidth requirements yourself quite easily. 4k 10-bit is 3840x2160x3 (10-bit uses 24-bit for every 4:2:0 pixel, or 3 byte) bytes for every frame.
BT.2020 does not change anything on the memory requirements.

Personally I would never use something antiquated like PCIe 2.0, but thats just me. A system which still has PCIe 2.0 is way old as it is, and leaves no room to grow.

aufkrawall
28th October 2015, 11:28
Those calculations seem tricky, as I can hardly say if in practice the bandwidth for the 2x copy would be needed at once or if the requirements would be lower since the frame is copied serialized.
So I think practice will have to show this next year with new GPUs (I doubt anyone will test it before).

I just can tell you that in games (which are usually most critical regarding PCIe) PCIe 2.0 is hardly limiting at all.
My 2500k@4.8Ghz gave me ~117fps minimum in an absolute CPU limit in Star Wars Battlefront beta, while frametimes were absolutely perfect and no texture streaming was visible.
There were also some comparisons of Digital Foundry with several Intel gens at the same clock and several games and the performance gain of Ivy Bridge over Sandy Bridge was mostly not existing (no advantages for frametimes either).

nevcairiel
28th October 2015, 11:38
Games are usually not that limited by PCIe bandwidth. Tests have shown that running your GPU in x8 mode (say when running two GPUs) practically costs no performance at all, and even going down to x4 will only be a very marginal change in FPS - in current gen at least.
If I were to build a 4K HTPC right now, I would certainly make sure not to use PCIe 2.0 just to be on the safe side. I prefer to build with headroom rather than save a few euros.

But with the sad situation 4K TVs are still in this year (BT.2020, whats that?), and the lack of content, I postponed all that to next year anyway!

aufkrawall
28th October 2015, 11:44
It's out of question to buy a PCIe 3.0 able platform if you buy now or in future, yes. However, with Sandy Bridge it's very unattractive to change the CPU/MB yet.
But nothing to do about it if bandwidth really wouldn't be sufficient.

I suppose nobody here as a Sandy Bridge + GTX 960 system?

clsid
28th October 2015, 15:41
4K 10bit 50fps plays fine here with copy-back and PCI-e 2.0 x16. Haven't got a 60fps 10bit sample. Theoretically PCI-e 1.0 x16 should even be able to handle it.

aufkrawall
28th October 2015, 18:43
Really good to know, thank you!

tekko
28th October 2015, 20:14
Please provide samples that don't work instead, that way they can be fixed instead of worrying about some fallback.

Sorry for the delay... I tried to cut a sample with different programs and even with dgsplit12 the sample plays.

I saw that u've switched back to the old asf demuxer and it still doesn't work with 0.66.0-32. It's something in between 0.65.0.25 and 0.65.0.26 for sure.

EDIT: forgot to say Thank you. :)

sneaker_ger
28th October 2015, 23:31
I saw that u've switched back to the old asf demuxer and it still doesn't work with 0.66.0-32.
That change is from today, you have to wait a few hours for the 0.66.0-33 nightly.

truexfan81
29th October 2015, 01:31
I just build software, I don't really want to give hardware advice. You can calculate the bandwidth requirements yourself quite easily. 4k 10-bit is 3840x2160x3 (10-bit uses 24-bit for every 4:2:0 pixel, or 3 byte) bytes for every frame.
BT.2020 does not change anything on the memory requirements.

Personally I would never use something antiquated like PCIe 2.0, but thats just me. A system which still has PCIe 2.0 is way old as it is, and leaves no room to grow.

imagine how i feel with this ancient thing that has PCIe 1.1 :D

and here i am running madvr on it with a GTX650

tekko
29th October 2015, 04:02
That change is from today, you have to wait a few hours for the 0.66.0-33 nightly.

My bad... 0.66.0-33 indeed works once again :)

Thanks nevcairiel

DragonQ
29th October 2015, 19:28
Personally I would never use something antiquated like PCIe 2.0, but thats just me. A system which still has PCIe 2.0 is way old as it is, and leaves no room to grow.

Pah, I'll stick with my X58 platform thanks very much. 6 years down, 4 more to go?? :D

NTSky
30th October 2015, 14:20
How would a circular connection make sense, you would never get any data out of the graph at the end, it would just roam in circles.
There is even an error code for this, namely VFW_E_CIRCULAR_GRAPH, which would suggest circular graphs are not all what you are making them out to be.

Tracking circular connections in those functions would be somewhat complex since they are recursive, so for now I'll just call it unsupported.

We have one pipeline that ends with renderer and another one with circle connection. Such graph is created by DirectShow Editing Services, which creates BigSwitch filter with circle connections inside, and I have no possibilities to change it. That is why it is possible and works fine with other decoders.

ajp_anton
1st November 2015, 16:53
10-bit uses 24-bit for every 4:2:0 pixelNot 15 bits/pixel? 10 * (1 + 1/4 + 1/4)

nevcairiel
1st November 2015, 16:54
Not 15 bits/pixel? 10 * (1 + 1/4 + 1/4)

Its always stored as 16-bit per component in memory for easier addressing on a byte-level.