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

Aleksoid1978
8th July 2015, 12:29
AFAIK, LAV Filters are not responsible for the DVD Navigation with subpictures, only for decoding the background video.

You're wrong. It is able to process and display subpictures, but it has small defects in processing subtitle :)
That is why such an effect is obtained.

nevcairiel
8th July 2015, 12:43
Menus are usually implemented using Highlight Regions (HLI), not subtitles as such.
However the point stands. The way LAV processes menus, if your video renderer buffers N frames, then it'll take the time of N frames to draw before a change to the menu will be visible on screen.

You can try using Microsoft's DVD decoder with EVR, that might give you faster reaction time, since it can directly talk to EVR in another way.
DVD support has its own option in LAV, and if you disable it, MPC-HC should switch to another decoder.

And Aleksoid1978, if you want to report an actual bug, please do so in the details required to understand and possibly fix it.
Afterall, your mpc-be video decoder greatly benefits from all the code I write for LAV.

Aleksoid1978
8th July 2015, 13:04
And Aleksoid1978, if you want to report an actual bug, please do so in the details required to understand and possibly fix it.
Afterall, your mpc-be video decoder greatly benefits from all the code I write for LAV.

I later write about bug and how you can fix it.

Aleksoid1978
8th July 2015, 13:14
nevcairiel
You code for compare AM_PROPERTY_SPHLI:

if (pHLI) {
#define DHLI(var) (pHLI->var != m_pHLI->var)
if (!m_pHLI || DHLI(StartX) || DHLI(StopX) || DHLI(StartY) || DHLI(StopY)) {
SAFE_DELETE(m_pHLI);
m_pHLI = new AM_PROPERTY_SPHLI(*pHLI);
redraw = true;
}
m_pLAVVideo->SetInDVDMenu(true);
} else {
SAFE_DELETE(m_pHLI);
}


But - this is not enough. Just - it is necessary to compare ColCon member of AM_PROPERTY_SPHLI.
My code:

static bool IsSPHLIEqual(AM_PROPERTY_SPHLI* pSPHLI1, AM_PROPERTY_SPHLI* pSPHLI2)
{
return (pSPHLI1 && pSPHLI2
&& pSPHLI1->StartX == pSPHLI2->StartX
&& pSPHLI1->StopX == pSPHLI2->StopX
&& pSPHLI1->StartY == pSPHLI2->StartY
&& pSPHLI1->StopY == pSPHLI2->StopY
&& !memcmp(&pSPHLI1->ColCon, &pSPHLI2->ColCon, sizeof(AM_COLCON)));
}


it's for bug 1.DVD no discoloration menu

nevcairiel
8th July 2015, 13:26
That makes sense, I'll fix it.
Never had a sample DVD which behaved like this, though, but it seems logical.

Aleksoid1978
8th July 2015, 13:31
That makes sense, I'll fix it.
Never had a sample DVD which behaved like this, though, but it seems logical.

Here is a sample DVD Menu.
https://yadi.sk/d/tei1rM3chk9bo

Aleksoid1978
8th July 2015, 14:24
nevcairiel
Another bug.
https://yadi.sk/d/1QJjDOQ5hEopR - menu only.

Set in LAVVideo - hardware decode to none, open this DVD, wait untile animated menu is show, press pause. And move mouse from one menus "button" to another. After a while the program hangs. Test in MPC-HC/MPC-BE. Hangs on this line:

m_pOutput->GetDeliveryBuffer(ppOut, nullptr, nullptr, 0)


In MPC-BE i do some check - if current stay is a pause, don't force refresh subpicture and video frame, somethink like this :) :

bool CMpeg2DecFilter::IsGraphRunning() const
{
if (CComQIPtr<IMediaControl> pMC = m_pGraph) {
OAFilterState fs = State_Stopped;
pMC->GetState(0, &fs);
return (fs == State_Running);
}

return false;
}

nevcairiel
8th July 2015, 14:27
Why would anyone pause in the menu o.o
I'll check when the download finishes though.

Aleksoid1978
8th July 2015, 14:44
Why would anyone pause in the menu o.o

Yes - this is a specific menu, it has a duration and allows you to pause :)

videonerd
8th July 2015, 14:54
Hi nevcairiel can you give some love to the splitter bug for WMV containers with regards to seeking please.

Thank you!

akim
8th July 2015, 15:01
Menus are usually implemented using Highlight Regions (HLI), not subtitles as such.
However the point stands. The way LAV processes menus, if your video renderer buffers N frames, then it'll take the time of N frames to draw before a change to the menu will be visible on screen.

You can try using Microsoft's DVD decoder with EVR, that might give you faster reaction time, since it can directly talk to EVR in another way.
DVD support has its own option in LAV, and if you disable it, MPC-HC should switch to another decoder.

And Aleksoid1978, if you want to report an actual bug, please do so in the details required to understand and possibly fix it.
Afterall, your mpc-be video decoder greatly benefits from all the code I write for LAV.

Reduce the number of pre-presented/buffered frames, it'll make the menu react faster - It does not help
About Microsoft DTV-DVD Video Decoder I know and you have to connect it to his mpc-hc, potplayer, mpc-be and wait at least one of them will be on par with wmp when playing a DVD (which is 29 years) ;)

nevcairiel
8th July 2015, 15:02
Noone cares about DVDs anymore. I certainly wouldn't spend hours and hours to make the menu react a few milliseconds faster. Its only about the menu, and its only about being slightly laggy. You'll survive!
The movie will play perfectly, subtitles and all.

ThurstonX
8th July 2015, 16:35
Noone cares about DVDs anymore. I certainly wouldn't spend hours and hours to make the menu react a few milliseconds faster. Its only about the menu, and its only about being slightly laggy. You'll survive!
The movie will play perfectly, subtitles and all.

I love your work and respect your opinion, but really? I don't own a Blu-ray player and likely never will (yeah, I'm "old"). While I don't have a ton of DVDs, when I buy something new or old, I buy the DVD version.

Pretty sure I'm not the only "one," but I am someone ;-)

I could say more, but then this post would get deleted :D

nevcairiel
8th July 2015, 17:35
Its not that DVDs don't work at all - in fact DVDs work just fine in LAV.
If you don't like that interactions take a few milliseconds to show visual feedback, you are welcome to use something else - but as I said, I won't be spending hours or even days on implementing something new for menus just to shave off a few millisecond response time. :p

We're going towards UltraHD TVs and Optical Media these days, which I much rather spent my effort on, personally.

blaubart
8th July 2015, 18:48
..funny conversation..:)
Do you have an UHD TV? Then I would like to give you two UHD samples in hevc 50/60fps. To faster see (or not) what I wrote above.

LigH
8th July 2015, 19:00
You're wrong. It is able to process and display subpictures...

So I enjoyed learning new facts. :o

nevcairiel
8th July 2015, 19:38
..funny conversation..:)
Do you have an UHD TV? Then I would like to give you two UHD samples in hevc 50/60fps. To faster see (or not) what I wrote above.

There is nothing LAV can do about powersaving features of your OS or CPU.

blaubart
8th July 2015, 22:20
There is nothing LAV can do about powersaving features of your OS or CPU.

Power saver was only one workaround to get smoother playback during long consistent moving scenes. But if you say in Win 8.1 any 4k hevc sample up to 60fps playing totally clean in a 4k TV thats all I wanted to hear. Do you?

P.J
8th July 2015, 22:39
Power saver was only one workaround to get smoother playback during long consistent moving scenes. But if you say in Win 8.1 any 4k hevc sample up to 60fps playing totally clean in a 4k TV thats all I wanted to hear. Do you?

I told you before not to use Power saver. Something is wrong with your system or Turbo boost.
Both i5/i7 can play 4k HEVC 10bit 50-60fps easily without using GTX 960 ;)

nevcairiel
8th July 2015, 22:42
Power saver was only one workaround to get smoother playback during long consistent moving scenes. But if you say in Win 8.1 any 4k hevc sample up to 60fps playing totally clean in a 4k TV thats all I wanted to hear. Do you?

I have a 4K PC screen, but yes, I can play stuff on that wihout obvious problems. Didn't watch an entire movie though, don't have that long content in 4K.

blaubart
9th July 2015, 01:44
Both i5/i7 can play 4k HEVC 10bit 50-60fps easily without using GTX 960 ;)

Must be a newer one then my i7 4790k Haswell iGPU.
Which one do you have to 'play 4k HEVC 10bit 50-60fps easily'?

TVs with DisplayPort 1.2 too expensive >3000€ in Europe at the moment, Monitors too small & expensive.
So I love HDMI 2.0 & full hevc acceleration (GTX 960).


I have a 4K PC screen, but yes, I can play stuff on that wihout obvious problems. Didn't watch an entire movie though, don't have that long content in 4K.

No no, 1-2 min are enough :) Would you be so nice and check those two?
1) AstraUHD_Train3_50fps_hevc (https://dc2.safesync.com/FdSVjnr/offen/4K/AstraUHD_Train3_50fps_hevc.ts?a=wk1baO7Rsiw)
3x train pass by. To make it not too easy 3 'bad' cuts. What happens during the cuts (bike) does not count. But a stable system should play the pass by's completely smooth.

2) BBB-credits_2160p60_hevc (https://dc2.safesync.com/FdSVjnr/offen/4K/BBB-credits_2160p60_hevc.mkv?a=0-hoc4NSZsg)
2 minutes - not the slightest quiver/jitter, no pixel errors/storms, no tearing/flashes.

In my Win7 (fresh installed, no extras) test-PC there are differences between Power Saver, Balanced & High Performance (balanced worst) and switching off/on Aero (DWM).
May be I should try without Asus AI Suite, or just see what happens later in Win10, or how about HDMI 2.0 if you use DP?

derpycat
9th July 2015, 03:09
Can someone please remind me why I might want 32-bit Integer and 32-bit Floating-point ticked in Output Formats if my sound card doesn't support 32-bit output? I'm probably misunderstanding what those options mean, but it seems like there aren't many consumer audio cards capable of 32-bit output, so those options being ticked by default would be detrimental for most. The documentation for my sound card (Creative Sound Blaster ZxR) says it goes up to 24-bit, and that's the highest I see in control panel, so I don't think it would help even if MPC-HC had exclusive WASAPI support.

akim
9th July 2015, 05:59
nevcairiel
Static menu, change the color - very well thank you
Dynamic menu color change - does not work
example http://www90.zippyshare.com/v/Vik9mlBf/file.html

nevcairiel
9th July 2015, 08:20
nevcairiel
Static menu, change the color - very well thank you
Dynamic menu color change - does not work
example http://www90.zippyshare.com/v/Vik9mlBf/file.html

I need the menu to find out whats wrong with it. Just from a video I cannot fix it.

You can upload the menu by taking the DVD, including all IFO/BUP files, and all "small" .VOB files. Don't need the VOBs which are 1GB in size, those are for the movie, but all the ones ending with _0.VOB are usually small and only for the menu.

e-t172
9th July 2015, 09:05
Can someone please remind me why I might want 32-bit Integer and 32-bit Floating-point ticked in Output Formats if my sound card doesn't support 32-bit output?

Even if your card supported it, 32-bit output is pointless unless you're reprocessing the signal down the filter chain (e.g. ReClock). And even then it would be extremely unlikely to make any audible difference.

akim
9th July 2015, 09:44
nevcairiel
example http://www.filedropper.com/sample_11

derpycat
9th July 2015, 11:47
Even if your card supported it, 32-bit output is pointless unless you're reprocessing the signal down the filter chain (e.g. ReClock). And even then it would be extremely unlikely to make any audible difference.

So I should untick them, then. :thanks:

nevcairiel
9th July 2015, 12:13
So I should untick them, then. :thanks:

No, you should keep as much precision for the audio was long as possible. Let the audio renderer reduce it to whatever the hardware supports.
LAV will only output such high bitdepth if the audio was encoded like that in the first place.

Don't uncheck anything, leave all of them checked, that will ensure LAV can always output the audio as-is, and no conversion is performed.

derpycat
9th July 2015, 12:29
No, you should keep as much precision for the audio was long as possible. Let the audio renderer reduce it to whatever the hardware supports.
LAV will only output such high bitdepth if the audio was encoded like that in the first place.

Don't uncheck anything, leave all of them checked, that will ensure LAV can always output the audio as-is, and no conversion is performed.

Oh, ok. I don't really get it but you're the boss. Thanks.

LigH
9th July 2015, 12:34
I believe the decoder will ask the driver which resolutions are supported at all, and choose the highest resolutions which a) the driver 'allegedly' supports, and b) you allowed to use. Disallowing a specific format would probably only make sense if you experienced that the audio drivers are bugged when using this output format.

derpycat
9th July 2015, 14:04
Wait ok, so I just tested a Blu-ray in MPC-HC. The input is 24-bit Integer. If the goal is to eliminate conversion, then why is the output 32-bit Float? I also have some FLAC files that have 16-bit input and lav is outputting at 32-bit Float there too. I'm pretty certain all the files I've seen with 32-bit Float input are lossy files. Again, I'm probably missing something here, but that doesn't seem like it makes sense. Is it simply an issue of everything being upconverted to 32-bit being inconsequential rather than the best choice?

sneaker_ger
9th July 2015, 14:18
1. Lossy formats usually don't have a concept a bitdepth, so decoding as 32bit float makes sense
2. If a 16/24 bit lossless format is output by LAV audio as 32 bit float it may be because you have some post-processing (like mixing) activated

derpycat
9th July 2015, 14:26
1. Lossy formats usually don't have a concept a bitdepth, so decoding as 32bit float makes sense
2. If a 16/24 bit lossless format is output by LAV audio as 32 bit float it may be because you have some post-processing (like mixing) activated

This makes sense, I've got everything mixing to stereo.

P.J
9th July 2015, 16:16
Must be a newer one then my i7 4790k Haswell iGPU.
Which one do you have to 'play 4k HEVC 10bit 50-60fps easily'?

I didn't talk about the Intel iGPU. Let the CPU to play it.
AstraUHD 4k h.265 10bit Demo

blaubart
9th July 2015, 18:26
Let the CPU play - which decoder/setting?
Lav stuttering set to none, native or CUVID. PDVD (Generic) plays 4k h.265 pretty smooth but easily running out of audio sync..

ocyl
10th July 2015, 02:12
What will happen when 32-bit audio formats are checked in LAV Audio Decoder, and a 32-bit file is played back with a 24-bit sound card and no post processing?

P.J
10th July 2015, 09:32
Let the CPU play - which decoder/setting?
Lav stuttering set to none, native or CUVID. PDVD (Generic) plays 4k h.265 pretty smooth but easily running out of audio sync..

No problem here: http://phota.me/pb4O.png

Are you using MPC-HC 32bit?

blaubart
10th July 2015, 14:45
No problem here: http://phota.me/pb4O.png

Are you using MPC-HC 32bit?

Aaah, you're so right, thanks!
Initially testing DVBViewer (live-TV) which is 32bit I forgot MPC 64bit a bit. :)
Trying Lav 64bit set to none, native, CB or CUVID playing 50/60fps 4k h.265 smooth and audio sync is good.

Finally I found out that the small jitters/fidgets that appear sometimes (in BBB-credits good to see) are obviously caused by MPC-HC's EVR/EVR Custom.
Other renderers do it better - Sync Renderer (EVR-CP), madVR and DVBViewer's new EVR Custom (by Cinch).

P.J
10th July 2015, 17:54
They all use avcoder (SW) except CB if you use GTX 960 ;)

@nevcairiel No way to improve the 32bit version for ProRes/HEVC playback?

RenderGuy2
10th July 2015, 18:45
It's probably way too early to consider these things, but I found some HEVC HDR sample videos.

http://demo-uhd3d.com/categorie.php?tag=hdr




Anyone have any luck getting these to display correctly? I did a little more reading and it sounds like HDR is implemented in two flavors; single layer and dual layer. Dolby Vision uses the dual layer approach and currently only Vizio is listed on Dolby's website for supporting this form of HDR. I believe these samples came from a Samsung demo, which seems to suggest they are single layer HDR. I suppose this means they decoded just fine by LAV, it's just a matter of using the correct tone mapping curve.

The only thing that still seems really weird to me is that in one clip the upper 25% of the bit range is empty, in the other 30% is empty (ie on a 0-255 scale the white point for one clip is 191ish, the other is 180ish).

The SMPTE 2084 3DLUT I made still expects the brightest tone to be 255 (or 1023 for 10bit).

blaubart
10th July 2015, 20:31
They all use avcoder (SW) except CB if you use GTX 960 ;)

..but not the BBB-credits. They play in cuvid CPU 5% and dxva2n CPU 2%, I swear ;)
All in all I've been learning a lot again and thanks for your input.

4k h.265 50/60fps still not playing really clean, stutters here, pixel storms there.. Reacting capricious to different PC conditions.. But now i know better workarounds. I'm in no hurry.
Now curious about Win10.

P.J
10th July 2015, 21:39
..but not the BBB-credits. They play in cuvid CPU 5% and dxva2n CPU 2%, I swear ;)

It should be 8bit not 10bit.

CruNcher
12th July 2015, 08:13
Atemes H.265 Software Broadcast Encoder was used for the Samsung 10 Bit Demos on the ASTRA Uplink Transponder 4K Demo @ least it seems :)

http://ateme.com/en/products/Distribution-Encoders/titan-live

nevcairiel
12th July 2015, 11:38
Here is such a sample:
http://217.160.126.132/lav_wmv_slow_seek.wmv
https://mega.co.nz/#!NwUjES4A!KIUvBy8IUSp9J3Usrvk_7evUxsXLdPgExt6g9vvcdlk (mirror)


Playback halts for a few seconds using LAV splitter. Seeking and playback is instant using Microsoft splitter or VLC.

Did you ever manage to reproduce this one? I have been checking the changelogs, but have not seen it addressed anywhere, was wondering if that was because you couldn't reproduce it or had forgotten about it.

Hi nevcairiel can you give some love to the splitter bug for WMV containers with regards to seeking please.


I have been testing the re-written asf/wmv demuxer from Libav, and it seems to seek OK in this sample.

I'll probably enable it in the next nightly build, so testing would be appreciated, ideally beyond seeking, as it is very new and may still have other short-comings that need fixing.

TurboGamer
12th July 2015, 13:54
What is the situation with HEVC 10bit on CUVID?

nevcairiel
12th July 2015, 13:58
Use DXVA2 Copy-Back, there is no advantage in CUVID.

djonline
12th July 2015, 21:36
Please explain. Is all LAV feautures ported back to ffmpeg ? Or LAV is always far more better than ffmpeg in h264/h265 ?
Will Kodi/xbmc benefit from switching from ffmpeg to LAV ?

nevcairiel
12th July 2015, 23:05
I cannot tell you what is and is not included in Kodi. I backport important changes to mainline ffmpeg/libav when appropriate, but not everything, as sometimes changes are directly tailored for LAV, and making them more generally useful would require a lot of extra work and/or discussion with the ffmpeg/libav developers.
How much thouse benefit the users, I couldn't tell you.

ZeppMan217
13th July 2015, 09:52
Could anyone tell me if there's a way to boost center channel when downmixing 5.1 to 2.0? I'm asking 'cause I've been struggling with voices being hard to hear on my stereo tv when watching anything converted from 5.1.

nevcairiel
13th July 2015, 09:53
Increase the Center Mix Level in the LAV Audio options.