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 509 510 511

andyvt
2nd August 2012, 18:55
If you don't want to use a specific filter, just unregister it? :)

It would break the application that uses it.

nevcairiel
2nd August 2012, 19:12
Lower the merit then, so its not used unless directly requested?

I don't think its the splitters job to do graph-construction related decisions.

andyvt
2nd August 2012, 19:21
Lower the merit then, so its not used unless directly requested?


It's a preferred filter in the process, so merit doesn't come into play.

The use case is WMC + the MS Audio Decoder. I can't make it not load w/o breaking TV, but it likes to connect to lav for files where I would prefer lav audio.


I don't think its the splitters job to do graph-construction related decisions.

I wholeheartedly agree in concept, but reality is a bitch.

TBC, I wasn't asking you to do the work, just if I did it and submitted a patch if it would be considered. Obviously I don't need approval to run it locally, but since my git skills are crap I was hoping to avoid having to continuously merge in your changes.

mzso
2nd August 2012, 21:15
I had decoding speed issues with the test version of a an interlaced TS file. Jerkyness or slow motion, depending on renderer. I use CUVID, with adaptive interlacing and doubling mode. Reinstalling old version fixed the problem.


General #8900
ID : 8900 (0x22C4)
Complete name :
Format : MPEG-TS
File size : 5.68 GiB
Duration : 1h 27mn
Overall bit rate mode : Variable
Overall bit rate : 9 299 Kbps
Video #391
ID : 391 (0x187)
Menu ID : 1591 (0x637)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : 27
Duration : 1h 27mn
Bit rate : 8 586 Kbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.166
Stream size : 5.25 GiB (92%)
Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177
Audio #491
ID : 491 (0x1EB)
Menu ID : 1591 (0x637)
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Muxing mode : ADTS
Codec ID : 15
Duration : 1h 27mn
Bit rate mode : Variable
Bit rate : 251 Kbps
Minimum bit rate : 6 000 bps
Maximum bit rate : 283 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Delay relative to video : -1s 275ms
Stream size : 157 MiB (3%)


Edit: So now after restart and reisntalling again there is no problem. Looks like I hit the (unidentified) transient problem where the video plays back jerkily for seemingly no reason.

Boltron
3rd August 2012, 02:36
Nev, I ran your test version LAVFilters-...5-g17143fc.zip and I have encountered a problem I have never had before. After about 25 minutes of play, playback just locks up very hard. This never happened before. I am running MC17 with Lav and madVR on Win7 64 but I use you x86 package. I am watching a 720p TV show.

I can't say for sure that you test version is the cause, but just to repeat, I have never had a lock up like this. I will put 51.3 back and see if the issue reoccurs.

noee
3rd August 2012, 02:40
Same problem here, but only after a seek, with MC17, MC18 and MPC-HC. But I just built the latest git and it's working as expected again.

ryrynz
3rd August 2012, 02:59
Just throwing this out there.. Nev would you add Avisynth scripting support if enough users contributed payments to implement it? Also, who here would be interested enough in this feature that you would consider funding the development of it? Cheers.

nevcairiel
3rd August 2012, 06:47
Nev, I ran your test version LAVFilters-...5-g17143fc.zip and I have encountered a problem I have never had before. After about 25 minutes of play, playback just locks up very hard.
Same problem here, but only after a seek, with MC17, MC18 and MPC-HC.

I found a potential race condition resulting in a deadlock in the revised threading code in the last test version, which could possibly cause this.

Here is a new version:
x86: http://files.1f0.de/lavf/LAVFilters-0.51.3-18-g840eda7.zip
x64: http://files.1f0.de/lavf/LAVFilters-0.51.3-18-g840eda7-x64.zip

nevcairiel
3rd August 2012, 07:25
Just throwing this out there.. Nev would you add Avisynth scripting support if enough users contributed payments to implement it?

If only money could buy additional time to do it. I have a full-time job, and all the time that remains is not for sale. :p

I'm not ruling it out completely, it may happen eventually, but i had a brief look at the AviSynth API a while ago, and it seemed rather horribad, so motivation quickly faded.

mzso
3rd August 2012, 08:16
If only money could buy additional time to do it. I have a full-time job, and all the time that remains is not for sale. :p

I'm not ruling it out completely, it may happen eventually, but i had a brief look at the AviSynth API a while ago, and it seemed rather horribad, so motivation quickly faded.

How about an own scripting for LAV? :D (Guess it would be even more work)

Paladin77
3rd August 2012, 08:41
Hey Nev. Just dropped by to say thank you for the great work you put forth towards LAV filters. I have recently upgraded my system to the one shown in my signature. I am using the DXVA copyback method using madVR as a render and everything is running fine :) Just quick question though. in AMD catalyst there are a barrage of settings pertaining to quality like edge enhancements and NR. I looked around and there seems to be alot confusion and debate as to whether to keep these settings on or off. Would like to get some insight from you if that is possible.

Kind regards.

nevcairiel
3rd August 2012, 08:43
My personal opinion is to turn all post-processing off. Most of the options won't affect madVR anyway (unless you're deinterlacing in madVR), but to be safe i would turn them off - unless of course you like all this post-processing junk. :p

ryrynz
3rd August 2012, 09:01
If only money could buy additional time to do it. I have a full-time job, and all the time that remains is not for sale. :p


Damn you Diablo III.


I'm not ruling it out completely, it may happen eventually, but i had a brief look at the AviSynth API a while ago, and it seemed rather horribad, so motivation quickly faded.


Any chance of just pulling things from ffdshow? Would make things easier maybe? (Although you'd still have to get your hands dirty, I've heard ffdshow code is little messy)

unless of course you like all this post-processing junk. :p

Hey now... :p

nevcairiel
3rd August 2012, 09:02
Damn you Diablo III.
I'm actually not playing much anymore, most of the time i actually spend using LAV for watching movies. :P

Any chance of just pulling things from ffdshow? Would make things easier maybe? (Although you'd still have to get your hands dirty, I've heard ffdshow code is little messy)
I briefly looked at that too, but its not only a little messy, but really messy. Would still be a significant effort to port that somehow.

ryrynz
3rd August 2012, 09:32
most of the time i actually spend using LAV for watching movies. :P


Nice, nothing quite like seeing your own handiwork in action.


Would still be a significant effort to port that somehow.

Will just have to wait it out then, I could poke Haruhiko to maybe creating a branch and look at porting some stuff over, that would be very very cool.

JohnnyFu
3rd August 2012, 09:36
During evaluation of h264 software decoders we realized we cannot decode four h264 streams at the same without violating our software specification requirements for CPU load.

LAV filters are totally new to me, is LAV Video Decoder capable to make use of kind of hardware acceleration when decoding two, three or four h264 video streams at the same time for all decoding processes?

Kurtnoise
3rd August 2012, 10:14
Why not testing by yourself and see what happens ?

kitame
3rd August 2012, 13:24
How about an own scripting for LAV? :D (Guess it would be even more work)

i second this idea, native interpolation script at specific refresh rates would be something fascinating.

DragonQ
3rd August 2012, 13:34
Being able to access hardware deinterlacing for re-encoding would be nice. Every piece of software I've tried that supposedly supports this (admittedly it was probably only 2 :p) didn't work. Failing that, I tried to find software that would resize and re-encode interlaced material as without de-interlacing but I couldn't find any of those either. :(

Pat357
3rd August 2012, 14:54
Being able to access hardware deinterlacing for re-encoding would be nice. Every piece of software I've tried that supposedly supports this (admittedly it was probably only 2 :p) didn't work. Failing that, I tried to find software that would resize and re-encode interlaced material as without de-interlacing but I couldn't find any of those either. :(

I know at least 2 solutions that are working (tried/used both myself) :
1) DGdecNV
2) LAV in Cuvid mode with DirectShowSource and .GRF files (with graphstudioNext).

Boltron
3rd August 2012, 16:22
I found a potential race condition resulting in a deadlock in the revised threading code in the last test version, which could possibly cause this.

Here is a new version:
x86: http://files.1f0.de/lavf/LAVFilters-0.51.3-18-g840eda7.zip
x64: http://files.1f0.de/lavf/LAVFilters-0.51.3-18-g840eda7-x64.zip

Looking good so far. I have left a couple movies play with no issues.

Pat357
3rd August 2012, 18:22
Nev,

Congrats with the conversion to worker-threads for all Libav decoders. It seems it went with considerably less pain than the MS DMO decoder at that time ;)

nevcairiel
3rd August 2012, 18:24
Well all the plumbing was already finished and tested, so it was easier. :p

kitame
3rd August 2012, 20:20
curious, how would this affect playback on dual core PCs, would there be any visible improvements?
also at the moment which splitter is more efficient, lav's or haali's?

fastplayer
4th August 2012, 11:31
I've noticed image and sound corruption at the end of this clip (http://www.sendspace.com/file/gl3wep) with the latest test build (g840eda7). 0.51.3 seems to be fine though.

RealSnoopyDog
4th August 2012, 11:38
Hi nevcairiel, the latest test build works perfect for me, no problems with live tv or file playback (h.264/vc1/mpeg2/mp4)!

Is it possible to add the output configuration "Mono" to the audio downmixer?

nevcairiel
4th August 2012, 12:16
I've noticed image and sound corruption at the end of this clip (http://www.sendspace.com/file/gl3wep) with the latest test build (g840eda7). 0.51.3 seems to be fine though.

Thanks, fixed.


Is it possible to add the output configuration "Mono" to the audio downmixer?
I'll add it for the next version.

RealSnoopyDog
4th August 2012, 12:27
Great :) Thank you

fagoatse
5th August 2012, 23:27
Hmm, I've just updated to 0.51.3 840eda7 and noticed that dxva2 native no longer works, it say so No DXVA in OSD. CB works just fine though. When trying to use native it says active codec: avcodec while in CB it says dxva2-cb. No idea whats going on, I've updated gpu drivers, mpc-hc janwillem's fork and added xy-vsfilter, all at the same time so I guess it's not necessarily lavf's fault. Any clues though?

also noticed that in OSD under decoder it says DirectVobSub : S wtf, im quite certain it used to say Lav Video before.

Keiyakusha
6th August 2012, 00:00
If you want native DXVA to work - remove vsfilter. Any in-between filters are not allowed.
EDIT: On the other hand. I don't know any reasons to use native DXVA. Do you know any?

The Seeker
6th August 2012, 01:16
EDIT: On the other hand. I don't know any reasons to use native DXVA. Do you know any?

Masochism?

ajp_anton
6th August 2012, 03:39
On the other hand. I don't know any reasons to use native DXVA. Do you know any?Desperate prolonging of battery life.

DragonQ
6th August 2012, 10:08
I use DXVA native on my laptop because it uses less CPU and generates less heat. I use DXVA Native on my HTPC because it uses less energy (thus cheaper).

kitame
6th August 2012, 12:28
^ i dunno, with intel's sandy pentium and celeron consuming barely >40watt i doubt a loaded cpu is an issue >,>

PS: loaded and idle power consumptions on these cpus arent that far apart, a loaded GPU would've contributed more wattage to the total system power consumption, just sayin.
edit: btw check out G440's power consumption levels being compared to an amd E350. http://www.xbitlabs.com/articles/cpu/display/celeron-g540-g440_8.html#sect0

ajp_anton
6th August 2012, 13:55
My desktop SNB i7 computer uses 20W more with software decoding than when idle. This feels like a worst case scenario.
This results in an additional cost of about 0.01€ per movie.

So the only reasons I see are heat and battery life.

nlnl
6th August 2012, 14:13
Hardware deinterlacing needs native DXVA (if you do not prefer Madvr :))

nevcairiel
6th August 2012, 14:30
Hardware deinterlacing works with any kind of decoder, you just need to make sure you output NV12 to the renderer. It works just fine with all decoders LAV offers, as well as both EVR and madVR (and probably even VMR-9)

The "myth" that hardware deinterlacing also needs hardware decoding is just wrong.

Keiyakusha
6th August 2012, 14:32
Don't know about AMD but Intel's processors don't consume maximum power they can when decoding video. They run at half clock maximum and this doesn't consumes more power. Plus they have their own quicksync stuff, plus I doubt it consumes less power than DXVA CB, the actual chip on the GPU does exactly the same job.
My quesion is not "why use dxva" but "why use native dxva"
Hardware deinterlacing sounds like the only good reason.

UPD: never mind, didn't saw nev's response about deinterlacing

SeeMoreDigital
6th August 2012, 14:44
Hi Nev,

Is there any chance you could add a Opus audio decoder filter?

nevcairiel
6th August 2012, 17:29
Is there any chance you could add a Opus audio decoder filter?

If you can provide a sample file (or two), i can have a look.

DragonQ
6th August 2012, 17:39
^ i dunno, with intel's sandy pentium and celeron consuming barely >40watt i doubt a loaded cpu is an issue >,>

PS: loaded and idle power consumptions on these cpus arent that far apart, a loaded GPU would've contributed more wattage to the total system power consumption, just sayin.
edit: btw check out G440's power consumption levels being compared to an amd E350. http://www.xbitlabs.com/articles/cpu/display/celeron-g540-g440_8.html#sect0
Dunno if you're referring to me but if so:

- My HTPC (Sandy Bridge + nVidia, see sig) uses 15-20% less power in DXVA mode compared to CUDA (don't have the exact figures here but I wrote them down somewhere).
- My laptop's CPU (Arrandale) is at ~50% when playing a 1080i/25 HDTV recording with software decoding and only ~20% with DXVA. GPU usage is barely any different between the two (again I might be remembering wrongly but it's something like that). Haven't tested power consumption directly but heat output is noticeably lower with DXVA according to my hand. :p

easyfab
6th August 2012, 18:19
Nice idea the opus decoder.

Here is a sample : https://people.xiph.org/~giles/2012/opus/

Keiyakusha
6th August 2012, 18:21
- My HTPC (Sandy Bridge + nVidia, see sig) uses 15-20% less power in DXVA mode compared to CUDA (don't have the exact figures here but I wrote them down somewhere).

Thats true. cuda always reacquires GPU to operate at maximum power state and consumes extra power for whatever it needs to do, while DXVA works at second power state.
I dunno but assuming you not using anything else gpu-intensive like madvr, top GPUs maybe (maybe not) even can manage in 1st power state (like in case when you run only Aero and nothing more).
EDIT: and from my expirience cuda, or actually cuvid results the same speed as dxva cb. So the only reason to use cuda is to decode mpeg4-asp...
In other words for me dxva cb is a clear winner in all categories.

DragonQ
6th August 2012, 19:11
I did try an application to force the GPU into the "medium" power mode for CUDA but it turns out the GT430 can't handle that. DXVA works fine though so no big deal. :)

SeeMoreDigital
6th August 2012, 19:13
If you can provide a sample file (or two), i can have a look.
Here you go for the first one: http://www.sendspace.com/file/ezi6q3

I generated it using LameXP v4.05 Beta-1 (http://forum.doom9.org/showthread.php?p=1585748#post1585748) from a PCM.WAV file. Currently, the only way I can check how well Opus encodes sound, is to re-encode them back to PCM.WAV

Early indications are that Opus sounds very good at low bit-rates ;)


Cheers

chros
6th August 2012, 19:31
I did try an application to force the GPU into the "medium" power mode for CUDA but it turns out the GT430 can't handle that. DXVA works fine though so no big deal. :)
Have you tried with nvidia inspector through the command line?

Eg. this is put my Geforce 9600M GT into P8 state (this is the 2nd one in the raw):
"D:\Install\Benchmarks\NVIDIA Inspector\nvidiaInspector.exe" -forcePState:0,8

And this is put it back into the auto state:
"D:\Install\Benchmarks\NVIDIA Inspector\nvidiaInspector.exe" -forcePState:0,16

And you can create desktop shortcuts from these, of course, if you want.
I can use the P8 sate to watch 1080p@24Hz and 720p@24Hz content on the fullhd display. If the fps of the media file is bigger (eg. 720p@30Hz), then I have to put the GPU into the Auto state (it uses the max state, P0) for not to get stuttering.

Keiyakusha
6th August 2012, 19:44
I believe on GT4** you can use dxva-cb and madvr without going beyond middle power state. Maybe depends on madvr options I don't remember... (there was no antiringing and stuff when I tried last time) On gt5** I wasn't able to go beyond middle power state so far when watching video. I probably need to plug in heavy fft3dgpu denoiser in my playback chain to do that :P

Reino
6th August 2012, 20:00
Currently, the only way I can check how well Opus encodes sound, is to re-encode them back to PCM.WAVYou can use opusdec.exe of course, but there already is a DirectShow filter with OPUS support.

DragonQ
6th August 2012, 21:15
Have you tried with nvidia inspector through the command line?

Eg. this is put my Geforce 9600M GT into P8 state (this is the 2nd one in the raw):
"D:\Install\Benchmarks\NVIDIA Inspector\nvidiaInspector.exe" -forcePState:0,8

And this is put it back into the auto state:
"D:\Install\Benchmarks\NVIDIA Inspector\nvidiaInspector.exe" -forcePState:0,16

And you can create desktop shortcuts from these, of course, if you want.
I can use the P8 sate to watch 1080p@24Hz and 720p@24Hz content on the fullhd display. If the fps of the media file is bigger (eg. 720p@30Hz), then I have to put the GPU into the Auto state (it uses the max state, P0) for not to get stuttering.
That is the program I used, yes. Desktop shortcuts are way too much hassle when everything works fine in DXVA - MediaPortal just changes the refresh rate according to the content (24/50/60p). I don't think there's any real advantage to using CUDA with that application anyway (doesn't use MadVR, only EVR).

balkerman
7th August 2012, 00:06
LAV Source did not recognise the forced subs in Bluray John Carter. Tried Eng forced and custom in Lav Source. Only way to make them appear was to manually select Eng sub (#23 from memory). Not had this issue since I started using LAV a few years back.