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

robpdotcom
15th November 2011, 00:00
Do you only have the problem if the file is .m2ts? Do mkv files work fine?

dead_screem
15th November 2011, 00:19
I'm not talking about actually decoding the subtitles, all i planned was take the subtitle data, and output it untouched to the subtitle renderer (if any) - and if no-one wants it, just discard it.

Is there any reason why you can't have LAV's MPEG-2 Decoder handle them as DVD subpictures properly instead of relying on an external filter like dvobsub? especially if ffmpeg already supports it?

Midzuki
15th November 2011, 02:51
Is there any reason why you can't have LAV's MPEG-2 Decoder handle them as DVD subpictures properly instead of relying on an external filter like dvobsub? especially if ffmpeg already supports it?

The FFmpeg source-code for dealing with DVD subtitle pictures is not good-enough yet:

http://forum.doom9.org/showthread.php?p=1431125#post1431125

http://forum.doom9.org/showthread.php?p=1431370#post1431370

nevcairiel
15th November 2011, 07:48
Is there any reason why you can't have LAV's MPEG-2 Decoder handle them as DVD subpictures properly instead of relying on an external filter like dvobsub? especially if ffmpeg already supports it?

It certainly could, however is that really wanted?
I guess the quality argument isn't really valid, since DVD subs are ugly no matter what. Being a bit blurry would probably do them some good. :p

Regarding the ffmpeg issues, it would be a perfect opportunity to just fix them, wouldn't it. :)
PS: What you linked seems to refer to ffdshow, which does not use ffmpegs renderer, AFAIK.

The real issue is that the MPC-HC ISR and DirectVobSub don't natively support DVD Subpictures, even though its the same format as VobSub, just without the configuration header. When you force-feed it to them, it'll just be terribly ugly, because it doesn't have a default palette to get colors from.

Another option would be to just do what the MSDN thinks you should do, and render the subtitles, and output them as AYUV or ARGB32, which the renderer then should blend on the image. Sadly, this is only supported by EVR/VMR, and madVR lacks that functionality.

madshi
15th November 2011, 09:21
Another option would be to just do what the MSDN thinks you should do, and render the subtitles, and output them as AYUV or ARGB32, which the renderer then should blend on the image. Sadly, this is only supported by EVR/VMR, and madVR lacks that functionality.
That's on my to do list. Was already requested by the J.River MC16 developers. Of course I don't know when I'll find the time to implement that.

nevcairiel
15th November 2011, 09:40
I'll just go with piping the subtitles through the filter first, and see how it goes. Other options can be explored at a later time.

SeeMoreDigital
15th November 2011, 10:10
Do you only have the problem if the file is .m2ts? Do mkv files work fine?
The same thing happens with .MKV contained files...

I'm off to work now so I'll have to try GraphEdit when I get back....

dead_screem
15th November 2011, 11:00
It certainly could, however is that really wanted?yes. that way you can always be sure it'll work, assuming you implement it right. no worrying about external filter or renderer support.

Another option would be to just do what the MSDN thinks you should do, and render the subtitles, and output them as AYUV or ARGB32, which the renderer then should blend on the image. Sadly, this is only supported by EVR/VMR, and madVR lacks that functionality.
ummm, no. that's only for dvd line 21 cc or other things.
msdn says the dvd decoder should handle and mix video and subpicture together and output one video pin and another cc out pin for line 21 decoder 2, which needs vmr/emr. (or line 21 decoder which uses overlay)
http://msdn.microsoft.com/en-us/library/windows/desktop/dd388593(v=VS.85).aspx

I'll just go with piping the subtitles through the filter first, and see how it goes. Other options can be explored at a later time.well if it works, assuming the dvd navigator will not refuse like that. not exactly the best way to do it imo.

nevcairiel
15th November 2011, 11:15
yes. that way you can always be sure it'll work, assuming you implement it right. no worrying about external filter or renderer support.
I would however prefer not to start adding subtitle rendering, which is why i would prefer to just delegate rendering to a dedicated subtitle renderer.


ummm, no. that's only for dvd line 21 cc or other things.
msdn says the dvd decoder should handle and mix video and subpicture together and output one video pin and another cc out pin for line 21 decoder 2, which needs vmr/emr. (or line 21 decoder which uses overlay)
http://msdn.microsoft.com/en-us/library/windows/desktop/dd388593(v=VS.85).aspx

That article is rather old, probably from the times of VMR7/Overlay mixer, where the new option to alpha-blend streams in the renderer was not available.
MS's own MPEG-2 decoder will render the subtitles into a ARGB or AYUV plane, and send those to EVR - allowing a higher quality and more efficient blending done in the GPU.

dead_screem
15th November 2011, 11:29
That article is rather old, probably from the times of VMR7/Overlay mixer, where the new option to alpha-blend streams in the renderer was not available.
MS's own MPEG-2 decoder will render the subtitles into a ARGB or AYUV plane, and send those to EVR - allowing a higher quality and more efficient blending done in the GPU.

actually it's from xp/vista era vmr9/evr. there is an article about vista dvd enhancements, but nothing about vobsubs that way. is that method new to win7?

nevcairiel
15th November 2011, 11:31
Its not from Vista, or it would at least have mentioned the EVR, which was the new default renderer there, all it talks about is VMR and Overlay, which means XP.
MS's own MPEG-2 decoder also did not exist on XP, you needed a third-party decoder back then AFAIK, so its pretty clear that they didn't really care to add a smart way to handle subtitles.

dead_screem
15th November 2011, 11:46
Its not from Vista, or it would at least have mentioned the EVR, which was the new default renderer there, all it talks about is VMR and Overlay, which means XP.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd388614(v=VS.85).aspx pageabout vista specifics.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd318241(v=VS.85).aspx page about building the graph which mentions Overlay, VMR-7, VMR-9 and EVR.

so yes, it pertains to vista as well.

nevcairiel
15th November 2011, 11:50
All that means is that the one page was updated after Vista release, that does not mean the first page was written with Vista in mind.

In any case, if i ever add rendering of the dvd subpictures, it'll most likely not be soon.
I don't believe the decoder painting onto the video image is a good solution, ever.

madshi
15th November 2011, 12:01
What need is there for discussion if Microsoft's own MPEG2 decoder clearly outputs an additional ARGB/AYUV pin for DVD subpictures? That pretty much tells us what Microsoft thinks is the best way to go. End of story.

Midzuki
15th November 2011, 16:46
PS: What you linked seems to refer to ffdshow, which does not use ffmpegs renderer, AFAIK.


So, my guess is, the MPC-HC filters, libavcodec, ffplay, mplayer, and libmpeg2, they all do share a lot of "garbage source-code" :rolleyes: :D

Superb
15th November 2011, 16:56
The Microsoft DTV-DVD Decoder only outputs the AYUV/ARGB stream if it decodes using DXVA.*
On other cases (software decoding) it renders the subtitles to the frame itself.
But you guys should take into account the fact that MPC-HC doesn't create an input pin for AYUV/ARGB on its EVR/EVR-CP! That's why I cannot watch DVDs w/ subtitles there.
One would have to fix the pins creation if you want to go the AYUV/ARGB way. This issue was reported a LONG time ago on MPC-HC's trac. Can't find the ticket now... :/
EDIT: I think that fixing it requires adding a call to IEVRFilterConfig::SetNumberOfStreams

* I might be mistaken and it always outputs when connected to DXVA-enabled renderer (like EVR), which in turn also activates the MPEG-2 DXVA decoding on my machine.

nevcairiel
15th November 2011, 17:30
So, my guess is, the MPC-HC filters, libavcodec, ffplay, mplayer, and libmpeg2, they all do share a lot of "garbage source-code" :rolleyes: :D

Just because there is one bug with those half-D1 discs doesn't make everything garbage, the avcodec decoder (which is also in use by ffplay) looks pretty clean (code-wise), and fixing such bugs would surely be possible.
If you can, share a sample of those files, so that i can try to avoid the bug when i work on it.

MPC-HCs and ffdshows probably are just garbage, though. =)

SeeMoreDigital
15th November 2011, 17:51
Please do me a favor and give it a go with GraphStudio or GraphEdit this time:

File Source (async) > Lav Splitter > Lav Video > EVR
> Lav Audio > Def. D.Sound

And pls. tell me the result.
Hmmm... I can't get GraphStudio to connect to either of the following audio filters :eek:

http://img840.imageshack.us/img840/4986/graphstudio.png


This is crazy!

nevcairiel
15th November 2011, 19:38
You didn't activate bitstreaming which your hardware does not support?
Thats really the only reason the connection would completely fail.

Midzuki
15th November 2011, 19:39
Come on, Nevcairiel, I didn't say (and I didn't mean) they are 100% garbage, I said (and meant) they still contain many lines of copied-n-pasted b0rked code.

As for the "killer samples" --- it's pretty trivial to create some of them with your favorite DVD-authoring freeware :)

nevcairiel
15th November 2011, 19:42
Come on, Nevcairiel, I didn't say (and I didn't mean) they are 100% garbage, I said (and meant) they still contain many lines of copied-n-pasted b0rked code

Its more likely just some feature not implemented.

As for the "killer samples" --- it's pretty trivial to create some of them with your favorite DVD-authoring freeware
Sure i could do that, but then someone that cares could also try to help out, which might actually make me fix the problem, otherwise i might just ignore it :p

Midzuki
15th November 2011, 19:47
OK, you win. :rolleyes:

SeeMoreDigital
15th November 2011, 20:26
You didn't activate bitstreaming which your hardware does not support?
Thats really the only reason the connection would completely fail.

If you are referring to my posts, I can confirm I have been able to use your filters to bit-stream HD audio to my Onkyo amp... which also supports HD audio!

After further tests, I've found I can't even get "std-def" AC3 and DTS audio to connect to LAV audio...

Gleb Egorych
15th November 2011, 21:02
nevcairiel,

During testing 0.39.15 I found the hang bug had returned (can be reproduced by holding S key in Zoom Player). Release 0.39 seems to be OK.

Pat357
15th November 2011, 21:11
Hmmm... I can't get GraphStudio to connect to either of the following audio filters :eek:
To go back to your problem with LAV-splitter not being used to open .m2ts & .mkv files, can you please check the following keys in your registry :
[HKEY_CLASSES_ROOT\Wow6432Node\Media Type\Extensions\.m2ts]
"Source Filter"="{B98D13E7-55DB-4385-A33D-09FD1BA26338}"
and
[HKEY_CLASSES_ROOT\Wow6432Node\Media Type\Extensions\.mkv]
"Source Filter"="{B98D13E7-55DB-4385-A33D-09FD1BA26338}"

The value "Source Filter={B98D13E7-55DB-4385-A33D-09FD1BA26338} means that lav-splitter-(source) will be used to open .m2ts / mkv files.
If there is another value at this keys, just reinstall the LAV-filters and make sure these types are checked during installation.
IIRC, these values are only written to the registry when installing, not when you check/uncheck these in the Lav-splitter settings tab after installation.

SeeMoreDigital
15th November 2011, 21:12
Well would you "Adam and Eve" it...

After de-installing "LAV", re-booting, re-installing "LAV" and re-booting... I'm now able to bit-stream HD audio to my amplifier again :)

Computers eh?

nevcairiel
15th November 2011, 21:16
During testing 0.39.15 I found the hang bug had returned (can be reproduced by holding S key in Zoom Player). Release 0.39 seems to be OK.

Should hopefully be fixed again.

-----------------------------

Some news from the DVD front:
Accepting and just eating up the subtitles seems to do the job, DVDs play fine now. Did need some trickery though, but all in all, its playing the dvds just fine. It is lacking the interactive menu overlays of course, and subtitles won't show.

Considering the subtitles are used to render the button overlays as well, i'm kinda partial to the idea of drawing them directly onto the frames, in case no renderer accepts the AYUV/ARGB pictures. Forwarding the still encoded subtitles wouldn't work in this case.

Pat357
15th November 2011, 21:41
Well would you "Adam and Eve" it...

After de-installing "LAV", re-booting, re-installing "LAV" and re-booting... I'm now able to bit-stream HD audio to my amplifier again :)
Computers eh?
I guess something messed up your Lav-filters....
Did you install some other multi-media package or other codes after the last time you installed Lav-filters using the installer ?
Does Lav-splitter now get used when you open .m2ts / .mkv files ?

note : uninstalling Lav-filters probably was not needed, just reinstall over the existing installation should have done the trick, as long as you use the installer.

SeeMoreDigital
15th November 2011, 22:08
I guess something messed up your Lav-filters....
Did you install some other multi-media package or other codes after the last time you installed Lav-filters using the installer ?
Just the latest version of DVDFab Decrypter.


Does Lav-splitter now get used when you open .m2ts / .mkv files ?No...

rica
16th November 2011, 02:19
Hmmm... I can't get GraphStudio to connect to either of the following audio filters :eek:

http://img840.imageshack.us/img840/4986/graphstudio.png


This is crazy!

Yes it is, this is why i asked you to use GraphStuff to test.
The weird thing is why we do see speakers instead of blabla AVR in your case?
Checkout my listed audio renderers. Do you see any "speakers" statement? Are you sure Onkyo AVR (or whatsoever you have?) is selected by default on your playback devices? Or just speakers?

http://img21.imageshack.us/img21/7864/59105027.png (http://imageshack.us/photo/my-images/21/59105027.png/)


Not sure your AVR is connected to your PC properly or recognized properly by your PC.

The last test you should do to be sure, pls try this and forget bitstreaming for a while:

http://img208.imageshack.us/img208/2675/51597263.png (http://imageshack.us/photo/my-images/208/51597263.png/)

And last question: why don't you get rid of those Realtek drivers?

_ _

rica
16th November 2011, 03:40
If you are referring to my posts, I can confirm I have been able to use your filters to bit-stream HD audio to my Onkyo amp... which also supports HD audio!

After further tests, I've found I can't even get "std-def" AC3 and DTS audio to connect to LAV audio...

Pls tell us what your problem is?

After i've explored this post i'm not able to make any comment since i understood nothing?
You are able to use lavfilters to bitsream HD audio?
But you can not bitstream SD audio?
But what "even" means here???
I should understand normally "i can not bitsream HD even SD audio".... or what???

What is yor HW? Dunno?
How you connected your unknown AVR to your PC? Dunno?
What is your problem really? Dunno?

nevcairiel
16th November 2011, 07:27
You should learn to read, he said his problem was already fixed.

SeeMoreDigital
16th November 2011, 09:57
Yes my issue has been fixed.

Many, many thanks to everyone who kindly offered help and their suggestions. It's much appreciated.

Thank-you again...

Aleksoid1978
16th November 2011, 13:07
Hi Nevcairiel. LAV Video 0.39 have trouble with playback this sample in Software mode(with CUVID play fine)
http://www.multiupload.com/ZGDZFMT4Q0
play with ~43fps and micro jitter.

0.38 and 0.37 play fine.

nevcairiel
16th November 2011, 13:38
LAV Video 0.39 have trouble with playback this sample in Software mode(with CUVID play fine)
http://www.multiupload.com/ZGDZFMT4Q0
play with ~43fps and micro jitter.


No change in my code would cause this, seems like a ffmpeg regression, if it is indeed a bug. It doesn't say its failing to decode, it just doesn't give any frames back.
I'll try to look into it, but reporting it to them is a good idea no matter what.

Edit: I found the offending commit, its http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=ea2bb12e3e47baa0f8d50ef68be678f425c7e4cf if anyone cares. :p

STaRGaZeR
16th November 2011, 13:59
Another bug report here. This file (SFD, MPEG-1 + ADX) fails to decode smoothly if splitted with LAV Splitter. MPC's internal splitter plays it fine. Screenshots and file:

http://i42.tinypic.com/esnmut_th.png (http://i42.tinypic.com/esnmut.png) http://i43.tinypic.com/zn4n0o_th.png (http://i43.tinypic.com/zn4n0o.png)
LAV Splitter ---------------- MPC's internal

http://www.mediafire.com/?tur04krbed4fdc4

nevcairiel
16th November 2011, 14:44
This file (SFD, MPEG-1 + ADX) fails to decode smoothly if splitted with LAV Splitter. MPC's internal splitter plays it fine.

Fixed locally, thanks for reporting!

mylle
16th November 2011, 14:59
Im going to put in my new GT430 (instead of ATI 5770) today.

Should i just dl the latest driver from Nvidia or is there a preferred driver?

regards
Jacob

nevcairiel
16th November 2011, 15:18
Latest are usually fine.

STaRGaZeR
16th November 2011, 17:52
Fixed locally, thanks for reporting!

No prob, thanks for fixing it :)

joe42
16th November 2011, 18:14
This VC1 clip (from Bleak House) fails to play from MPC-HC when using the LAV Video decoder (also fails with MadVR video decoder). It plays fine with the WMVideo Decoder DMO.

http://www.mediafire.com/?njfncwonawz6pea

nevcairiel
16th November 2011, 18:14
This VC1 clip (from Bleak House) fails to play from MPC-HC when using the LAV Video decoder (also fails with MadVR video decoder). It plays fine with the WMVideo Decoder DMO.

http://www.mediafire.com/?njfncwonawz6pea

Without looking at the file, i guess its interlaced, and thus not supported.

Edit:
After looking at the file, i'm sure its interlaced.
Use the MS decoder. ;)

Gser
16th November 2011, 18:25
I'm curious as to what IDCT LAV video uses to decode MPEG2?

nevcairiel
16th November 2011, 18:51
I'm curious as to what IDCT LAV video uses to decode MPEG2?

Whatever is ffmpegs default IDCT, something they call "simple IDCT"

zerowalker
16th November 2011, 21:32
I canīt play raw x264 files, it just shows a black screen;O
Maybe itīs not supposed to work,. but it said fixed playback in the latest changelog, so sorry if itīs not about that;O

joe42
16th November 2011, 23:25
Without looking at the file, i guess its interlaced, and thus not supported.

Edit:
After looking at the file, i'm sure its interlaced.
Use the MS decoder. ;)

Do you mean the WMVideo Decoder DMO?

Is there a way to set the LAV decoder to only decode non-interlaced VC-1?

Because otherwise it seems kind of useless to include VC-1 decoding at all, since it messes up the filter preferences.

To clarify, if I put LAV Video decoder at the top of the filter list in MPC-HC, so it gets used for anything it can do, then WMVideo Decoder DMO beneath it in the filter list, is there any way that I can set things up so LAV Video decoder handles non-interlaced VC-1, but it automatically lets WMVideo Decoder DMO handle interlaced VC-1?

jmone
16th November 2011, 23:39
No - it is either On or Off for VC-1 decoding & I thought it was off by default in LAVVideo. Another choice is that if you have a nvidia card you can enable CUVID Mode as it handles VC-1(i) perfectly fine. FYI - there were some post a few weeks ago about the addition on VC-1(i) support in libavcodec....

joe42
16th November 2011, 23:43
FYI - there were some post a few weeks ago about the addition on VC-1(i) support in libavcodec....

Where was this post? I searched this thread and did not see it. Do you mean it was in a libavcodec thread?

jmone
17th November 2011, 01:18
Here you go .. no idea if there has been any progress on this code.

I revert all VC-1 patches because the new VC-1i decoding crashes more then it decodes anything, and if it decodes anything its only a corrupted mess - and on top of that, even introduced artifacts in previously working progressive samples.

chaddawkins
17th November 2011, 02:22
@nevcairiel or anyone with the knowledge to do this because i don't

this may help with thumbnail shell extension:
http://blogs.msdn.com/b/codefx/archive/2010/11/07/writing-windows-shell-extension-with-net-framework-4-c-vb-net-part-3-thumbnail-handler.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774614(v=VS.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774618(v=VS.85).aspx

i would give it a go if i knew anything about .NET Framework 4 (C#, VB.NET)
i think this may be what icaros is???