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

andyvt
21st August 2013, 09:45
For decoding, all H.264/AVC decoders are required to be bit-for-bit identical. Its encoding quality that suffers in hardware vs. software implementations (i.e. x264).

I tested this recently (http://www.missingremote.com/review/intel-quick-sync-examining-haswell-performance), and Haswell's QS results were better than x264 (via Handbrake).

nevcairiel
21st August 2013, 09:59
I ran into a dx50 video that plays fine with ffdshow/mplayer, but looks corrupted with LAV, here's a sample:
https://mega.co.nz/#!g0wHiSbR!N64PEETN6LDYkvsy1oEVMGWE-uZkxNhb4k5T1uLLsqw

Looks OK to me.
What exactly is wrong there?

Are you using CUVID mpeg4 decoding? If so, try turning that off?

NikosD
21st August 2013, 10:13
This may have been so 5-6 years ago when your CPU was new, but today the CPUs with software decoders are much faster than AMDs or NVIDIAs decoders (on H.264/MPEG2).

Nowadays and the last many years, if you see the figures a huge amount of CPUs sold are Intel's CPUs.
Most of them, even the chiper ones with the lowest performance, have the fastest HW decoder available which is QuickSync and most of the times that HW decoder is faster than the CPU that covers it.

So in other words, every SandyBridge or better CPU has a HW decoder, most of the times faster than the CPU.

There are cases that low frequency Ivy or Haswell CPUs cannot even decode in realtime 4K H.264 clips that QuickSync can do with ease.

Anyway I believe that using a very fast dedicated HW for playback of video, that is offered for free in every Intel CPU or AMD/Nvidia GPU sold the last many years, leaving CPU available for doing things that is more general purpose, is an efficient way of using a modern system.

For laptop users especially, that are tied with battery consumption, I think that HW decoding is almost one-way solution.

QBhd
21st August 2013, 10:28
I used to think that way too, but since I had my Phenom II 965 and now my current FX-8350, I just go Software decoding and let the CPU do the work. If I want to do an encode while watching TV, the modern CPU's don't even break a sweat and playback is flawless and smooth. The only downside to doing both at the same time, it takes slightly longer to finish the encode. All one needs to do is make sure you use an encoder that allows you to set the priority to low (meGUI is an example) and presto, no issues with playback while still consuming 100% of the CPU usage. And decoding an mkv remux of a BluRay barely uses 5% of my CPU.

QB

NikosD
21st August 2013, 10:40
I have lost contact with modern AMD processors, so can you tell me if you can play in realtime 4K H.264 clips ?

Try for example a tough one like 4K Ducks of 370Mbps clip.

Reino
21st August 2013, 12:09
As I'm still using an AMD Athlon XP 3200+ (yes, it's about time I'd upgrade :p) I'm trying to use DXVA as much as possible. Software decoding 1080p is a no go and 720p barely. High cpu loads! I'm also trying to recover a direct link for internet-streams as much as possible too (Youtube, uitzendinggemist.nl (Dutch tv broadcast), etc.), because flashplayers are too much of a burden on my cpu.
Although I hear everyone talking about performance, I'm much more interested in power consumption! Of course on my system that would be a hugh difference (cpu vs. gpu), but I can't imagine even a modern cpu would consume less power decoding a 1080p stream compared to a hardware implementation.


Nev, have you considered these, post1632484 & post1633682, requests?

STaRGaZeR
21st August 2013, 12:29
I tested this recently (http://www.missingremote.com/review/intel-quick-sync-examining-haswell-performance), and Haswell's QS results were better than x264 (via Handbrake).

You did the comparison using CQP? Seriously? ;)

andyvt
21st August 2013, 12:50
You did the comparison using CQP? Seriously? ;)

I plan to rerun the tests when Intel publishes the driver that supports look ahead. If you'd like to see another method included, LMK.

STaRGaZeR
21st August 2013, 15:53
I plan to rerun the tests when Intel publishes the driver that supports look ahead. If you'd like to see another method included, LMK.

You don't need lookahead to test other real life ratecontrol algorithms. Also I'm not sure if you know about --ipratio and --pbratio in x264, but with default settings --qp is not really constant quantizer across all frames. Plus no speed tests, different presets for both QS and x264...

All in all is an apples to oranges, useless comparison against x264. That review is only useful to show how Haswell and Ivy's QS fare against each other.

andyvt
21st August 2013, 16:07
You don't need lookahead to test 2-pass, or any other real life ratecontrol algorithm. Also I'm not sure if you know about --ipratio and --pbratio in x264, but with default settings --qp is not really constant quantizer across all frames. Plus no speed tests, different presets for both QS and x264...

All in all is an apples to oranges, useless comparison against x264. That review is only useful to show how Haswell and Ivy's QS fare against each other.

I used Handbrake because it is an accessible tool that many people use for archiving content, then selected its "best" setting. The point wasn't to try each permutation that x264 provides. If there is a specific setting you'd like tested I'm more than happy to include that in the update.

I didn't include speed tests because that doesn't really matter when comparing QS to x264 (it was a different of minutes versus many hours on a very powerful i7).

mzso
21st August 2013, 17:19
Looks OK to me.
What exactly is wrong there?

Are you using CUVID mpeg4 decoding? If so, try turning that off?

Yep, I was. It decodes fine if I disable it. So it's a hardware bug then?

nevcairiel
21st August 2013, 18:25
More likely a driver bug, but MPEG-4 decoding not being perfect in CUVID is just a known issue.

moffy
22nd August 2013, 01:42
Well I guess no response means I am basically correct and that there are no plans to introduce PGS subtitles.

Rimsky
22nd August 2013, 06:21
MKV container has params for cropping image
http://images.vfl.ru/ii/1377148789/37e1fec4/2942030_m.jpg (http://vfl.ru/fotos/37e1fec42942030.html)

_____________


Nobody supports it except VLCPlayer

Can LAVSplitter with LAVVideo work with this params correctly?
It need for remuxes to cropping black bars without recoding

jj666
22nd August 2013, 10:14
PGS subtitles are working fine.

Cheers,

-jj-

DragonQ
22nd August 2013, 15:28
MKV container has params for cropping image
_____________

Nobody supports it except VLCPlayer

Can LAVSplitter with LAVVideo work with this params correctly?
It need for remuxes to cropping black bars without recoding
Hmm didn't even know that. Would be useful for correcting Rec.601 mistakes too (e.g. stretching 1920x1080 to 1969x1080 but then cropping the outer 49 pixels) without re-encoding.

Keiyakusha
22nd August 2013, 17:05
MKV container has params for cropping image

This is a stupid feature imo and only adds confusion. We already have stream sar vs container dar issues. Learn to encode files in the right way to begin with.

Rimsky
22nd August 2013, 18:07
Learn to encode files in the right way to begin with.

did you meen that bluray encode wrong way?

Keiyakusha
22nd August 2013, 18:10
did you meen that bluray encode wrong way?
If you're talking about bluray that you remuxed without reencoding, there is no reason to crop anything from it. It should be already correct/compliant/whatever.
If you want to encode some video yourself, regardless of what source you use and you need to crop something - simply crop it properly before encoding.

Rimsky
22nd August 2013, 18:24
If you're talking about bluray that you remuxed without reencoding, there is no reason to crop anything from it.
or rly?
http://www.youtube.com/watch?v=yTzTpW3kTBE

Keiyakusha
22nd August 2013, 18:26
or rly?
http://www.youtube.com/watch?v=yTzTpW3kTBE
Not sure what you want to show me with this video but it have nothing to do with mkv cropping.

nevcairiel
22nd August 2013, 18:28
You do realize that even if this was supported, that LAV wouldn't actually do any cropping, but just forward these values to the renderer, so the renderer does the cropping, right?
Since SVP uses ffdshow, and ffdshow is dead and buried, nothing would change there. :)

Rimsky
22nd August 2013, 18:30
Not sure what you want to show me with this video but it have nothing to do with mkv cropping.

lighting black bars 21:9 video on the 16:9 TV

Rimsky
22nd August 2013, 18:33
You do realize that even if this was supported, that LAV wouldn't actually do any cropping, but just forward these values to the renderer, so the renderer does the cropping, right?

nope, I suppose that lavslitter get this crop params and send it to lavvideo and LAVVideo crop it becouse if it forward to the render a) it may be lost in the chain of the filters b) render doesnt support cropping

Keiyakusha
22nd August 2013, 18:37
You do realize that even if this was supported, that LAV wouldn't actually do any cropping, but just forward these values to the renderer, so the renderer does the cropping, right?
Since SVP uses ffdshow, and ffdshow is dead and buried, nothing would change there. :)
I don't think that mkv cares about in what way this actually happens (or it does?). So it can be implemented on decoder level... b-but this is such a bad idea.

lighting black bars 21:9 video on the 16:9 TV

Ask SVP or whatever software creates these bars to handle this out of the box.
If it can attach these bars to cropped material, it should also be able to crop black bars 1st.

clsid
22nd August 2013, 18:44
LAV Video does not crop because that is very inefficient, due to data copies and alignment issues, certainly when cropping from left/top.

clsid
22nd August 2013, 18:45
Well I guess no response means I am basically correct and that there are no plans to introduce PGS subtitles.
You need a subtitle render such as xy-VSFilter.

STaRGaZeR
22nd August 2013, 19:11
I used Handbrake because it is an accessible tool that many people use for archiving content, then selected its "best" setting. The point wasn't to try each permutation that x264 provides. If there is a specific setting you'd like tested I'm more than happy to include that in the update.

I didn't include speed tests because that doesn't really matter when comparing QS to x264 (it was a different of minutes versus many hours on a very powerful i7).

That's because of the settings you used. As I said it's an apples to oranges comparison. No need to try every permutation, use the presets for quick testing. Last time I checked the faster presets in x264 were comparable in speed with higher quality. And for f*cks sake, don't use CQP.

nevcairiel
22nd August 2013, 19:28
nope, I suppose that lavslitter get this crop params and send it to lavvideo and LAVVideo crop it becouse if it forward to the render a) it may be lost in the chain of the filters b) render doesnt support cropping

Sucks if you use a bad renderer. :)
If i ever implement it, i will quite certainly not make LAV apply the cropping, because its just a big headache, especially with DXVA decoding. A renderer can even crop with DXVA.

mzso
22nd August 2013, 19:33
You do realize that even if this was supported, that LAV wouldn't actually do any cropping, but just forward these values to the renderer, so the renderer does the cropping, right?
Since SVP uses ffdshow, and ffdshow is dead and buried, nothing would change there. :)

Since when?

derpycat
22nd August 2013, 19:59
Question about audio: if I want a 5.1 16-bit output (actually 5.0) for everything, not including stereo, what would be the correct settings?

I currently have "Output Formats" in the first tab set to only "16-bit Integer", in the second tab I have "Enable Mixing" set to 5.1. Do I need to touch the mix levels? I also have "Don't mix Stereo sources" ticked. Any changes?

Thanks

kasper93
22nd August 2013, 19:59
Since when?

Quite some time actually.

nevcairiel
22nd August 2013, 20:32
Question about audio: if I want a 5.1 16-bit output (actually 5.0) for everything, not including stereo, what would be the correct settings?

I currently have "Output Formats" in the first tab set to only "16-bit Integer", in the second tab I have "Enable Mixing" set to 5.1. Do I need to touch the mix levels? I also have "Don't mix Stereo sources" ticked. Any changes?

That sounds about right.

derpycat
22nd August 2013, 20:35
Thanks, and also should I tick "Use dithering for 16-bit input?"

nevcairiel
22nd August 2013, 20:35
For best quality that should be ticked, yes. Should be on by default.

derpycat
22nd August 2013, 20:37
It's because I just unticked everything but 16-bit, but I shall tick this one too. Cheers

DragonQ
22nd August 2013, 23:03
Will be testing a 10-bit 1080p video on my HTPC tomorrow. I assume CUVID doesn't support this and LAV will fall back to software decoding? Wish me luck. :scared:

nhakobian
23rd August 2013, 01:08
Will be testing a 10-bit 1080p video on my HTPC tomorrow. I assume CUVID doesn't support this and LAV will fall back to software decoding? Wish me luck. :scared:

No hardware decoder currently decodes 10-bit video. If my memory serves, it should fall back to software.

moffy
23rd August 2013, 03:12
Thank you clsid for your response. As I suspected all but DVD subtitles are handled externally to LAVVideo. Well I might try and add them, as I need a hook into both the DVD and PGS subtitles. Not that familiar with DirectShow or LibAV but I'll see how I go. Any advice appreciated.

DragonQ
23rd August 2013, 15:19
This is a stupid feature imo and only adds confusion. We already have stream sar vs container dar issues. Learn to encode files in the right way to begin with.
Tell that to broadcasters.

DragonQ
23rd August 2013, 15:27
That sounds about right.
I've noticed that when channels switch from 5.1 to 2.0 for adverts, the volume increases. I'm not talking about DRC used for adverts, I mean the actual volume level goes up because the switch is often made during the sponsor clips and I hear the sound jump up/down. I'm unsure if it's because of my settings or just something that happens when downmixing. My settings are as follows:

[X] Enable Mixing
[4.0] Output Speaker Configuration
[0.71] Center Mix Level
[0.71] Surround Mix Level
[??] LFE Mix Level

[ ] Don't Mix Stereo Sources
[X] Normalise Matrix
[X] Clipping Protection

[None] Matrix Encoding

nevcairiel
23rd August 2013, 15:48
normalize matrix will reduce the volume when downmixing, so when it switches to stereo and doesnt downmix anymore, the volume reduction goes away.
I would suggest to disable normalize matrix and just use clipping protection.

DragonQ
23rd August 2013, 15:52
I had assumed that when Don't Mix Stereo Sources was unticked, the downmixing parameters would still apply for stereo sources, including normalising the matrix. Would this not make more sense, and make the volume level match?

nevcairiel
23rd August 2013, 15:54
Matrix normalization is only used when you actually downmix something (and when the matrix sums go above > 1.0), but since stereo fits into 4.0, there is no need to downmix, its just padded with empty channels.
All it does is make sure that no output channel has a sum of source channgels above 1.0, so that you never ever can get clipping. It does not guarantee consistent volume between streams.

DragonQ
23rd August 2013, 16:09
Right, but would it not be more sensible to normalise the matrix always to get consistent volumes? People could still avoid this by ticking Don't Mix Stereo Sources.

nevcairiel
23rd August 2013, 16:10
Thats not what matrix normalization does.

All it does is normalize it so that the maximum mixing coefficient is 1.0, this completely depends on your mixing factors, input and ouput channels.
If you want consistent volumes for all streams, turn it off. It actively works against this.

shpitz
24th August 2013, 23:35
Hi,
using MPC-BE with LAV Splitter v0.58.2 video plays upside-down.
If I use the internal splitter it show correctly.

Am I missing something?

This is an MP4 recorded by a phone.

wanezhiling
25th August 2013, 03:16
Sample file, please.

betaking
25th August 2013, 07:01
how to set windows environment variables to complier lav?

Aleksoid1978
25th August 2013, 12:40
Hi,
using MPC-BE with LAV Splitter v0.58.2 video plays upside-down.
If I use the internal splitter it show correctly.

Am I missing something?

This is an MP4 recorded by a phone.

I think it's record with rotate flag.