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

SamuriHL
12th January 2013, 23:51
ROFLMAO! That's awesome :)

dansrfe
13th January 2013, 11:12
nevcairiel,

The problem of MPC-HC has been pinpointed to the DXVA2 Native decoding method as you said. If I switch to software decoding in LAV then the MPC-HC crash is completely gone. If I use the build you posted to the MPC-HC bug tracker with DXVA2 Native then the transition takes about 10 seconds for the video to start playing again on the other screen.

nevcairiel
13th January 2013, 11:15
Well that means it just takes incredibly long to re-init the D3D resources after a screen switch, nothing LAV can do about that, the renderer triggers the re-init (as it should), but something must be going wrong. Use software or Copy-Back? :p

dansrfe
13th January 2013, 11:37
Software and copy-back is working for now (software being the quickest). I hope madshi can fix the D3D init issue with dxva2 native soon.

ice25
13th January 2013, 19:52
Hey, when switching subtitles with same language in LAV i only get the basic language info (e.g. English, English, English). Whereas with the internal MPC-HC filter you get a bit more info (e.g. English:HQ White, English:HQ Yellow, English:SRT). Would it be possible to add that bit of information to the subtitle info in LAV as well?

nevcairiel
13th January 2013, 19:54
If you have a sample file where this is the case, i can have a look.

ice25
13th January 2013, 22:15
Sure, i uploaded the first 30 secs of a random movie where this is the case. http://www.sendspace.com/file/80tjtl

ragg987
14th January 2013, 01:06
Help - something with my subtitles has stopped working properly. I use LAV splitter in advanced subtitle mode. This used to work fine, but some recent upgrade has broken it.

Subtitle config is "eng:eng|f eng:off *:eng". All other settings are default.

When playing using MPC-HC with LAV video decoder and madVR renderer, I expect the following to happen:

Video with English audio - expect no subtitles unless forced. Result forced subtitles are not getting displayed.

Video with non-English audio - expect English subtitles. Result no subtitles are getting displayed.

The only way I can get subtitles to work is if I enable subtitles using MPC subtitles option. If enabled, then all videos show them, even if audio is English.

Using LAV 0.55.1, MPC-HC from Jan 2013 and madVR from Dec 2012. Win 7 32-bit. ATI HD5750 - LAV is not using GPU functions. Files are MKVs off my hard drive - I have checked the subtitle flags using MPC (forced and langauge) and they seem correct. I am not sure when this stopped working - worked well a few months ago.

Devrim
14th January 2013, 16:04
Hi,

I was just watching a 1080i clip on my computer when I noticed something. On my first screen, which is connected to my Nvidia card, the video just plays fine. When I move MPC-HC to my second monitor, which is connected to my onboard intel card, the clip starts stuttering. Do you know why? I use CUVID for decoding btw and it only seems to happen with 1080i content.

nevcairiel
14th January 2013, 16:13
Sure, i uploaded the first 30 secs of a random movie where this is the case. http://www.sendspace.com/file/80tjtl

I got that file, and everywhere i look in MPC-HC, it already shows the full stream titles.

- In Navigation -> Subtitle Language
- In Play -> Subtitles
- In Play -> Filters -> LAV Splitter
- Pressing subtitle hotkeys (S/Shift-S to switch streams, W to enable/disable)

Where exactly would this be missing? :)

ice25
14th January 2013, 16:57
Weird, it does indeed shows the full titles for me in the LAV Splitter menu etc, but it doesn't when i toggle between them with the S key. Unfortunately that's actually the one that matters for me, since the S key is bound to my remote subtitle button. Not sure what the problem would be then..

nevcairiel
14th January 2013, 17:10
That seems to be a feature of MPC-HC. In my version it shows the full name, but instead the S/Shift-S keys behave rather oddly, so i guess you can hope for the next version of MPC-HC? :)
Nothing LAV does, it exports the name in all possible places.

Vasilich
14th January 2013, 19:05
On my first screen, which is connected to my Nvidia card, the video just plays fine. When I move MPC-HC to my second monitor, which is connected to my onboard intel card, the clip starts stuttering. Do you know why? I use CUVID for decoding btw and it only seems to happen with 1080i content.
Maybe it is because when you move it to second screen with Intel, CUDA is not available for Intel? i guess you can see active decoder if you enable tray icon for LAV video filter.
Does it happen if you use DXVA?

nevcairiel
14th January 2013, 19:23
CUVID doesn't care which screen your player is on. My guess would be that quite simply your Intel GPU is too slow to handle playback. Are you potentially using madVR with some high scaling settings? Otherwise, deinterlacing alone could do it, but that would still be a bit of a surprise.

Shark007
14th January 2013, 21:39
CUVID doesn't care which screen your player is on.

Many of the newer laptops use the iGPU (Intel) for the Laptop screen and use the addon GPU (Nvidia) for the HDMI connection. (Asus N76 for example)

mark0077
14th January 2013, 22:01
nev, i uploaded a 1 minute sample of The Dark Knight Blu-Ray (~200mb). With lav video decoder, when I seek, audio goes out of sync (by about 0.5 seconds maybe), even 1 sync can reproduce it. I simply have lav splitter, audio and video decoders, along with mpc and madVR.

If you're interested in seeing can you reproduce on your end too, below is a link I uploaded the sample file to.
http://www.sendspace.com/file/qxvlbp

nevcairiel
14th January 2013, 23:02
I can't say i can reproduce any issues. No matter if i play from the start or seek, the sync seems to be the same through the file.

Note that its always important to note which decoder in LAV you are actually using.

mark0077
14th January 2013, 23:15
I have the issue when LAV Video "Hardware decoder to use" is set to "None". I reproduce by opening the file, seeking half way once.

I tried with "NVIDIA CUVID" as the decoder and can't reproduce the issue on the sample file I sent. Whats strange, I can't reproduce the issue either when NVIDIA CUVID is set as the decoder, and all of the "Codecs for HW" are disabled. I thought this was the equivalent of setting the decoder to "None". Obviously not as the sync issue only happens with "None".

6233638
15th January 2013, 02:00
I can confirm this on my end. In fact, it seems to be the same issue I reported about a year ago, but I wasn't able to determine the cause of the sync issues.
I mistakenly thought it was the "newly" introduced support for index.bdmv files, and I seem to remember having trouble with that title specifically. (and perhaps also Batman Begins, I forget)

I must have switched over to CUVID decoding at the time without realising that was what fixed my problem.

wanezhiling
15th January 2013, 07:56
Since that file is VC-1 stuff, and LAVs default software decoder for VC-1/WMV3 is MS DMO decoder, maybe we should blame MS?

nevcairiel
15th January 2013, 08:34
While it technically is the WMV9 DMOs fault and you could blame Microsoft, that doesnt resolve any issues for us.

So how about with this version?
http://files.1f0.de/lavf/LAVFilters-0.55.1-14-ga9c8d77.zip

Any issues can be worked around. :p
In this case, when the WMV9 DMO drops frames (after a seek, before a I frame), for some obscure reason it doesnt drop the timestamps, so the timestampts of the first frame (which got dropped) get applied to whatever frame is not dropped after the whole thing, giving you a nice AV offset.

Anyway, solution: dropping frames myself before the WMV DMO sees them.

wanezhiling
15th January 2013, 08:51
So how about with this version?
http://files.1f0.de/lavf/LAVFilters-0.55.1-14-ga9c8d77.zip
Works fine here now.:)


btw that file has 2 audio tracks? mpc-hc detects truehd only.

nevcairiel
15th January 2013, 09:09
Blu-ray TrueHD tracks always have the AC3 substream, but MPC-HC doesn't offer it.

Aleksoid1978
15th January 2013, 10:18
Blu-ray TrueHD tracks always have the AC3 substream, but MPC-HC doesn't offer it.

MPC-HC have options in MPEGSplitter how output TrueHD - TrueHD or AC3 Core.

pururin
15th January 2013, 12:19
Is there any difference between madFlac and LAV for FLAC files nowadays?
If not, we could just use LAV for everything?

JEEB
15th January 2013, 12:34
Is there any difference between madFlac and LAV for FLAC files nowadays?
If not, we could just use LAV for everything?
The only real reason to use madFlac I have heard has been about the splitter component, saying it exports more metadata from flac files.

tl;dr Not that I know (decoding-wise).

DragonQ
15th January 2013, 12:37
A few of my ripped MKVs have FLAC audio (can be quite a lot smaller than DTS-HD MA or TrueHD) and I've never had a problem with LAV playing them back.

Devrim
15th January 2013, 12:47
Maybe it is because when you move it to second screen with Intel, CUDA is not available for Intel? i guess you can see active decoder if you enable tray icon for LAV video filter.
Does it happen if you use DXVA?

If I start the video on my second screen (Intel GPU) CUVID shows as active. So I'm pretty sure CUVID is active.

Devrim
15th January 2013, 12:48
CUVID doesn't care which screen your player is on. My guess would be that quite simply your Intel GPU is too slow to handle playback. Are you potentially using madVR with some high scaling settings? Otherwise, deinterlacing alone could do it, but that would still be a bit of a surprise.

I'm using MadVR with high scaling settings yes. I will try setting the settings to bilinair and look if I still have the same problem. Maybe the MadVR developer can make 1 selected GPU do all the work :)

-edit-

Yeah MadVR seems to be the problem I have it on Jinc 3 taps now, if I set it to SoftCubic I don't see any problems. I will send the MadVR dev a message.

mark0077
15th January 2013, 19:27
While it technically is the WMV9 DMOs fault and you could blame Microsoft, that doesnt resolve any issues for us.

So how about with this version?
http://files.1f0.de/lavf/LAVFilters-0.55.1-14-ga9c8d77.zip

Any issues can be worked around. :p
In this case, when the WMV9 DMO drops frames (after a seek, before a I frame), for some obscure reason it doesnt drop the timestamps, so the timestampts of the first frame (which got dropped) get applied to whatever frame is not dropped after the whole thing, giving you a nice AV offset.

Anyway, solution: dropping frames myself before the WMV DMO sees them.

Thanks Nev. Your solution works great, no more audio desync.

cyberbeing
15th January 2013, 21:29
madFlac VS. LAV Audio can also be personal preference for how you want a/v sync dealt with.

For example, when a MKV uses ordered chapters or segment linking, they can behave a bit differently when FLAC duration, Video duration, and ordered chapter duration don't match up exactly.

madFlac fills the gap with silence or halts(?) the decoder when a FLAC runs too long, in order to keep A/V sync.
Advantage: You'll never lose a/v sync in these cases
Disadvantage: Depending on your audio hardware, this can potentially cause a click/pop when it occurs.

LAV Audio instead freely goes out-of-sync, but quickly detects and corrects it (Auto A/V Sync = Enabled).
Advantage: By always keeping the decoder running, it eliminates the potential for audio anomalies. Auto A/V Sync is also a much more robust solution for dealing with other a/v sync issues you may run into during playback.
Disadvantage: There can be cases where a brief loss of a/v sync is perceivable

Note: Last time I tested this was ~1 year ago, but I don't believe madFLAC or LAV Audio has changed anything in this regard since then.

nevcairiel
15th January 2013, 22:03
I used to do instant A/V sync adjustments, however this causes issues with many containers where the timestamps are jittering very strongly (especially DTS-HD muxed with old mkvmerge versions), so yeah, the current solution is more robust. There is probably a small potential for making it react faster, too.

madshi
15th January 2013, 22:20
IIRC madFlac does not do any post-processing on its own. Instead every delivered audio package is simply decoded and output with the correct timestamp. It's a very simple and straighforward process. This way it's up to the audio renderer to handle situations with audio gaps/overlays. And I think this is the "proper" way to behave for audio decoders. I wouldn't expect video decoders to repeat or drop video frames, either, if the timestamps contain gaps or overlaps. That should be left to the video renderer. In the same way I think an audio decoder should also simply decode and not try to be clever. That's just my personal opinion, of course. And my experience with writing an audio decoder is very much limited to just FLAC, nothing else.

nevcairiel
15th January 2013, 22:31
That would work, if audio renderers would be smart. :p
The built-in renderers which like everyone uses crap themself on such issues like the heavily jittering timestamps of old DTS-HD MKV files. Even worse, they seem to use audio timestamps to advance the reference clock, so if those are screwed up, everything goes to hell.

madshi
15th January 2013, 22:38
I still think an audio renderer should just "passthrough" (decode) without modifying timestamps. If the audio timestamps are broken in the container, the logical place to fix that would be the splitter, or maybe the audio renderer, but not the audio decoder, IMHO. But, as I said, this is just my personal opinion... :)

nevcairiel
15th January 2013, 22:39
The splitter should just pass-through what is in the file, though! :p

The problem is that for the splitter it can get quite complicated to figure out the duration of audio, needs to be able to parse a whole bunch of formats.
The decoder has it easy, audio always has a defined duration, so it can generate 100% accurate timestamps, just needs to pay attention to A/V sync.

madshi
15th January 2013, 23:06
The splitter should just pass-through what is in the file, though! :p
I think if there are bugs in the container, it's the splitter's job to work around that. If there are bugs in the audio bitstream, it's the decoder's job to work around that. At least that would be logical.

The problem is that for the splitter it can get quite complicated to figure out the duration of audio, needs to be able to parse a whole bunch of formats.
The decoder has it easy, audio always has a defined duration, so it can generate 100% accurate timestamps, just needs to pay attention to A/V sync.
Yes, I see what you mean. However, this way you decide that all other audio decoders need to implement the same "timestamp repair" logic, too, or otherwise they won't play nice with LAV splitter, if the container timestamps are screwed up. And I don't think that many other audio decoders try to fix broken timestamps. I don't know for sure, though.

more2read
16th January 2013, 14:04
"Dolby E never reaches home viewers, it is used when passing material between production facilities and broadcasters, but is decoded before transmission.
Dolby E encoding and decoding is implemented using commercially available hardware or software."
So, not meant for home consumption, I guess.

Just throwing this out there, as it may be beyond the scope of media playback......
While there are no Directshow Codecs for DolbyE, the hardware decoders(DP572) have become "reasonably" priced on ebay. Depends on how Hard Core you are on playing it.
The decoder has a headphone jack for monitoring the sound, but it's limited. For full channel sound, you need a Dolby Digital encoder(DP569), which have become "reasonably" priced too, and a Dolby Digital Audio Receiver, and a few other small pieces.
Again, just depends on how bad you want to hear the track.

starla
16th January 2013, 14:05
Even worse, they seem to use audio timestamps to advance the reference clock, so if those are screwed up, everything goes to hell.

I know at least one renderer that generates the reference clock from the audio HW :P

-
MP/ tourettes

nevcairiel
16th January 2013, 14:13
I know at least one renderer that generates the reference clock from the audio HW :P

-
MP/ tourettes

ReClock does as well, but the majority of people use DirectSound/WaveOut, which is this broken. :p

Pomegranate
16th January 2013, 14:40
Hi. I have an Nvidia GTS 250 card and using Windows Xp. Only cuvid hardware decoder works, but in LAV video configuration, both DXVA2 items are listed as available. If I select either one of those two, avcodec takes over. Is this normal?

DragonQ
16th January 2013, 14:43
Yes, DXVA2 only works on Vista/7/8.

Pomegranate
16th January 2013, 14:54
Well, "D'oh!" is my only response.

But cuvid is nice though, it works with VC-1 on my system. I never managed to play 1080p VC-1 in MPC-HC, but now I can!

Rimsky
16th January 2013, 17:00
Why LAV splitter does't support linked mkv-files yet?
And switching tracks/subs in splitter tray menu is more comfortable, IMHO

madshi
16th January 2013, 17:06
Why LAV splitter does't support linked mkv-files yet?
Because nobody is helping nevcairiel with LAV development. How about you? You could learn programming, so you can help out with LAV development.

paradoxical
16th January 2013, 17:24
Why LAV splitter does't support linked mkv-files yet?

Because he hasn't gotten to it yet. Code doesn't just appear out of the æther.

You may not have meant it, but your post has a ring of entitlement to it which doesn't really engender positive responses.

celsworth
16th January 2013, 22:51
Hello,

I have just recently upgraded my LAV from a rather ancient 0.50.5 (following the ain't-broke-not-touching-it principle) to the current.

I've discovered that I have video files that stopped playing video after this upgrade, and after a good bit of reinstalling different versions of LAV and rebooting, narrowed it down to between 0.54.1 (last version that it works on) and 0.55 (doesn't work) - 0.55.1 doesn't work either.

Comparing a working video and the non-working ones in MediaInfo is leaving me a little baffled because they're identical apart from the library used to write them; the broken ones were written with x264.exe (mkv2rls x264-tv version built on 2011. febr. 17), and the working ones were mkvmerge.

What other information can I give you to try and track this down? Would it be ok to name the non-working files, given they're 720p scene encodes of a popular TV show set around storage lockers in Texas (try 2x08)?

I'm playing them in MediaPortal, with CUVID enabled. Audio plays, but I just get a black screen.

DragonQ
17th January 2013, 00:11
Which version of TSReader (MediaPortal's splitter) are you using? The version that comes with 1.2.3 is crap and can cause issues - if you haven't upgraded to 1.3.0 Beta then get the latest TSReader.ax file from here (http://forum.team-mediaportal.com/threads/experimental-tsreader-development.102693/#post-811296).

celsworth
17th January 2013, 00:32
Just tried version 69 from that page with no change. I was using an older version of that, possibly 45, can't remember exactly. I'm on MediaPortal 1.2.2

Upon more inspection of the files that don't work, they all seem to be EVOLVE encodes, so I'm guessing its something they're encoding with.. Even their mkvmerge ones, so ignore the x264.exe comment above.

Turning off CUVID and trying DXVA or no acceleration at all doesn't do anything either.

I checked evr.log from MediaPortal and compared a working one vs a failing one, here's the major differences..

Working:
16-01-2013 23:27:06.264 [1680]Testing media type...
16-01-2013 23:27:06.265 [1680]Successfully cloned media type
16-01-2013 23:27:06.265 [1680]Time Per Frame: 33.367 ms
16-01-2013 23:27:06.265 [1680]Setting MFVideoTransferMatrix_BT709
16-01-2013 23:27:06.265 [1680]MF_MT_INTERLACE_MODE: 2
16-01-2013 23:27:06.265 [1680]MF_MT_FRAME_RATE: 29.970 fps
16-01-2013 23:27:06.265 [1680]Frame size: 1280x720
16-01-2013 23:27:06.265 [1680]Aperture size: 0:0, 1280x720
16-01-2013 23:27:06.265 [1680]New media type successfully negotiated!
16-01-2013 23:27:06.265 [1680]Getting aspect ratio 'DirectShow style'
16-01-2013 23:27:06.265 [1680]New format: 1280x720, Ratio: 16:9

Failure:
16-01-2013 23:27:43.585 [1680]Testing media type...
16-01-2013 23:27:43.585 [1680]Successfully cloned media type
16-01-2013 23:27:43.586 [1680]Time Per Frame: 33.367 ms
16-01-2013 23:27:43.586 [1680]Setting MFVideoTransferMatrix_BT601
16-01-2013 23:27:43.586 [1680]MF_MT_INTERLACE_MODE: 2
16-01-2013 23:27:43.586 [1680]MF_MT_FRAME_RATE: 29.970 fps
16-01-2013 23:27:43.586 [1680]Frame size: 1276x718
16-01-2013 23:27:43.586 [1680]Aperture size: 0:0, 1276x718
16-01-2013 23:27:43.586 [1680]New media type successfully negotiated!
16-01-2013 23:27:43.586 [1680]Getting aspect ratio 'DirectShow style'
16-01-2013 23:27:43.586 [1680]New format: 1276x718, Ratio: 88672:49901

There's some odd looking resolutions and ratios in that failing one, and I notice some changes related to cropping in LAV v0.55? I don't see any other obvious looking errors though

Edit: full evr logs at https://dl.dropbox.com/u/38877106/tmp/evr_fail.log and https://dl.dropbox.com/u/38877106/tmp/evr_working.log

nevcairiel
17th January 2013, 08:28
Plays just fine for me with DXVA2 Native, Software or QuickSync. I only tested in MPC-HC with LAV as the MKV splitter, because MP is terrible to test in.
The resolution is a bit odd, but shouldn't be any problem. Its just 1280x720 with a bit cropping right and bottom.