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

Pat357
10th July 2012, 19:34
Sorry, I did not mean to imply that mixing would only work with Blu-ray. I meant that since I cannot get LAV Filters above 0.50.1 to play back DVDs, I cannot test anything else.

Try this MPEG decoder : http://gplmpgdec.sourceforge.net/

It works for me to playback DVD's with MadVR as renderer.
see : http://www.mediafire.com/?dhwk5gfhh33dtqm (full size)
or http://www.mediafire.com/i/?dhwk5gfhh33dtqm (smaller image)

The trick is to check "remember DVD position" (Options -> player) and start the playback with EVR/EVR-CP.
While playing, change the renderer to MadVR and restart the player.
Now the DVD will play with MadVR !

PS : let me know if this works for you !

6233638
10th July 2012, 19:59
Try this MPEG decoder : http://gplmpgdec.sourceforge.net/

It works for me to playback DVD's with MadVR as renderer.
see : http://www.mediafire.com/?dhwk5gfhh33dtqm (full size)
or http://www.mediafire.com/i/?dhwk5gfhh33dtqm (smaller image)

The trick is to check "remember DVD position" (Options -> player) and start the playback with EVR/EVR-CP.
While playing, change the renderer to MadVR and restart the player.
Now the DVD will play with MadVR !

Thank you. What I actually did was switch to dslibdvdnav 0.2.4 (http://sourceforge.net/projects/dslibdvdnav/files/) and that seems to be working correctly with ffdshow decoding. I had avoided this because I thought it required replacing system DLLs, but what it actually does is change a registry key to point to the new DLL, which I'm much happier doing.


And for whoever was asking about disabling output formats so that LAV Audio would only output 32-bit Float when downmixing, it does that automatically, there's no need to disable anything.

glith
10th July 2012, 20:09
If you insist, there is a donation button on the google project page: http://code.google.com/p/lavfilters/

Maybe Flattr would be an option too Nev? Not everyone likes Paypal. :P
http://flattr.com/

iSunrise
10th July 2012, 20:13
And for whoever was asking about disabling output formats so that LAV Audio would only output 32-bit Float when downmixing, it does that automatically, there's no need to disable anything.
That´s not true for every codec though, e.x. with FLAC audio LAV audio will always decode to 16bit integer if you have everything checked. This can only be avoided if you exclusively enable 32bit float (or other options, you might like). Not sure if this is intended or not (source format shown on the status tab is 24bit integer), but I encountered this today while I changed my setup over from Potplayer´s internal audio filters and post-processing to LAV audio.

aufkrawall
10th July 2012, 20:16
Converting YCgCo to RGB doesn't work right.
YCgCo converted to RGB by madVR:
http://www.ld-host.de/uploads/thumbnails/2c59643a3f5ccf0e356a5bcd0948eca3.png (http://www.ld-host.de/show/2c59643a3f5ccf0e356a5bcd0948eca3.png)

YCgCo converted to RGB by LAV:
http://www.ld-host.de/uploads/thumbnails/6b05090ac70e93fae1323cd2dfba0920.png (http://www.ld-host.de/show/6b05090ac70e93fae1323cd2dfba0920.png)

Sample:
http://www.mediafire.com/?o88h5mkkl5y519m

6233638
10th July 2012, 20:27
That´s not true for every codec though, e.x. with FLAC audio LAV audio will always decode to 16bit integer if you have everything checked. This can only be avoided if you exclusively enable 32bit float (or other options, you might like). Not sure if this is intended or not (source format shown on the status tab is 24bit integer), but I encountered this today while I changed my setup over from Potplayer´s internal audio filters and post-processing to LAV audio.It looks like this is a bug in LAV Audio's handling of FLAC files in general.

With a Stereo FLAC file, it is always output at 16-bit Integer even if the source is 24-bit, whether you are downmixing or not.

Multichannel FLAC files are handled correctly when downmixing, but are output as 16-bit integer if you are not.

nevcairiel
10th July 2012, 20:36
It looks like this is a bug in LAV Audio's handling of FLAC files in general.

With a Stereo FLAC file, it is always output at 16-bit Integer even if the source is 24-bit, whether you are downmixing or not.

Are you sure the files are really 24-bit?
There is a small bug that causes LAV Audio to show 24-bit as decode format on 16-bit files because of changes in ffmpegs flac decoder (only a minor display issue). I shall go and find a real 24-bit file now.

And yes, downmixing will always result in 32-bit float, because the mixer works in float. You can force it to do a conversion afterwards by disabling 32-bit float output, but i do not recommend it.

Edit:
Found a real 24bit FLAC file, and it output as 24-bit.

nevcairiel
10th July 2012, 20:46
Converting YCgCo to RGB doesn't work right.

How odd, looks like a small chroma shift, wonder how that happend on 4:4:4 material.
Oh, i think i know. I'll look.

Keiyakusha
10th July 2012, 20:50
wait, LAV supports YCgCo? Maybe its time to start using it then...

6233638
10th July 2012, 20:55
Are you sure the files are really 24-bit?
There is a small bug that causes LAV Audio to show 24-bit as decode format on 16-bit files because of changes in ffmpegs flac decoder (only a minor display issue). I shall go and find a real 24-bit file now.

Edit:
Found a real 24bit FLAC file, and it output as 24-bit.You're right, I assumed LAV Audio was reading the source bit-depth correctl, but the files I tested were indeed 16-bit. With a 24-bit source, it does output 24-bit correctly. (or 32-bit Float when downmixing)

nevcairiel
10th July 2012, 21:05
You're right, I assumed LAV Audio was reading the source bit-depth correctl

Well it does, it just fails at displaying it :)

iSunrise
10th July 2012, 21:17
Well it does, it just fails at displaying it :)
Man, that´s very confusing. Thanks for clarifying!

nevcairiel
10th July 2012, 21:19
Converting YCgCo to RGB doesn't work right.

Fixed, sometimes this SSE2 code can be so confusing. All better now.
Funny story this YCgCo, its the only code path that has no proper fallback on CPUs that are not SSE2 capable .. but well, screw them. :)

CiNcH
10th July 2012, 21:33
I recognized another regression in LAV Video 0.51.1 (vs. 0.50.5) (DXVA2 native). Using DVBViewer and its EVR Custom Presenter, MPEG-2 576i source material is played back with a 20ms jitter. When having a closer look at the image, one may recognize that the field order is swapped.

cegy
10th July 2012, 21:44
I recognized another regression in LAV Video 0.51.1 (vs. 0.50.5) (DXVA2 native). Using DVBViewer and its EVR Custom Presenter, MPEG-2 576i source material is played back with a 20ms jitter. When having a closer look at the image, one may recognize that the field order is swapped.

does this also happen with hd 1080i ? as it does with me with when using the cpu to decode so it makes you wonder if its ffmpeg at fault ? maybe a bug ?

RealSnoopyDog
10th July 2012, 21:52
Thank you for version 0.51.1 nev :) I don't have any problems with this version on my HTPC (Windows 7 - 32 / ATI 6670) Zapping in DVBViewer goes noticeable faster than with version 0.50.5 ! I checked this several times.

On my laptop (Windows 7 - 64 / nVidia 560) i still have this delay until the image appears after a format change, but ok - i can change configuration in DVBViewer.

nussman
10th July 2012, 21:53
I recognized another regression in LAV Video 0.51.1 (vs. 0.50.5) (DXVA2 native). Using DVBViewer and its EVR Custom Presenter, MPEG-2 576i source material is played back with a 20ms jitter. When having a closer look at the image, one may recognize that the field order is swapped.
Same here.

does this also happen with hd 1080i ? as it does with me with when using the cpu to decode so it makes you wonder if its ffmpeg at fault ? maybe a bug ?
No it only happens with MPEG-2 576i source (DVBViewer + custom evr).

nevcairiel
10th July 2012, 21:53
I recognized another regression in LAV Video 0.51.1 (vs. 0.50.5) (DXVA2 native). Using DVBViewer and its EVR Custom Presenter, MPEG-2 576i source material is played back with a 20ms jitter. When having a closer look at the image, one may recognize that the field order is swapped.

I doubt there was a wrong field order, when the field order is wrong you can definitely see it, its a quite obvious problem, no closer looks required.

I did however find another small problems with timestamping of the frames, and the jitter is now again 0-1 in the EVR statistics.

You can try with this:
http://files.1f0.de/lavf/LAVFilters-0.51.1-4-g3854899.zip

@everyone else:
This also includes all fixes mentioned in the previous posts, so if you want to try, go ahead.

nussman
10th July 2012, 22:04
Your fix works fine. Thanks nev

CiNcH
10th July 2012, 22:05
I doubt there was a wrong field order, when the field order is wrong you can definitely see it
Oh I could definately see it ;) . Especially at static channel logos.

Thank you for version 0.51.1 nev :) I don't have any problems with this version on my HTPC (Windows 7 - 32 / ATI 6670) Zapping in DVBViewer goes noticeable faster than with version 0.50.5 ! I checked this several times.

On my laptop (Windows 7 - 64 / nVidia 560) i still have this delay until the image appears after a format change, but ok - i can change configuration in DVBViewer.
Hmm, that's strange. I am also not experiencing any delays when switching from 1080i channels to 720p channels on my AMD HD6570 based system...

All I can say is that when "pre-format detection" is disabled, the DVBViewer builds a graph without having the DVBSource filter parse the video stream. So it propagates some default values via the video pin. The DVBViewer assumes that the video decoder has to parse this information from the stream anyway and therefore avoids the additional waiting time.
Keep in mind that file playback in DVBViewer always uses pre-format detection. Disabling this option is only to optimize channel switching time for live TV sources.

CiNcH
10th July 2012, 22:44
Something else I recognized when switching between H.264 HD channels is that I sometimes get pixelation for a split-second. Looks like a random access problem. What the DVBSource does is split the ES data in 8K chunks and hand them over to the downstream filter. It does not cut at NALU borders and the like and knows nothing about frames. So maybe LAV does not propagate a complete NALU to the DXVA decoder at the beginning or something.

kypec
11th July 2012, 05:53
hmm, gotta take note of that, if i type o in this forum it'll become like this *:off

That's because you forgot to check "Disable smilies in text" option :sly:
http://i49.tinypic.com/1zgxf9t.jpg

nevcairiel
11th July 2012, 06:43
Something else I recognized when switching between H.264 HD channels is that I sometimes get pixelation for a split-second. Looks like a random access problem. What the DVBSource does is split the ES data in 8K chunks and hand them over to the downstream filter. It does not cut at NALU borders and the like and knows nothing about frames. So maybe LAV does not propagate a complete NALU to the DXVA decoder at the beginning or something.

Incomplete NALUs are never send to the decoder, the GPU driver would most likely crash if you try that. :d

Its probably caused by missing reference frames. Especially with H.264 its not always trivial to determine if a frame is corruption free already, so short of writing the full complex logic to figure this out, i opted to show frames a bit earlier then waiting potentially too long. The alternative would be seeing black for longer, which i don't think is that great of an experience either (especially because the frames could be free of corruption, its just not certain)

CiNcH
11th July 2012, 07:24
Its probably caused by missing reference frames. Especially with H.264 its not always trivial to determine if a frame is corruption free already, so short of writing the full complex logic to figure this out, i opted to show frames a bit earlier then waiting potentially too long. The alternative would be seeing black for longer, which i don't think is that great of an experience either.
OK, sold me on that ;) .


Next thing I am going to look at is the A/V synchrony problem with certain live TV stations. SPORT1 HD is pretty problematic for me and I yet couldn't figure out why. Sometimes everything is fine and sometime A/V is out of sync by few 100ms.

Vasilich
11th July 2012, 10:04
Hi nevcariel,
Thanks for your LAV filters.
I have some problems/suggestions though:
I use MediaPortal that plays videos and shows LiveTV. It is installed on dedicated HTPC with ION 330 (CPU: 2x Intel Atom core@1.6GHz, GPU: nVidia ION (~GeForce 9400) = Core C79, VP3, Feature set B).
I have some movies that have dimensions 1024*5xx. I cannot play these movies using DXVA mode because according to wiki (http://en.wikipedia.org/wiki/Nvidia_PureVideo) my graphic card doesn’t support DXVA for those dimensions:
Note that all Feature Set B hardware cannot decode H.264 for the following widths: 769-784, 849-864, 929-944, 1009-1024, 1793-1808, 1873-1888, 1953-1968, 2033-2048 pixels.
It can be played though with LAV configured to use CUDA. I cannot set LAV to use CUDA because i will get problems with LiveTV - no idea why, but LAV for LiveTV works quite good and without framedrops only with DXVA.
Set decoding to software mode is also not an option for me because my system is not very powerful.
So I need any advice how to proceed at best.
Suggestion: is it possible to define default fallback mode for those cases when current video isn’t supported by DXVA if it is set as default decoding mode? In that case all will be played with DXVA, except some movies my graphic card doesn’t support acceleration for, and for those movies fall back to CUDA.

nevcairiel
11th July 2012, 10:10
What happens today on such files? Does it just fail decoding (produce a black screen), or does it already properly fallback to software?

Vasilich
11th July 2012, 10:19
i get kinda messagebox in MediaPortal - "impossible to play file".
in GraphStudio it just does nothing - no mesages, no warnings, no preview window - just doesn't start to play at all.
So i assume it doesn't fallback to SW

RealSnoopyDog
11th July 2012, 10:55
Hmm, that's strange. I am also not experiencing any delays when switching from 1080i channels to 720p channels on my AMD HD6570 based system...
Yes, it happens only with nVidia.

CiNcH
11th July 2012, 11:40
Yes, it happens only with nVidia.
And this startet with 0.51? Do you use DXVA or CUDA?

aufkrawall
11th July 2012, 11:46
Fixed, sometimes this SSE2 code can be so confusing. All better now.
Funny story this YCgCo, its the only code path that has no proper fallback on CPUs that are not SSE2 capable .. but well, screw them. :)
It looks right now but it's still not lossless. :(
Can't say if it's LAV or the YCgCo Avisynth plugin, of course. :o

nevcairiel
11th July 2012, 11:58
For lossless storage of a 8-bit RGB source, you need to store YCgCo as 9-bit, iirc.
Idealy, 8-bit Luma and 9-bit Croma planes, but neither x264 nor ffmpeg support different chroma bitdepth (and LAV would choke on it too if its added one day)

kitame
11th July 2012, 12:04
That's because you forgot to check "Disable smilies in text" option :sly:
http://i49.tinypic.com/1zgxf9t.jpg

does it work with quick post tho? i usually use that instead.

aufkrawall
11th July 2012, 12:24
For lossless storage of a 8-bit RGB source, you need to store YCgCo as 9-bit, iirc.
Idealy, 8-bit Luma and 9-bit Croma planes, but neither x264 nor ffmpeg support different chroma bitdepth (and LAV would choke on it too if its added one day)
I'm sure you could make it work then. :D
Isn't it a nice idea to get rid of RGB without losing quality? :(

nevcairiel
11th July 2012, 12:29
Whats wrong with RGB?
Does a 4:4:4 YCgCo compress so much better then planar RGB that its worth all the trouble?

aufkrawall
11th July 2012, 12:54
Whats wrong with RGB?
Does a 4:4:4 YCgCo compress so much better then planar RGB that its worth all the trouble?
Hm, should be pretty much the same like when converting to YCbCr I444, or not?
If yes, imho that's quite a remarkable compression gain for a lossless conversion.

nevcairiel
11th July 2012, 13:04
It should compress even better then ordinary YCbCr, in theory anyway.
The proper/lossless way to handle YCoCg is however documented everywhere to use 8-bit Y and 9-bit Co/Cg, which is not supported by encoders/decoders yet. ;)

hayan
11th July 2012, 13:24
LAV MKV Splitter
http://thumbsnap.com/i/bAoUnJLe.png

MPC-HC internal Splitter
http://thumbsnap.com/i/1B0guWkC.png

LAV Filters 0.51.1
Frame rate 23.976fps
MPC-HC r5417, EVR CP/EVR Sync

PS:LAV Filters 0.50.5 no problem

nevcairiel
11th July 2012, 13:37
@hayan:
You need to provide a sample or at least some detail about the file you're trying to play (a sample with which the problem can be reproduced will greatly help to identify potential problems)

Also, please try with this version:
http://files.1f0.de/lavf/LAVFilters-0.51.1-4-g3854899.zip

Pat357
11th July 2012, 16:03
Whats wrong with RGB?
Does a 4:4:4 YCgCo compress so much better then planar RGB that its worth all the trouble?

Storing in RGB sucks, because interlaced content must be deinterlaced before storing in RGB : MadVR chokes if you feed it interlaced content and select only RGB32 in Lav-video.
You'll get a black screen and sometimes the audio starts playing, but no video.

Interlaced YCgCo can be stored without deinterlacing first : on viewing the content, just let MadVR deinterlace it !

nevcairiel
11th July 2012, 16:40
Interlacing is a thing of the ancient past, it can stay in YUV for all i care. Anyone that produces modern content in an interlaced format is doing it wrong.
There are also much better deinterlacing algorithms then what your GPU can do, they are just too slow for real-time use, so if you have an interlaced source, might as well deinterlace it properly if you want to re-encode it anyway.

If source is RGB, and display is in RGB, storing it in anything else in between is just useless conversion. :p

kasper93
11th July 2012, 16:50
Thank you. What I actually did was switch to dslibdvdnav 0.2.4 (http://sourceforge.net/projects/dslibdvdnav/files/) and that seems to be working correctly with ffdshow decoding. I had avoided this because I thought it required replacing system DLLs, but what it actually does is change a registry key to point to the new DLL, which I'm much happier doing.

Do you know which reg key/s it change? Because I want to do it manually, I don't trust any .exe which change unknown things...

Ok, I figured it out. HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{9B8C4620-2C1A-11D0-8493-00A02438AD48}\InprocServer32 but many DVD has black screen in menu and on some I need to reselect audio, because it isn't connected automatically. Anyway it works ;p

v0lt
11th July 2012, 18:41
LAV Audio
...
- Audio Down-Mixing support
Cool! Thank you. :)

n3w813
11th July 2012, 22:01
Cool! Thank you. :)

Yes, thanks a bunch for the audio downmix support. I no longer need ffdshow just for this. :D

:thanks:

ikarad
11th July 2012, 23:12
With lav splitter 0.51.1 (same problem with 0.37), I can't open playlist file (mpls) of bluray, is it normal?

In this site, lav filter must open mpls file
http://www.free-codecs.com/download/LAVFSplitter.htm

- BluRay Support:
Support for opening BluRay playlists (.mpls), as well as the index.bdmv file, which will try to detect the main movie playlist!
BluRay support is still in an early stage, and there are still many improvements and new features planned!]

With mpc splitter, I can open playlist file.

6233638
11th July 2012, 23:32
With lav splitter 0.51.1 (same problem with 0.37), I can't open playlist file (mpls) of bluray, is it normal?Works fine here.

ikarad
11th July 2012, 23:54
Works fine here.

Not with me. It doesn't work. MPC-HC say : "cannot render the file" if I open mpls ou bdmv file. With m2ts file, it works. I try many blu-rays and same problem.
If I use mpc internal splitter, I can use mpls and bdmv file.

I use win 7.

I tried with differents versions of mpc-hc, with or without ffdshow, with or without madvr but same problem.

nevcairiel
12th July 2012, 05:56
Reinstall LAV using the installer, its the only way that will guarantee what file associations are setup properly.

Sebastiii
12th July 2012, 06:10
@Ikarad :
Yep surely something is wrong (maybe old setting in registry)
mpls working fine here too.
did you try to open manually .mpls inside graphstudio with lav splitter source and then add all filter and connect them ?
Also you should try if you can on another PC or on vm :)

ikarad
12th July 2012, 08:37
I solved the mistake. I had blocked lav splitter source in mpc-hc. lav Splitter worked (lav splitter was "in prefer" mode) but not playlist.

kypec
12th July 2012, 08:56
does it work with quick post tho? i usually use that instead.
Nope, because this option is not available in Quick Reply mode which means you have to use Advanced mode.