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

SeeMoreDigital
6th September 2011, 21:28
Not possible (¿yet?).
I must admit I'm really impressed by the simplicity of the LAV Filter decoder suite.

I will look forward to them being made available for use with VirtualDub ;)

nevcairiel
6th September 2011, 21:34
I have no idea how VirtualDub works. If it can use DirectShow filters, it can surely already use them. But something tells me its limited to VfW, i don't see that happening anytime soon.

Superb
6th September 2011, 21:36
I have a newbie question.

Is it possible to configure the LAV filters to open up video files in VirtualDub?You might be able to use it via... hmm.. Avisynth script w/ DirectShowSource()...

pirlouy
6th September 2011, 22:39
Hi,

Since the YUC/RGB converters are much more optimized in the new version, I'd like to ask whether LAV video decoder is good enough to replace FFDShow?
Thanks!
Yes, for decoding part, it's better. And it's still developed...

Sven75
6th September 2011, 22:51
There is quite a number of free input plugins which allow to open files in VirtualDub without having to rely on vfw. Among others there is a DirectShow input plugin as well as an ffmpeg-based one. They can easliy be found in VD's forum.

On a side note: I strongly recommend having a look a the (programming related) blog posts on the VirtualDub website. These could even be of interest to Nev and Madshi, because (as far as I can tell) they are extremly profound and often very impressive - evidence of great programming knowledge.

roytam1
7th September 2011, 01:08
I have no idea how VirtualDub works. If it can use DirectShow filters, it can surely already use them. But something tells me its limited to VfW, i don't see that happening anytime soon.

Get a DirectShow VDF plugin:
http://forums.virtualdub.org/index.php?act=ST&f=7&t=15093

Midzuki
7th September 2011, 01:15
Proper VfW ( and ACM too, ¿why not? :devil: ) support for LAV Video and LAV Audio would require a VfW/ACM "wrapper", so to speak. ffdshow has its ff_vfw.dll, so the LAV decoders, ideally, would use a lav-vfw.dll and a lav-acm.dll ;)

Superb
7th September 2011, 02:30
Heh, if anything, he should add a Media Foundation interface. Not VfW. :P

Inspector.Gadget
7th September 2011, 03:53
VfW ... [ideal]

Don't ever use these two words in the same sentence :p

ryrynz
7th September 2011, 07:57
Is Avisynth limited to using the ffdshow raw video filter when used in conjunction with with Lav Video?

somy
7th September 2011, 08:18
Yes, for decoding part, it's better. And it's still developed...

Thanks for the reply.
I noticed in the previous version VC1 decoding is disabled by default, do you know the reason behind it? Is VC1 decoding working fine in the new version 0.34?
:confused:

hoborg
7th September 2011, 08:24
Thanks for the reply.
I noticed in the previous version VC1 decoding is disabled by default, do you know the reason behind it? Is VC1 decoding working fine in the new version 0.34?
:confused:

Interlaced VC-1 is not supported at all.

somy
7th September 2011, 08:32
Hi Hoborg,

Thanks for the reply both here and at MePo :-)
I'm still confused, is it by purpose not to support VC-1 interlaced decoding or it is due to some de-interlacing limitations I'm not aware of?
To my knowledge, FFDShow supports interlaced material. It can send "interlaced" flag to HW for hardware de-interlacing......

hoborg
7th September 2011, 08:38
Hi Hoborg,

Thanks for the reply both here and at MePo :-)
I'm still confused, is it by purpose not to support VC-1 interlaced decoding or it is due to some de-interlacing limitations I'm not aware of?
To my knowledge, FFDShow supports interlaced material. It can send "interlaced" flag to HW for hardware de-interlacing......

That is limitation of FFMpeg. All decoders/players based on FFMpeg will fail to play interlaced VC-1 (like VLC).
FFDshow can use MS decoder to decode interlaced VC-1.

Midzuki
7th September 2011, 08:44
Heh, if anything, he should add a Media Foundation interface. Not VfW. :P

Don't ever use these two words in the same sentence :p

The problem is, except for Windows Media Player/Center and a couple of Microsoft fanboys, "nobody" cares about writing DMO decoders, nor about developing Media Foundation codecs.

nevcairiel
7th September 2011, 08:46
I care more about Media Foundation then about VfW. I will probably never implement a VfW or ACM interface, i just have absolutely zero need for it.

somy
7th September 2011, 08:51
That is limitation of FFMpeg. All decoders/players based on FFMpeg will fail to play interlaced VC-1 (like VLC).
FFDshow can use MS decoder to decode interlaced VC-1.

OK, thanks! Does MePo use MS decoder comes with Windows for VC-1 videos? I just checked the codec conf panel, and there is no place to specify VC-1 decoder in MePo......

nevcairiel
7th September 2011, 09:00
I would have done so if GraphStudio doesn't crash when I tried to do benchmarking 10-bit clips with LAV Video. timecodec also cannot be used because of the same problem.

It happened with all 10-bit clips I have, whether the ones I made myself or the ones 'made by others'.

I think i figured out why its crashing. I'll see about fixing this.

Edit: And its fixed.

SeeMoreDigital
7th September 2011, 09:08
Thanks for the feedback guys... I will try the latest version of phaeron's "DShowInputDriver.vdplugin" and report back!

I like the sound of Midzuki's "lav-vfw.dll and lav-acm.dll" suggestion :)


EDIT: Playback of AVClossless appears to be working well. Nice one.

ranpha
7th September 2011, 09:40
I think i figured out why its crashing. I'll see about fixing this.

Edit: And its fixed.
The changes isn't in the git repo yet, it seems.

nevcairiel
7th September 2011, 09:42
The changes isn't in the git repo yet, it seems.

No, i'm at work and cannot push to the repo from here (reading works, go figure, stupid proxy).

This is the patch, if you want:
http://pastebin.com/yaiz68vs

ranpha
7th September 2011, 10:27
Comparison:-

Clip 1. (http://www.filesonic.com/file/1516565581/hotd-op-1080p-hi10p.mkv)

5-run benchmark in GraphStudio. First run result was removed, the average of the last 4 runs are listed below.

LAV Video - 96.6850fps
CoreAVC 3 - 85.9580fps

Clip 2. (http://www.filesonic.com/file/1899543981/potc_worldsend_blooper_reel.mkv)

LAV Video - 110.0368fps
CoreAVC 3 - 102.1178fps

Clip 3. (http://www.mediafire.com/?ifm12qy91pfyh68)

LAV Video - 112.8812fps
CoreAVC 3 - 102.2661fps

AMD Athlon II X4 640 - 8GB RAM.

nevcairiel
7th September 2011, 10:28
This is with native P010 output on both?

If so, sweet, i'm faster. :p

ranpha
7th September 2011, 10:31
This is with native P010 output on both?

If so, sweet, i'm faster. :p

I have P010 outputs enabled in both decoders. Not sure though if the decoders output it.

nevcairiel
7th September 2011, 10:32
If its enabled, LAV Video at least will, because its the best format for the video.
I haven't seen CoreAVC 3, but if its anything like 2.x, you need to move the P010 format on the top of the list.

ranpha
7th September 2011, 10:41
Just checked it, CoreAVC did output P010 in the pin to the 'Time Measure Filter'. Same for LAV Video.

nevcairiel
7th September 2011, 10:41
Great, thanks!

ranpha
7th September 2011, 10:53
I have one bad news for you though. When it comes to playing certain 8-bit H.264 videos, CoreAVC 3 software mode is way faster than LAV Video. With this clip (http://www.filesonic.com/file/1554044764/Decay_Clannad_After_Story_NCOP_Toki_wo_Kizamu_Uta_1080p_H264_DTS-HD_MA_FLAC.mkv), CoreAVC is nearly 30fps faster than LAV Video. I think this really hold true for DXVA-compliant files.

CruNcher
7th September 2011, 10:54
This is with native P010 output on both?

If so, sweet, i'm faster. :p

I would be carefull with those measurements @ least CoreAVC 2.6 had a big problem with Lav Splitter in terms of reaching Maximum Performance something seems wrong in how they interact with each other on full Performance with certain *.mkv (it seems to throttle itself multithreading wise to just ~60% of its actual performance capabilities). Not sure if that is still the case for 3.0 also.

nevcairiel
7th September 2011, 10:56
I would be carefull with those measurements @ least CoreAVC 2.6 had a big problem with Lav Splitter in terms of reaching Maximum Performance something seems wrong in how they interact with each other on full Performance with certain *.mkv it seems. Not sure if that is still the case for 3.0 also.

Thats their problem, not mine. :)
Especially with MKV thats unlikely, though. H264 in MKV is output untouched, there is not one single line of code that processes the bitstream in the splitter.

I have one bad news for you though. When it comes to playing certain 8-bit H.264 videos, CoreAVC 3 software mode is way faster than LAV Video. With this clip (http://www.filesonic.com/file/1554044764/Decay_Clannad_After_Story_NCOP_Toki_wo_Kizamu_Uta_1080p_H264_DTS-HD_MA_FLAC.mkv), CoreAVC is nearly 30fps faster than LAV Video. I think this really hold true for DXVA-compliant files.

For 8-bit, there isn't really much i can influence. The ffmpeg decoders output is basically straight copied onto the YV12 output sample, nothing fancy required. So the speed is defined by ffmpeg.
P010 output is a bit different, and a properly optimized algorithm to interleave the bytes can improve performance.

Besides, a high bitrate 1080p 8-bit movie decodes at around ~250 fps for me, what difference do 30 more or less make. :D
Even a pretty old dual core can probably decode 1080p Blu-ray material these days. 10bit requires quite some extra processing, and there is a level of PCs thats still present in alot of peoples homes where this difference might be vital.

Portioli
7th September 2011, 11:11
i am sorry if this is a newbie question,
but where we can find files 4:2:0 more than 8bit?
all my bd`s are 4:2:0 8bit

CruNcher
7th September 2011, 11:15
Ok that would mean my measurements where right i doubt that not 100 fps more bad no way ;) (knowing lav splitter had performance and lock issues in the past) though i need to get MPC-HC matroska and and Halli splitter to confirm though it would mean if those measurements are true that they where really bad (2.6) compared to Lav Video and DiAVC on the 4 Girls sample i somehow highly doubt that but i try to confirm.

nevcairiel
7th September 2011, 11:18
I have CoreAVC 2.6, and i can run those tests myself (but i'm not really interested in buying 3.0). Not sure what the speed difference between 2.6.1 and 3.0 would be on 8-bit decoding.

Portioli
7th September 2011, 11:18
could you post me a sample of Y416,plz?

nevcairiel
7th September 2011, 11:20
i am sorry if this is a newbie question,
but where we can find files 4:2:0 more than 8bit?
all my bd`s are 4:2:0 8bit

Blu-rays are only allowed to be 4:2:0 8-bit. The only 10-bit material you can find are some sample files on the web, and some encodes by people trying out the new toys. Its really not "mainstream" yet.

You'll find some H264 9bit and 10bit samples, but anything higher is not existant.

Sven75
7th September 2011, 11:21
While doing my regular PowerPoint checkup with the new release, I came across an issue (not PPT related this time), which is rather general problem:

I have an MPEG2 clip, which has a supposed length of 26 minutes (in the header, I assume), but the actual real length that can be played back is only 19 seconds. So, most probably, around 25 minutes of data somehow got lost - as it surely often happens when, e. g. downloads are suddenly interrupted.

Now, LAVSplitter still assumes 26 minutes of file length and therefore any player's timeline will allow for 26 minutes of seeking, which - naturally - fails. Wouldn't it be possible (and better) to determine the actual number of frames available - or is there any good reason to handle it the way it is?

For comparison only, the Elecard splitter only shows a length of 19 seconds - which on first thought seems preferrable to me.

Portioli
7th September 2011, 11:26
Thank you nev!
Continue the great job.
One more question, I read it before a couple of pages.
Are you really going to include yadif in lav video?

Sven75
7th September 2011, 11:41
Just found another issue with SVQ3 movs - this time only happening with the PowerPoint 2010 render path.

When using LAV Video Decoder with YV12 there seem to be like chroma shifts. If I put ffdShow for raw handling behind LAV it gets even worse and the image becomes totally distorted.

If I only use ffdShow for SVQ3 with YV12 colorspace or if I only use LAV VD and deactivate YV12 everything is perfectly fine.

I tested to different files and I can upload a sample (or if you still have my samples around somewhere, it's among those) or just upload a screenshot.

CruNcher
7th September 2011, 11:49
@nev
you right i confirmed with all 3 splitter the results wow hard to believe that even Arcsoft beat(s) them @ least in full Performance (Software) but Playback utilization looks different

nevcairiel
7th September 2011, 12:11
Now, LAVSplitter still assumes 26 minutes of file length and therefore any player's timeline will allow for 26 minutes of seeking, which - naturally - fails. Wouldn't it be possible (and better) to determine the actual number of frames available - or is there any good reason to handle it the way it is?

As far as i am aware, MPEG containers (both PS and TS) don't have a duration in the header.
To determine the duration, the code will check the first timestamp in the file, and the last, and calculate the duration from that.

This is not always reliable, and as a fallback, it'll use the files size to determine a duration based on bitrate. Does the file actually have the full size, and just has alot of zeros at the end, or is it totally cut off at the end?

When using LAV Video Decoder with YV12 there seem to be like chroma shifts. If I put ffdShow for raw handling behind LAV it gets even worse and the image becomes totally distorted.

I should still have your sample, however if the decoders output is YUV 4:2:0, then thats send untouched to the renderer, there really isn't much that can go wrong (short of some stride misunderstandings, but that wouldn't be limited to SVQ3). I can test later.

A screenshot would be good.


Are you really going to include yadif in lav video?

I will, but there is no timeframe for that yet.

Sven75
7th September 2011, 13:03
File size of the MPEG2 (Program Stream, btw) is around 15 MB containing 493 frames (25 fps), while bitrate is around 6000 kbps. So there really is not much space for zeros and I did not find anything unusual while looking into the file... I will just upload it, so you can have a look at it later.

Edit: Just noticed that it is not showing 26 minutes, but 26 hours 30 minutes - so there is surely something wrong when determining the duration and the reason cannot be that the file is simply incomplete.

MPEG2 file:
5_MPEG2.mpg (http://www.mediafire.com/?spf08sp9c2siin1)

SVQ3 Screenshots:
LAV only YV12 enabled.png (http://www.mediafire.com/imageview.php?quickkey=be4yb280pxcw8kv)
LAV YV12 enabled +ffdShow YV12 enabled.png (http://www.mediafire.com/imageview.php?quickkey=6ha42l87vhtvbnd)
LAV only YV12 disabled - working.png (http://www.mediafire.com/imageview.php?quickkey=aia7pgetdcxq5q7)

Sven75
7th September 2011, 13:53
One more:

Playback of videos in PowerPoint 2003 is not working at all with LAV Video Decoder, if LAV VD is last in the playback chain. PowerPoint will simply freeze and not recover. If ffdShow is inserted to take care of raw video, everything is working pretty good. Also, other DirectShow filters are usually working just fine.

Here PowerPoint 2003 is configured to use mciqtz32.dll as a wrapper to DirectShow.

I understand if you don't care about mci, but maybe there really is something wrong which should better be corrected.

I uploaded a stack trace (http://www.mediafire.com/?sx71wj9w1p1mppu) of the frozen App which (at least sometimes) shows LAVSplitter.ax!OpenConfiguration+0x86e7 being called. Seems odd to me and maybe you can deduce something from it.

nevcairiel
7th September 2011, 14:03
I uploaded a stack trace (http://www.mediafire.com/?sx71wj9w1p1mppu) of the frozen App which (at least sometimes) shows LAVSplitter.ax!OpenConfiguration+0x86e7 being called. Seems odd to me and maybe you can deduce something from it.

Why the hell would it call OpenConfiguration, thats the function to show the config UI. How would it even know about that method?

Sven75
7th September 2011, 14:07
That is exactly what I thought ;-)

I don't know, but see the stack trace from Process Explorer...

The stack will not remain static though. There is still a lot going on, but every now and then it looks like this.

CruNcher
7th September 2011, 15:11
@nev
Could you confirm this crash with Lav Splitter 0.33/34 and DiAVC 64 1.2 Free http://forum.doom9.org/showthread.php?p=1524464#post1524464 it would make me sleep much better ;)


Also here is :)

http://img27.imageshack.us/img27/3149/diavcworldsfastest.png

The Worlds fastest (Intel Multithreaded) H.264 8 Bit (Windows 64 bit) Software Decoder (batteries not included ;) )

Power Consumption (Full Performance Decoding):

CoreAVC 3.0 64 = ~42W
Lav Video 0.34 64 = ~48W
DiAVC 1.2 64 = ~50W

Power Consumption (Playback 60 FPS):

CoreAVC 3.0 64 = ~15
Lav Video 0.34 64 = ~14W
DiAVC 1.2 64 = ~12W

JarrettH
7th September 2011, 16:25
I'm going to ask a really dumb question that I bet a lot of people are wondering!!!

Why does a decoder performance of 100, 200, or 300 FPS matter when you're only decoding video at 24, 25, or 30 FPS?

:p:thanks:

nevcairiel
7th September 2011, 16:26
I'm going to ask a really dumb question that I bet a lot of people are wondering!!!

Why does a decoder performance of 100, 200, or 300 FPS matter when you're only decoding video at 24, or 25, 30 FPS?

:p:thanks:

The faster it is, the less cpu power it uses when its running at its normal FPS.

nevcairiel
7th September 2011, 16:38
SVQ3 Screenshots:
LAV only YV12 enabled.png (http://www.mediafire.com/imageview.php?quickkey=be4yb280pxcw8kv)
LAV YV12 enabled +ffdShow YV12 enabled.png (http://www.mediafire.com/imageview.php?quickkey=6ha42l87vhtvbnd)
LAV only YV12 disabled - working.png (http://www.mediafire.com/imageview.php?quickkey=aia7pgetdcxq5q7)

I tried in Power Point 2007 (the version i have installed), and it plays fine.

I need some way to reproduce it without power point 2010, otherwise its unlikely i'll find a solution.

Sven75
7th September 2011, 16:45
Rendering is completely different in 2010 compared to 2003 and 2007. Also, without some changes, 2003 and 2007 will only use vfw codecs via mci and won't use the directshow wrapper for mci.

You could use the free PowerPoint Viewer 2010... It should show the same symptoms as the real 2010.

I could then just upload a presentation which already has a link to the file... Maybe you could then have a look at issue 40, too.

If you are interested, I can also provide you with a full Office/PowerPoint 2010 version. As a thank you for your great work ;-)

nevcairiel
7th September 2011, 16:46
I can probably create a file in 2007 and try to play it in the 2010 viewer...?

Edit: wtf, installing the 2010 viewer broke playback in my 2007.