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

nevcairiel
13th September 2011, 17:08
Thanks, but my main problem is getting that into a PC. I don't think they like living alongside a NVIDIA card in the same system.

Now that would be weird. I have 3 displays connected anyway, right now my main screen on the NVIDIA, and two on the Intel IGP (only 1 on the NVIDIA because connecting 2 with different resolutions causes it to get stuck in 3D performance mode)
But having 1 on the ATI, one on the Intel and one on the NVIDIA would probably just break my system. :D

Anyhow, a 6450 is really cheap, its not like i couldn't afford it or don't want to spend it, its just i don't know how to setup a working dev environment without setting up a whole new system for it (i have the components, just don't feel like running a second dev system)
If i work on it some day, i might just get one and see if my system really breaks.

HeadlessCow
13th September 2011, 17:50
I run my PC with an ATI card as the main display and an nVidia card (with no monitor attached) for CUDA stuff. Doesn't give me any problems.

pankov
13th September 2011, 21:37
Guys,
today I tried to bistream some DTS in WAV and sadly it didn't work. It either crashed the player (tested with Zoom Player, MPC-HC and Graph Studio) or resulted in some strange noise clicks in the speakers connected to the receiver (Integra DTR-40.3).
Strangely it worked a few times but only if I start the playback without bitstreaming and enable it afterwards in LAV Audio's config.
Is this problem happening only to me or there is some kind of general limitation? If it's not possible to make it work is it at least possible to make it not crash the player?
I have absolutely no problems with such files if I decode the stream with LAV Audio and then send it as multichannel PCM over the HDMI output of my video card.

Anybody?

SEt
13th September 2011, 23:11
LAVVideo.cpp :
// No Stride Request? We're ok with that, too!
No, not really. Guess what will happen here:
pBIH->biWidth = size / pBIH->biHeight * 8 / pBIH->biBitCount;
with negative height for RGB32? We'll get nice negative biWidth !

mkanet
14th September 2011, 01:19
Hi Nevcairiel. You were so kind to help me in with looking for a good single-slot Nvidia based card for an HTPC on AVS Forum. I really appreciate your help.

One of the biggest problems I have; and, the reason why I'm looking for a new Nvidia card is VC1 hardware acceleration. I could never get perfectly fluid, smooth frame rate with VC1 1080p/720p video (like I can with H.264 decoding).

I know this might be a ridiculous thing to ask, but have you considered making a universal "HD" video decoder that can handle both VC1 and H.264? Or, possibly just a standalone VC1 decoder? Maybe you might be able to handle VC1 better than other decoders.

I dont know if you know anything about Netflix Silverlight HD streaming; but I have a strong suspicion it uses the Windows DMO decoder as well; since video playback isn't smooth for it either. There are a lot of people who have this problem as well. If you were to make a VC1 decoder, is there any chance it could take the place of the decoder Netflix uses? I know that would make a lot of people happy.

Anyway, thank you for all your hard work.

-Michael

Andy o
14th September 2011, 02:30
Isn't LAV CUVID what you're looking for?

NF has never been smooth on any of my PCs, I don't think it's the decoding, progressive VC-1 decoding is trivial in most modern PCs. It's just a crap implementation. Not even on the PS3 it's perfectly smooth, but it's close on closed systems like it and for instance, iOS.

mkanet
14th September 2011, 03:11
Oh wow, I didnt know that LAV CUVID handles VC1. I never could get LAV CUVID to work on my PC. I'll try it again when I install a clean OS; and, hopefully with a display card that does full VC1 hardware decoding and newer CUDA support. Thanks!

Isn't LAV CUVID what you're looking for?

NF has never been smooth on any of my PCs, I don't think it's the decoding, progressive VC-1 decoding is trivial in most modern PCs. It's just a crap implementation. Not even on the PS3 it's perfectly smooth, but it's close on closed systems like it and for instance, iOS.

nevcairiel
14th September 2011, 07:31
with negative height for RGB32? We'll get nice negative biWidth !

Stupid RGB with its negative height. I'll apply a abs() around it, thanks for noticing.
Luckily, renderes always handle this properly and send a stride request, it would only fail for post-processing filters, i guess.

betaking
14th September 2011, 07:42
ffmpeg supports DXVA2 decoding by itself now, no hacking required. All thats needed is adding header-parsing for interlaced frames/fields, so that the correct information can be passed to the DXVA functions.

The MS decoder of course supports interlaced VC-1, however you cannot use DXVA outside of WMP.

in vista!
chanage [HKEY_CURRENT_USER\Software\Microsoft\Scrunch\WMVideo]
"DXVA"=dword:00000000
to
[HKEY_CURRENT_USER\Software\Microsoft\Scrunch\WMVideo]
"DXVA"=dword:00000001
in windows7
[HKEY_CURRENT_USER\Software\Microsoft\Scrunch\WMVideo]
"DXVA1"=dword:00000000
to
[HKEY_CURRENT_USER\Software\Microsoft\Scrunch\WMVideo]
"DXVA1"=dword:00000001
other directshow player can use WMVDECOD.DLL(DXVA and interlaced) decoder VC-1!

Chillgurke
14th September 2011, 08:31
Hi Nev,

seems like that i have a small problem with LAV Audio. Yesterday i watched SKY HD Sport. So it should be Dolby Digital. During the football game i have a constant loudness output level. During the halftime they showed some advertising. Then the loudness output level was also constant. But after they switched back to the game the loudness output level was really quietly. After stopping Timeshifting and tuning in the channel again gave the same output as before.

Im using MediaPortal with your latest splitter / Audio and LAV CUVID. And my AMP is only connected via analoge cabel.

I only can imagine, that during the advertisment they changed the Audio-Signal. Maybe from Dolby Digtal to something else.

Are there any known drawbacks to you Splitter or Audio which could cause this problem ?

CruNcher
14th September 2011, 10:26
@nev
could you take a look @ this and why it fails on EVR custom with Lav Splitter (evil tree.ts) :(
http://forum.doom9.org/showthread.php?p=1526099#post1526099

it works perfectly now (perfect telecined 23.97 without manual correction) with MPC-HC splitter + ffdshows-quicksync (send interlaced flags both on auto) and every other Interlaced stream gets properly double framerate deinterlaced, but with lav splitter it fails :(

Hmm could this have something todo with the fact that the Internal splitter is not going over File Source Async ?

Thats it it also fails with MPC-HC Splitter not as source running over File Source Async :)

File Source Async though fails only with this (wrong) stream it seems the others work

Andy o
14th September 2011, 11:46
Nev, is there a particular reason wma pro audio is being output in FP32? This makes ReClock's WASAPI mode not work with HDMI cards. Other lossy formats like DTS are apparently output at 24-bit.

nevcairiel
14th September 2011, 12:00
Nev, is there a particular reason wma pro audio is being output in FP32? This makes ReClock's WASAPI mode not work with HDMI cards. Other lossy formats like DTS are apparently output at 24-bit.

ffmpegs decoder outputs alot of lossy formats as FP32, because thats the native format of the decoder. This includes AAC, AC3, MP1/2/3, DTS and Vorbis, and maybe some others.

DTS is only output as 24-bit if you're using the ArcSoft decoder.

I also have no issues with ReClock WASAPI over HDMI with FP32 audio. Make sure its set to always output 24-padded-to-32

Andy o
14th September 2011, 12:10
Yeah, it's set like that, I double checked cause I thought it could be that too. Maybe some ReClock registry setting got stuck.

nevcairiel
14th September 2011, 12:34
WMA Pro may be another issue though. the ffmpeg decoder does some odd things, and i've had some issues before - especially if its low sample rates like 22050 or so.
I disabled the WMA support on my HTPC, using the MS decoders.

Andy o
14th September 2011, 12:35
It wasn't that, could you see if you can play this file in exclusive mode with LAV audio? Originally it was a wmv container, I used asfbin to cut it.

http://www.multiupload.com/EJXVC1ZWUQ

EDIT: I meant it wasn't ReClock's settings, apparently. It's probably weird stuff like you say. The MS decoder is working well, but can it do multichannel audio? I recall that there was some trick one had to do with graphstudio. If you notice the file above, it's supposed to be 5.1 but plays only two channels. Maybe it's just a super crappy encode.

Helios61
14th September 2011, 13:19
in vista!
chanage [HKEY_CURRENT_USER\Software\Microsoft\Scrunch\WMVideo]
"DXVA"=dword:00000000
to
[HKEY_CURRENT_USER\Software\Microsoft\Scrunch\WMVideo]
"DXVA"=dword:00000001
in windows7
[HKEY_CURRENT_USER\Software\Microsoft\Scrunch\WMVideo]
"DXVA1"=dword:00000000
to
[HKEY_CURRENT_USER\Software\Microsoft\Scrunch\WMVideo]
"DXVA1"=dword:00000001
other directshow player can use WMVDECOD.DLL(DXVA and interlaced) decoder VC-1!

Hi betaking!

Thanks for the hint, but here in WIN7/32 i can't find [HKEY_CURRENT_USER\Software\Microsoft\Scrunch\WMVideo]


Best regards

Helios

nevcairiel
14th September 2011, 13:25
From the MSDN directly:

Note If the \\HKEY_CURRENT_USER\Software\Microsoft\Scrunch registry key does not exist on your computer, you can create it manually.

Note When running an encoder application in WOW64 mode on 64-bit Windows operating systems, the registry settings will need to be stored in the 32-bit equivalent node \\HKEY_CURRENT_USER\Software\Wow6432Node\Microsoft\Scrunch.

However, i had no luck with the DXVA setting.

CruNcher
14th September 2011, 14:01
From the MSDN directly:


However, i had no luck with the DXVA setting.

DXVA will not be accepted for certain bitstreams such as WMVA inside .wmv
the best results in multipurpose playback so far i had with Potplayers DXVA Framework and Arcsofts Decoder (on different hardware now) both try to play everything with DXVA (WMVA,WMV3, VC-1) except WMV1,2 there you have to fallback to Software Libavcodec or Microsoft :)
Some WMV3 bitstreams also don't work @ all and fail on Hardware though completely, even some very old ones released far far ago by Microsoft (2002) ;)

Though even Lav Video fails with them only Microsofts Decoder decodes them 100% correct

mrcorbo
15th September 2011, 00:25
It wasn't that, could you see if you can play this file in exclusive mode with LAV audio? Originally it was a wmv container, I used asfbin to cut it.

http://www.multiupload.com/EJXVC1ZWUQ

EDIT: I meant it wasn't ReClock's settings, apparently. It's probably weird stuff like you say. The MS decoder is working well, but can it do multichannel audio? I recall that there was some trick one had to do with graphstudio. If you notice the file above, it's supposed to be 5.1 but plays only two channels. Maybe it's just a super crappy encode.

FWIW, that file plays fine in WASAPI exclusive mode w/ LAV audio here. ReClock shows 48000hz, 6 channels, PCM IEEE Float for audio input.

Andy o
15th September 2011, 01:28
On an HDMI device? If not, which device?

mrcorbo
15th September 2011, 01:42
On an HDMI device? If not, which device?

Yes. Radeon HD 6970.

Andy o
15th September 2011, 01:47
That's what ReClock is outputting though, right (what it indicates as "audio stream")? Not input. That's weird cause the AMD driver also isn't supposed to accept 32fp, you can confirm this by outputting 32fp manually with ReClock, you'll get an error message. I think there's something strange going on, cause when I played that file outputting 24-padded-to-32, I also got PCM IEEE as "audio stream" and no sound, but also no error message. The MS decoder works fine though.

mrcorbo
15th September 2011, 02:36
That's what ReClock is outputting though, right (what it indicates as "audio stream")? Not input. That's weird cause the AMD driver also isn't supposed to accept 32fp, you can confirm this by outputting 32fp manually with ReClock, you'll get an error message. I think there's something strange going on, cause when I played that file outputting 24-padded-to-32, I also got PCM IEEE as "audio stream" and no sound, but also no error message. The MS decoder works fine though.

No, that's not what it's outputting. That's the input. Try different sources and check for yourself. Just to be sure, I added the ffdshow audio processor to the playback chain and checked different output formats in the filter while playing that file. 16, 24, 32i and 32fp all worked fine and the audio stream info changed as the output coming from the ffdshow audio processor changed.

Andy o
15th September 2011, 02:57
Right, I got confused. Don't know what's happening then, maybe with NV it just doesn't work.

nevcairiel
15th September 2011, 06:34
I think its related to the silent stream bug. If the buffer isnt full enough,the hdmi connection might be lost. And something odd is going on with the output buffering with the wma decoder. It outputs odd sample sizes.

bur
15th September 2011, 08:45
I was trying LAV audio and compared the output of a 6 channel ac3 to ffdshow. I have 2.0 speaker configuration with onboard 24bit soundchip (RealTek ALC662) and Win 7.

LAV:
Channels: 6
nBlockalign: 24
AvgBytesPerSec: 115200
Frequency: 1.0

ffdshow
Channels: 2
nBlockalign: 6
AvgBytesPerSec: 288000
Frequency: 4.0

Both at 48kHz and using Extensible Wave Format.

Is there any way to make LAV output the audio with 2 channels? Does it even matter?

And what is the cause and result of the other discrepancies? I couldn't find an explanation for Frequency, but noticed that in both cases Frequency * nBlockAlign = 24. Is there any meaning to that?

I also saw that both output as 32bit FP. I found a thread here saying INT would be the better choice. Is that so and then why are both not using it? And is the 32bit output in my case any use (maybe during processing) because I guess DirectSound will cut it down to 24bit for output anyway.

Pix
15th September 2011, 09:56
Is there any way to make LAV output the audio with 2 channels? Does it even matter?

I've got the same problem. Yes it matters. If you try to output a 6ch audio to 2ch setup the sounds are just too quiet.
I've tried using different audio decoders and when they output 6ch to 2ch setup --> they output 2 channels. The sound is louder and easier to hear(at least for me).

nevcairiel
15th September 2011, 10:00
If you're on Windows 7, the default DirectSound mixer will do a pretty good job at downmixing your audio to your actual number of channels (assuming you told Windows that you only have 2 channels). On WinXP, the mixer is rather bad, and this will not give you any useful result.

Being able to down-mix with LAV Audio is a planned feature, however the priority isn't all that high.

Pix
15th September 2011, 10:13
Yes. I'm on Win7. I did the Control Panel --> Sound --> 2ch setup. But I just always see the 6ch output but it seems it should be like that, right?

So, I should just use the System Default audio renderer(with LAV Audio decoder)?

Because, voice channels are sometimes hard to hear and the environment/music volume is too high most of the time.

I think I've watched Inception and the soundtrack, which plays through the entire movie, got so irritating I couldn't finish the movie without fixing the problem. I couldn't hear the things they were saying.

hoborg
15th September 2011, 10:20
I have the same problem. If i use old analog stereo speakers, sound is downmixed by WinXP muxer correctly to stereo, but if i use HDMI connection to my TV, some channels are nearly muted, make it useless.

bur
15th September 2011, 10:27
Being able to down-mix with LAV Audio is a planned feature, however the priority isn't all that high. Ok thanks. And about the other settings like ByteAlign is there any reason they differ?

BeNooL
15th September 2011, 10:44
I run my PC with an ATI card as the main display and an nVidia card (with no monitor attached) for CUDA stuff. Doesn't give me any problems.

Same here. Windows 7 handles that real easy.

nevcairiel
15th September 2011, 10:48
Ok thanks. And about the other settings like ByteAlign is there any reason they differ?

Different number of speakers give different alignment.

Bits per Sample * Channels / 8 = Align.

You really shouldn't worry about that, its all working as it should.

bur
15th September 2011, 14:54
You really shouldn't worry about that, its all working as it should. I'm not worrying just curious. So the alignment says after how many bytes the next samples starts. Good to know. ;)

Rectal Prolapse
15th September 2011, 16:25
Hi - how does the LAV Filters handle subtitles in m2ts? Does it render them? If not, who does it connect to? I am seeing some odd behavior where it appears to render incorrectly use LAV Splitter compared to internal and I'm trying to figure out the problem.

I am using a 2 month old MPC-HC with only LAV Splitter, LAV Audio, and LAV CUVID installed. This could be an MPC-HC internal subtitle renderer bug that just behaves differently when connected to LAV Splitter - but probably more noticeable with LAV Splitter than internal (ie. buffering is different).

Rectal Prolapse
15th September 2011, 16:34
Ok I did some googling around and it appears to be an intermittent bug that won't be fixed by the main mpc-hc devs. My guess is it is 100x worse using LAV Splitter. What renderer do you recommend that isn't fubared like the internal one?

Reference: http://sourceforge.net/apps/trac/mpc-hc/ticket/48

nevcairiel
15th September 2011, 16:51
You can try ffdshow, but i'm not sure its really that much better of a sub renderer...

Andy o
15th September 2011, 18:29
Same here. Windows 7 handles that real easy.

So, you can use the AMD display with AMD HDMI audio, and use a CUDA decoder like LAV CUVID, with its hardware deinterlacing?

nevcairiel
15th September 2011, 18:31
So, you can use the AMD display with AMD HDMI audio, and use a CUDA decoder like LAV CUVID, with its hardware deinterlacing?

You can, but you wont get the highest quality deinterlacing. For the best, you need D3D Interoperability, which is only available if a display is connected.

Andy o
15th September 2011, 19:13
I haven't found that I need true deinterlacing yet for the content I watch. I'm mainly using it for IVTC, and there should be no quality difference there, right?

nevcairiel
15th September 2011, 19:14
Who knows how the driver behaves.

Btw, if IVTC is really all you need, could as well do that through AVISynth as well, when you're loading it already for decimation anyway.

CruNcher
15th September 2011, 19:30
You can, but you wont get the highest quality deinterlacing. For the best, you need D3D Interoperability, which is only available if a display is connected.

And copy the framebuffer over to the other card ;)

mindbomb
15th September 2011, 20:40
Being able to down-mix with LAV Audio is a planned feature, however the priority isn't all that high.

just curious - when it is added, is the downmix processing going to happen in 64 float like it does in eac3to?

or in other words, is it going to be superior even to windows mixer and ffdshow?

e-t172
15th September 2011, 20:46
64-bit float processing for audio is way overkill (except, maybe, for some insanely complex filter combinations). 32-bit float is sufficient. There's not "superior" way of downmixing, just correct and incorrect ones.

Andy o
15th September 2011, 21:35
Who knows how the driver behaves.

Btw, if IVTC is really all you need, could as well do that through AVISynth as well, when you're loading it already for decimation anyway.

I just couldn't find anything that did it very well, even DScaler had glitches on DVD content.

Moti172
15th September 2011, 22:11
Hi

Since my HTPC is based on i5 core 2400 (Without "external" GPU), I must relay on software decoding (no madvr or DXVA for me...)
Does Lav-Video can improve the quality of HD-movies (x264), over ffdshow video decoder? If so, what are the recommended setting?

Thanks

Superb
15th September 2011, 23:03
Hi

Since my HTPC is based on i5 core 2400 (Without "external" GPU), I must relay on software decoding (no madvr or DXVA for me...)
Does Lav-Video can improve the quality of HD-movies (x264), over ffdshow video decoder? If so, what are the recommended setting?

ThanksH.264 decoding produces the exact same picture no matter which decoder you use. It's designed this way. You should see absolutely no difference, assuming the decoder is working properly (of course).

mindbomb
15th September 2011, 23:04
if you are not using madvr, you want to uncheck everything but rgb32, and check "use high quality format conversions"

so it will improve the quality of your movies if you configure it like that.

btw, have you tried madvr configured for bilinear scaling? it might work on your intel hd2000.

Moti172
16th September 2011, 02:32
I tried madvr bilinear scaling (the movie is 720p) + lav splitter and lav video, the GPU load is about 40% and the CPU load about 20%.
I guess it should be o.k.
Is it suppose to be better than evr (bicubic) + lav splitter and lav video?

Thanks a lot