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

madshi
24th August 2011, 13:39
While i have your attention, just to confirm my logic is alright.
Looking at the MPEG Chroma position, for the 4:2:0 -> 4:2:2 conversion i would use a simple 75:25 interpolation. For the second step, the 4:2:2 -> 4:4:4, i would just use a 50:50 interpolation. Its not really a very fancy algorithm, but its similar to what ffdshow uses, and the quality seems alright. Or am i missing something?
Hmmmm... I've never upscaled chroma like that, so I'm not 100% sure right now. But I guess it's ok that way.

Technically, yes. Although some renderers (Haali) only accept YUY2 (or RGB) input, so at least the 4:2:0->4:2:2 upsampling would be used there as well, but still limited to 8-bit.
Any conversions are really only for renderes or post-processing filters that don't know any better - and those will probably never understand 10bit.
Yeah, you're probably right.

Technically, one could use D3DFMT_A2R10G10B10 as a FourCC
True! Forgot about that...

Superb
24th August 2011, 13:43
Two genius guys talking. I feel like I'm watching The Big Bang Theory. Bazinga!

nevcairiel
24th August 2011, 13:54
Hmmmm... I've never upscaled chroma like that, so I'm not 100% sure right now. But I guess it's ok that way.

Well i suppose this might not be the absolute perfect quality, some complicated cubic interpolation might yield better results, but this will be fast, and people never complained about ffdshows interpolator (it actually uses 75:25 for the horizontal expansion as well, which seems quite odd to me, and would result in a chroma phase shift - assuming MPEG-2 siting - maybe ffdshow was designed against MPEG-1 chroma?)

Two genius guys talking. I feel like I'm watching The Big Bang Theory. Bazinga!

I hope that show is returning soon. :)

Mercury_22
24th August 2011, 16:12
@ Nev any chance that after you finish with this optimizations you'll take a look at DXVA ?
Cause since people have started to compare energy consumption and cpu / gpu utilization I've got curious and I've made a quick comparison (http://imageshack.us/g/51/x86evrcpmpc.png/) between LAVVideo - MPC-HC's internal - Microsoft DTV-DVD H264 decoders (on a 720p, 3285 Kbps /ac3 mkv file) using "GPU Observer – Sidebar Gadget" & "Intel Core Series – Sidebar Gadget" (http://blog.orbmu2k.de/) and the results (although not so accurate) speak for themselves
x86 EVR CPU GPU CPU % GPU % CPU Mhz GPU Mhz x86 EVR-CP CPU GPU CPU % GPU % CPU Mhz GPU Mhz
M_DTV-DVD 40.734 112.5 3 15 1357.8 750 M_DTV-DVD 95.9874 187.5 6 25 1599.79 750
MPC-HC 82.318 97.5 5 13 1646.36 750 MPC-HC 82.119 202.5 5 27 1642.38 750
LAV 272.1285 36 15 12 1814.19 300 LAV 320.8368 172.5 16 23 2005.23 750

x64 EVR CPU GPU CPU % GPU % CPU Mhz GPU Mhz x64 EVR -CP CPU GPU CPU % GPU % CPU Mhz GPU Mhz
M_DTV-DVD 41.4897 112.5 3 15 1382.99 750 M_DTV-DVD 106.209 202.5 6 27 1770.15 750
MPC-HC 42.1959 105 3 14 1406.53 750 MPC-HC 94.7352 202.5 6 27 1578.92 750
LAV 148.9959 46.2 9 28 1655.51 165 LAV 321.4125 195 15 26 2142.75 750

I've used MPC-HC 1.5.3.3697 x86 & x64 @ defaults + LAVAudio + LAVSplitter & EVR (and another test with EVR-CP + 10-bit in & out + FFPP)
Before starting the test(s) I've restarted my system and disabled Superfetch also no other service or program have been started / closed during test

So any thoughts :) ?

nevcairiel
24th August 2011, 16:33
The GPU hardware decoder does not show up in the GPU usage %, so the test is really pointless.
Of course will the software decoder use more CPU then the DXVA decoders. And what was this supposed to show now?

In the normal EVR case with LAV Video, the GPU even went into a lower power state, probably saving more energy then DXVA would. :)

Anyway, there are alot of DXVA decoders around, and since the decoding is done on the GPU, there really wouldn't be any performance or quality difference, so ... just use those decoders?

Something to consider:
Intels next generation (Ivy Bridge) will actually reduce power consumption quite significantly, while increase performance at the same time (Tri-Gate Transistors). So just maybe, those CPUs will actually be far more efficient then a big GPU? :D

madshi
24th August 2011, 17:24
Well i suppose this might not be the absolute perfect quality, some complicated cubic interpolation might yield better results, but this will be fast, and people never complained about ffdshows interpolator (it actually uses 75:25 for the horizontal expansion as well, which seems quite odd to me, and would result in a chroma phase shift - assuming MPEG-2 siting - maybe ffdshow was designed against MPEG-1 chroma?)
I think the 75:25 and 50:50 interpolation should be similar to bilinear interpolation, which should have a good quality/speed tradeoff for chroma upsampling. However, I agree with you that using 75:25 in both directions is not correct. Is should be 75:25, 25:75, 75:25, 25:75 in one direction and 100, 50:50, 100, 50:50 in the other direction.

One alternative would be a tent filter, using weights of 1, 2, 3, 4, 3, 2, 1 for neighboring pixels. The weights sum up to 16, so it should perform well, too, but of course it'd be noticeably slower than bilinear upsampling because you need to average many more values together.

Mercury_22
24th August 2011, 17:40
The GPU hardware decoder does not show up in the GPU usage %, so the test is really pointless...
Ups I didn't know that :confused: then what does GPU usage % show ? GPU - UVD - AVP ?

pirlouy
24th August 2011, 17:50
@pirlouy, I'm not really sure what you're trying to say. We've given you 2 good reason why we think the MS VC-1 decoder is the better default decoder: (1) Speed. (2) Interlaced decoding capability. So you're personally not interesting in either of these advantages. Ok, but what is your point? You want us to use the ffmpeg VC-1 decoder as default, although it's slower and less capable? That doesn't make any sense.
My point has always been to understand why you prefer MS decoder.
I'm sure you understand things better than me and of course I don't criticize your choice. But you said MS decoder uses less CPU, which is not what I've noticed in my case.
And yes, like ffmpeg works well in a lot of things (splitter, decoders), I prefer to rely on it, especially if the only difference (for me) is the support of interlaced files. I also like the fact it's an active project. It's the same kind of reasoning I do when using LAV splitter instead of Haali Splitter for example.

But it's ok, I've understood your points. :)

nevcairiel
24th August 2011, 17:54
Ups I didn't know that :confused: then what does GPU usage % show ? GPU - UVD - AVP ?

Just raw 3D GPU usage. On AMD, you cannot really view the usage of the decoder. On NVIDIA, GPU-Z shows the video decoder usage.

madshi
24th August 2011, 18:01
you said MS decoder uses less CPU, which is not what I've noticed in my case.
On my PC the MS decoder is significantly faster than ffmpeg. I can't get Blu-Rays to play smoothly with ffmpeg on my (rather old/slow) PC, while the MS decoder plays most Blu-Rays just fine for me.

6233638
24th August 2011, 19:39
On my PC the MS decoder is significantly faster than ffmpeg. I can't get Blu-Rays to play smoothly with ffmpeg on my (rather old/slow) PC, while the MS decoder plays most Blu-Rays just fine for me.The MS Video decoder always benchmarked quicker for me, but I was never able to actually get smooth playback of VC-1 Blu-rays using it. This has probably changed with newer iterations of MadVR and the introduction of the LAV Filters/Splitter since, however.

madshi
24th August 2011, 19:43
It might have to do with which splitter you're using. The internal MPC-HC splitter is known to make problems with VC-1 m2ts streams, when used with the MS VC-1 decoder.

nevcairiel
24th August 2011, 19:45
The MS Video decoder always benchmarked quicker for me, but I was never able to actually get smooth playback of VC-1 Blu-rays using it. This has probably changed with newer iterations of MadVR and the introduction of the LAV Filters/Splitter since, however.

The MPC-HC MPEG Splitter does not provide timestamps that work smoothly with the MS decoder. Heck, it doesn't even work properly with MPC-HCs own VC-1 decoder. :D

LAV Splitter (and Haali as well, i think) should work smoothly with the MS decoder - but most people using MPC-HC have traditionally always used the internal splitter for TS, and Haali only for MKV (granted, Haalis support for anything but MKV isn't that great)

STaRGaZeR
24th August 2011, 21:02
I think the 75:25 and 50:50 interpolation should be similar to bilinear interpolation

Isn't that the exact definition of bilinear interpolation applied to the MPEG-2 grid?

nevcairiel
24th August 2011, 21:32
It is, just vastly simplified because of the fixed factors.

nlnl
25th August 2011, 10:45
nevcairiel
What container would you recommend for DVD ripping? mkv, ts, vob ?
What your LAV family LAVes best of all :)?

nevcairiel
25th August 2011, 10:53
I would just put it in MKV, just because its easier then the others.

mzso
25th August 2011, 10:55
Hi!
It seems that LAV splitter doesn't work with Total Commander's lister for some reason. It caused TC to hang with max cpu usage. Well I guess so because it stopped happening after I unticked mp3 in the splitter.
By the way I remember people mentioning viewing/setting the priority of filters, what's a proper tool for that?

jmone
25th August 2011, 10:59
I'm home alone tomorrow for most of the day and I own Heroes season 1 on HD DVD so I can mess with it myself and see what I can come up with.

Hey - did you get a chance to have a look?
Thanks
Nathan

Andy o
25th August 2011, 11:07
In the normal EVR case with LAV Video, the GPU even went into a lower power state, probably saving more energy then DXVA would. :)

I think this largely depends on the card's energy savings capabilities (like PowerPlay and such). With my 5770, the consumption at the wall for my PC drops measurably from full (850/1200 MHz) to UVD (400/900), which DXVA locks the card into. From UVD to idle state (175/300 IIRC) it doesn't drop that much. Using madVR for example kicks the card into full speed. It's my experience that CPU usage doesn't affect power consumption as much as GPU. I got a Penryn C2Q 9450 running at standard speed (2.66).

nevcairiel
25th August 2011, 11:27
A high-end CPU has a TDP of 95w (i7 2600K), a high-end GPU has a TDP of beyond 250 W, and the average HTPC GPU has more then the 95w as well (Your 5770 is at around ~108W, the GTS 450 i use is at ~106W)

A rule to saving power is probably to simply not over-size the components. A high-end GPU will use more power in its full speed mode then a HTPC GPU.
Plus, CPUs get faster as well, pretty soon they can decode video without going into max performance mode, and gain efficiency with that.

Anyhow, if you care about power usage that much, there are plenty of screws to turn.
One thing is for sure, though. Buying new components just to save power doesn't pay, the time to get into a positive balance is just too long. ;)

SamuriHL
25th August 2011, 12:59
Hey - did you get a chance to have a look?
Thanks
Nathan

Sorry I didn't. I've been away from home all week for work. I'm heading back home later today so I'll see if I can look at it tomorrow.

STaRGaZeR
25th August 2011, 14:19
A high-end CPU has a TDP of 95w (i7 2600K), a high-end GPU has a TDP of beyond 250 W, and the average HTPC GPU has more then the 95w as well (Your 5770 is at around ~108W, the GTS 450 i use is at ~106W)

Keep in mind that TDP is not max or typical power consumption. Plus, different vendors define TDP in different ways.

mzso
25th August 2011, 15:02
Hi!
It seems that LAV splitter doesn't work with Total Commander's lister for some reason. It caused TC to hang with max cpu usage. Well I guess so because it stopped happening after I unticked mp3 in the splitter.
By the way I remember people mentioning viewing/setting the priority of filters, what's a proper tool for that?

No-one else experienced this? What was the problem then if not LAV?

Andy o
25th August 2011, 16:15
Nev, does LAV video apply decimation or IVTC automatically for repeated frames? I have some 24p content encoded on 30p. When using LAV video, ReClock reports 29.97 for a few seconds, then switches to 23.976 and it looks smooth running the display at 24p. When using madVR, ReClock reports 29.97 only.

nevcairiel
25th August 2011, 16:22
I don't think it does that, unless its hidden somewhere in ffmpeg itself.. but do you have a sample of such a file? :)

Andy o
25th August 2011, 16:43
It's happening with ffdshow too. Before I upload a sample (it's some old anime) I'm gonna do some more testing so nobody wastes their time. The avisynth script that I usually use for decimation mucks up this file. I suspect it's really 23.976 but somehow it's telling the decoder and mediainfo that it's 29.97. Regardless of decoder being used, simply if I run my display at 24 it plays smoothly, while running it at 60 it looks like 2-3 pulldown (doesn't look like a 1-1-1-2 pattern like most 24p content encoded in 30p show).

What confuses me is that ReClock can detect 23.976 with LAV and ffdshow, but not with madVR. I'm not sure how ReClock fits into the picture when using madVR's decoders though, for example if it can apply media correction without problem.

nevcairiel
25th August 2011, 16:45
ReClock and madVR for decoding are somewhat limited, i wouldn't suggest that combination. There are some known glitches with detection of the frame rate (usually with not detecting it at all, detecting the wrong one sounds new. :P)

Andy o
25th August 2011, 17:25
I'm thinking it might be a variable frame rate thing. I've tried remuxing and specifying manually the rate, but I'm getting unsynced audio. Definitely close to 23 or 24 rather than 29/30 though. Anyway, not your problem I guess :)

benus
25th August 2011, 18:43
Hi Nevcairiel

May I just ask you whether there is any possibility to output ac3 from aac on the fly usind LAV Audio Decoder.
There is countless amount of files on the internet with aac audio track, and even more people willing to use their HDMI or SPDIF output to stream it to the receiver.
I appreciate all your hard work.
Take care.

pirlouy
25th August 2011, 19:10
For HDMI or stereo files, it's useless.
But I think a matrix mixer is the first step before to think about converting to another format.
I'd advise to use ffdshow post-processing filter (but it does not work with MPC for the moment in my case)

DrivenByDemons
25th August 2011, 22:01
Just installed this filter package and have a few MKV's that the video seems to play way too fast on. Audio sounds fine but obviously loses sync very quickly. I tried troubleshooting and narrowed it down to the splitter. I removed the entire package and installed Haali's and everything played fine. Then tried installing only LAV audio and video without the splitter and it still worked fine. I did a quick search of this thread (so not to waste anyones time on something that's already been reported) and saw a few references about sync but nothing specific. Any thoughts or suggestions?

Carpo
25th August 2011, 23:48
would an nvidia 560 or 570 be better to use, i am considering upgrading my pc and want to get the best video card I can to aid in the video decoding

Andy o
25th August 2011, 23:57
If you want multichannel HDMI, there's no contest. The 570 doesn't have it (560 does).

rd1979
26th August 2011, 00:12
If you want multichannel HDMI, there's no contest. The 570 doesn't have it (560 does).

What? Why not? And what of the 580, and the 560 Ti?

6233638
26th August 2011, 01:38
would an nvidia 560 or 570 be better to use, i am considering upgrading my pc and want to get the best video card I can to aid in the video decodingIt's complete overkill for video decoding, but it works great with LAV CUVID and madVR (a video card won't do anything for LAV Decoder) if you want the card for something else like gaming.

If you want multichannel HDMI, there's no contest. The 570 doesn't have it (560 does).I don't know about the 560, but the 570 uses a mini HDMI connector rather than HDMI as standard. My card (and I assume others) came with a short (6" maybe) mini HDMI > HDMI cable.

nevcairiel
26th August 2011, 06:03
If you want multichannel HDMI, there's no contest. The 570 doesn't have it (560 does).

All recent NVIDIA cards have multichannel PCM over HDMI, but the 570 and 580 do not have HD bitstreaming.

nevcairiel
26th August 2011, 06:04
Just installed this filter package and have a few MKV's that the video seems to play way too fast on. Audio sounds fine but obviously loses sync very quickly. I tried troubleshooting and narrowed it down to the splitter. I removed the entire package and installed Haali's and everything played fine. Then tried installing only LAV audio and video without the splitter and it still worked fine. I did a quick search of this thread (so not to waste anyones time on something that's already been reported) and saw a few references about sync but nothing specific. Any thoughts or suggestions?

I haven't heard of this kind of problem with MKV files yet..
A sample file that shows this problem would be greatly appreciated, so it can be fixed.

Andy o
26th August 2011, 07:00
All recent NVIDIA cards have multichannel PCM over HDMI, but the 570 and 580 do not have HD bitstreaming.

Ah, right. Correction noted. WASAPI exclusive works OK too? I have had problems with it and a 9300 mobo and 9200m laptop, which have previous Nvidia multichannel HDMI devices.

Carpo
26th August 2011, 07:41
All recent NVIDIA cards have multichannel PCM over HDMI, but the 570 and 580 do not have HD bitstreaming.

And on that bombshell - its the 560 i'm going for :p

well this is the one I'm thinking of getting - GeForce GTX 560Ti OC 1024MB GDDR5

nevcairiel
26th August 2011, 08:01
If all you want is a HTPC, i would even go down to a 550, its still way too fast for a HTPC, but will save you money and possibly some energy.
The 560 would be better if you want some gaming performance as well.

Sadly the 500 series doesn't have a real HTPC GPU.

Carpo
26th August 2011, 08:03
560 will come with the system, I can't be bothered to build my system this time around, but i do have some games that would bring my old system and gfx card to its knees, so having the best of both worlds should be fine :) hoping on a core i7 2600K should improve my bluray/mkv playback too :)

nlnl
26th August 2011, 14:31
nevcairiel

Do you have any plans for DSD audio bitstreaming using HDMI (LAV audio + LAV splitter)?

Or this is theoretically impossible? Windows limits this bitstreaming?

nevcairiel
26th August 2011, 14:36
I don't have a soundcard nor a receiver that can either bitstream or receive DSD, and its probably not supported by any consumer HDMI PC device..

nlnl
26th August 2011, 14:56
I don't have a soundcard nor a receiver that can either bitstream or receive DSD, and its probably not supported by any consumer HDMI PC device..

HDMI 1.3 supports bitstreaming DSD and DST (compressed DSD) formats.
And for example my ONKYO 1007 reciever supports direct DSD decoding.

6233638
26th August 2011, 14:56
Ah, right. Correction noted. WASAPI exclusive works OK too? I have had problems with it and a 9300 mobo and 9200m laptop, which have previous Nvidia multichannel HDMI devices.Works fine. (my previous 9400 worked fine too - the 9300 is the same thing with lower clocks I believe?) What are your problems with it?

All recent NVIDIA cards have multichannel PCM over HDMI, but the 570 and 580 do not have HD bitstreaming.Ah I see. Considering that the majority of PCs cannot output stable/accurate 24/1.001 clocks, and you're better sending 24.000 from the PC using ReClock to handle the audio anyway (film is shot at 24fps, not 24/1.001) I'm not sure I see why anyone should care, other than to have a silly light turn on, on their receiver.

It doesn't seem to matter to the bitstreaming crowd, that TrueHD/DTSHDMA decoded to PCM is identical, they need that little light to tell them.

But people that are vocal about bitstreaming tend to be like those that insist on turning on all those picture-ruining features their new TV has because they paid for them, so why would they not use them?
hoping on a core i7 2600K should improve my bluray/mkv playback too :)
A 2600K is a complete waste of money in almost all use cases. A 2500K performs almost identically, with the exception of tasks which can actually take advantage of an additional four virtual cores. (almost nothing) In fact, many people find that 2500Ks will overclock higher than 2600Ks that have hyperthreading enabled. If you aren't overclocking, don't buy a K processor.

Honestly though, there is no need for a CPU/GPU combination that high performance for video playback, especially if you use CUVID to do the decoding. I was able to run old versions of madVR (before it got quick wit the addition of the full-screen exclusive mode) with the CPU doing the decoding on an old E5200/9400 system. With CUVID, I bet I could have done it with an even slower CPU.

The only thing other than video decoding that would require a fast CPU is upsampling audio with reclock, and that isn't so demanding with the new resampler. And if you insist on bitstreaming (a mistake in my opinion) you wouldn't be doing that anyway.

nevcairiel
26th August 2011, 14:59
HDMI 1.3 supports bitstreaming DSD and DST (compressed DSD) formats.
And for example my ONKYO 1007 reciever supports direct DSD decoding.

Sure, but what do you have in your PC to produce a HDMI signal? All the GPUs do not support it. Do you have some specialized HDMI sound card that does?

Even then, i don't know if Windows even supports it.
Anyway, i have no interest in supporting it.

robpdotcom
26th August 2011, 15:11
It doesn't seem to matter to the bitstreaming crowd, that TrueHD/DTSHDMA decoded to PCM is identical, they need that little light to tell them.
How about DTS (including DTS-HD MA) with a matrixed 6.1? Doesn't it contain a flag telling the decoder which sounds are supposed to be in the rear center? None of the software decoders play those back in 6.1, but an AVR will if you bitstream. You could use your receiver or maybe ffdshow to create the addition channel, but in that case, can you really say that decoding on the PC is the same as decoding on a receiver?

I've never seen any info that makes me think it's the same, so I want the option to bitstream those.

sneaker_ger
26th August 2011, 15:45
A 2600K is a complete waste of money in almost all use cases. A 2500K performs almost identically, with the exception of tasks which can actually take advantage of an additional four virtual cores. (almost nothing)

Leaving aside any bang for buck discussions, HT gains some 20% with x264 (http://forum.doom9.org/showthread.php?t=162103), which matters for many of the folks on this forum.

princewang
26th August 2011, 15:47
Is it a bug?

http://www.mediafire.com/i/?t5qj0hxvmz0na29