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

huhn
23rd September 2014, 10:31
if it eats shaders, how would it affect those of us that are pushing the limit with madvr?

obvious you can't use it than. hardware decoder are most useful in combination with a weak CPU.

Elbart_
23rd September 2014, 10:49
Should be fixed in the next version.

Thanks!

I found another issue with VPx, this time in the video decoder:

When the height is not modulo 2, the decoder shows a green bar at the bottom. A non-mod2 width is no problem.

http://i.imgur.com/2IgLeoZ.jpg (image made from the vp9-file, but vp8 is also affected)
https://www.mediafire.com/folder/nl0gc7dq6z7e5/LAVVideoDecoder_VPx_modulo_2_%3D_1_green

romulous
23rd September 2014, 11:11
Hi nev,

I added a comment to a closed bug report on your tracker (#479). Assuming you probably didn't get a notification of the addition, was just wondering if you had any assistance you could offer? Comments #5 and #6.

Thanks!

nevcairiel
23rd September 2014, 12:16
I found another issue with VPx, this time in the video decoder:

When the height is not modulo 2, the decoder shows a green bar at the bottom. A non-mod2 width is no problem.

http://i.imgur.com/2IgLeoZ.jpg (image made from the vp9-file, but vp8 is also affected)
https://www.mediafire.com/folder/nl0gc7dq6z7e5/LAVVideoDecoder_VPx_modulo_2_%3D_1_green

They look fine here, might be the video renderer causing the problem.
Note that non-mod2 height with 4:2:0 chroma subsampling is technically an invalid format.

jiayiming
23rd September 2014, 13:25
LAV doesn't support QHD with HSW/HD4600?
ex:http://www.libde265.org/hevc-bitstreams/tos-4096x1720-tiles.mkv
but,the latest pot can play this file..
http://i.imgur.com/IR7lnfv.jpg
--------------------
BTW,HSW also eat shader like Kepler cards?

NikosD
23rd September 2014, 14:14
The clip above plays fine here with both LAV DXVA x86/x64

jiayiming
23rd September 2014, 14:49
The clip above plays fine here with both LAV DXVA x86/x64
thanks,maybe my drivers is too old or some other problem.

mindbomb
23rd September 2014, 18:12
I just heard arcsoft went out of business. This makes software dts-hd decoding more difficult in the future.

nevcairiel
23rd September 2014, 18:40
The decoder still works, doesn't it. Maybe an open source alternative will be available soon as well.

SeeMoreDigital
23rd September 2014, 20:22
I just heard arcsoft went out of business. Something has indeed changed over at Arcsoft... As their TotalMedia Theatre (http://www.arcsoft.com/totalmedia-theatre/?icn=foot&ici=click) media player is stated as being: "no longer maintained and updated"...

vood007
24th September 2014, 15:56
I have a problem when LAVAudio is connected to FFDShow Raw Audio Proc. Playback does not start on mp4 or mkv files. After a first seek forward it starts. Problem exists since LAV Builds around 16. Sep.

NikosD
24th September 2014, 18:37
Is it possible to fix HEVC DXVA2 decoder to fall back to software mode for 10bit HEVC ?

I have tried more than 60 HEVC samples and this little detail is the only incompatibility I have found out.

huhn
24th September 2014, 18:49
i guess this will work in the future.
nearly for sure 4K BD will be 10 bit.
these are currently hybrid decoder without fix function so they can be changed and optimized.

NikosD
25th September 2014, 15:02
Latest nightly (.47) is crashing using DXVAn with both Nvidia and Intel using HEVC DXVA2 decoder.

Copy-back and CUVID are fine.

Also in previous .46 build, when an incompatible GPU is used like GT610 (Fermi), it allows me to select DXVAn with HEVC and use that mode in HEVC files.

When you try to decode it, it uses CPU only.

I saw your fix for fall back in .47 build, maybe you can include this "strange" behavior for non-compatible GPUs too.

wanezhiling
25th September 2014, 15:24
The crash issue was fixed few minutes ago..

So wait for betaking to compile a new build again..:p

nevcairiel
25th September 2014, 15:28
Also in previous .46 build, when an incompatible GPU is used like GT610 (Fermi), it allows me to select DXVAn with HEVC and use that mode in HEVC files.

When you try to decode it, it uses CPU only.

I saw your fix for fall back in .47 build, maybe you can include this "strange" behavior for non-compatible GPUs too.

It already falls back to software decoding just fine if your GPU doesn't support HEVC.

Note that your version numbers are wrong. The latest now is 0.62-52, the one that crashed was -50.

NikosD
25th September 2014, 15:41
Yes I saw it falling back to sw and I wrote that above, but it was strange to be able to select it and use it on an incompatible GPU.

I was talking about the possibility of not selecting at all HEVC for incompatible GPUs.

But this is minor.

nevcairiel
25th September 2014, 15:42
No, the options do not know, and they never will.

cyberbeing
25th September 2014, 18:33
The latest LAV Filters git-1d591 build still seems to fail to software fallback with CUVID on every UHD 10bit HEVC TS sample I've tried.

It seems to actually attempt to decode them, but fails miserably with varying degrees of corruption or black output depending on the sample. Same problem reported earlier in the thread by wanezhiling.

http://i.imgur.com/H9v5WvY.jpg
Even 10-bit hevc materials can be also decoded with cuvid mode??:confused:

General
ID : 0 (0x0)
Complete name : D:\Videos\HD\Test\[三星专用.4K.演示片] UHD 4+3混搭.ts
Format : MPEG-TS
File size : 1.38 GiB
Duration : 3mn 51s
Overall bit rate mode : Constant
Overall bit rate : 51.4 Mbps

Video
ID : 257 (0x101)
Menu ID : 1 (0x1)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.2
Codec ID : 36
Duration : 3mn 50s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Writing library : ATEME Titan KFE 3.5.1 (4.5.1.0)

Maybe just an accident, hehe..

nevcairiel
25th September 2014, 18:38
All the 10-bit samples I have tried fallback to software decoding perfectly. Note that it requires that the video profile is actually encoded properly in the SPS (and that a SPS is present in the media type), if either is not true, then it has no data to check against.
Provide one that doesn't work, or there is nothing I can do. Most of my samples are encoded by x265, I didn't take the grand tour through the net fishing for samples, sorry. :p

cyberbeing
25th September 2014, 18:44
The two 10bit UHD HEVC TS samples linked in the other thread both do this:
Astra-UHD@50fps-18Mbps (10bit)
https://www.dropbox.com/s/6rbqlrrhhvbz79l/Astra%20UHD.ts?dl=0

UHD_ENT_Transformer_Quad@24fps-51Mbps (10bit)
http://demo-uhd3d.com/files/uhd/Transformers_extinction_Trailer_4K.zip

FWIW, previously this fallback issue also occurred with DXVA2 Copyback (only Native unaffected), but you seem to have fixed that in the past few days. Only fallback for CUVID remains broken on samples like these in the latest build. Unless DXVA2 can somehow fallback much later than CUVID, I'd assume that means the information needed is somehow present.

nevcairiel
25th September 2014, 19:00
Both CUVID and Copyback can in theory fallback any time, they just need to check. Native needs to know from the media type, it cannot check any later.
I've fixed CUVID though, it should check more aggressively.

vood007
26th September 2014, 00:32
I have a problem when LAVAudio is connected to FFDShow Raw Audio Proc. Playback does not start on mp4 or mkv files. After a first seek forward it starts. Problem exists since LAV Builds around 16. Sep.

Seems fixed now, thanks!

NikosD
26th September 2014, 12:11
Latest nightly LAV HEVC DXVA is still crashing for Nvidia in all modes (DXVAn & cb, CUVID)

Intel plays fine - falls back to SW.

https://www.sendspace.com/file/tzzzqi

nevcairiel
26th September 2014, 12:21
Works perfectly here. Your setup must be broken in some way, the code doesn't care one bit if you use NVIDIA or Intel.
Note that when playing 10-bit on recent NVIDIA drivers, you need to disable P010 output in LAV Video, or you'll run into a NVIDIA driver bug, at least if you're using EVR.

NikosD
26th September 2014, 14:42
The reason I posted that specific clip was, that only for that I clip I get a crash with P010 output enabled.

For all the other 10 bit samples I have tried, it doesn't crash with P010 output enabled using Nvidia.

I get just a black screen with no decoding, which I think it's different than crashing.

So I thought it was just a different case.

Nvidia drivers are buggy lately, more than they used to be.

nevcairiel
26th September 2014, 16:10
Its the same bug, sometimes it crashes, sometimes it fails silently. I added another check to make it fail silently more often, but its still the same thing.

NikosD
26th September 2014, 16:11
Works perfectly here. .

After the last two fixes in LAV, the decoder is almost perfect for handling 10 bit clips using Nvidia.

The Gravity trailer and all other samples don't crash using P010 output, they give black screen for DXVA native and CUVID.

But DXVA copy-back broke and it doesn't work for any 10bit clips.

So, one last step left...

nevcairiel
26th September 2014, 16:24
Copy-back isn't meant to work on any 10-bit clips, it falls back to software decoding just like all the other modes, which it does just fine.

NikosD
26th September 2014, 16:28
Well, it doesn't after the last two fixes.

That's why I said it broke, because indeed it was working before the two fixes.

It's crashing during the enumeration, I think.

nevcairiel
26th September 2014, 16:30
Works perfectly for me. And the last two fixes are also impossible to influence anything there.

NikosD
26th September 2014, 16:36
I tried it many times to all 10 bit samples. Not even one worked in copy back.

Everything else (native, cuvid) is working fine for all clips.

Update:

Besides 740M, I tried latest nightly with a GT610.
Exactly the same behavior with 10 bit clips.

Fall back is working for DXVA native and CUVID, but not for DXVA copy-back (it's crashing during enumeration)

The only common of these different systems (Laptop w/740M and Desktop w/ GT610) is the Nvidia's driver version 344.11 and LAV filters.

nevcairiel
27th September 2014, 12:09
Still works just perfectly here, on two systems with NVIDIA. And like I mentioned before, the code just doesn't care if its run on NVIDIA or Intel, and the only changes made in that last version are impossible to cause issues like this. Noone else seemed to complain, either.

NikosD
27th September 2014, 12:21
OK.

For my systems, LAV 0.62.55 and LAV 0.62.57 have major differences specifically and only on 10 bit HEVC using Nvidia DXVA.

But maybe it's just me.

Don't expect though, a lot of people chasing latest nightly builds, checking compatibility issues with specific samples.

NikosD
28th September 2014, 13:26
I see no evidence that its 10-bit. But no, 10-bit doesn't really work.

I've just tried latest x64 version of PotPlayer using Intel's HEVC DXVA decoder and it can play fine most of my 10bit HEVC samples in HW.

Not all of them, because some they are just crashing the app.

The picture is not perfect, but how is even possible to decode 10 bit resolution in HW using HD 4600 ?

nevcairiel
28th September 2014, 13:42
Eh, the difference isn't that big, you can get away with most things by just throwing it at the same code, but anything thats not a perfect picture is absolutely not acceptable, and while a 8-bit decoder can potentially decode a partial picture of a 10-bit stream, its never going to be 100%. The decoder cannot even output a 10-bit picture, only 8-bit images, and as such its already impossible to get a 100% image out of it.

cyberbeing
29th September 2014, 15:44
Your latest nightly builds are no longer sending the subtitle styles from the correct segment on certain samples with mkv ordered chapters. This breakage appears to coincide with the recent FFMPEG library version jump, since the LAV 0.62.0 stable using the older libraries is unaffected.

nevcairiel
29th September 2014, 15:51
Fixed that just now.

DragonQ
29th September 2014, 17:23
Nev, is the source of your custom version of ffmpeg available anywhere? Most of the time when I see an interesting change in the LAV Filters tracker, it's just "update ffmpeg" so I can't see what actually has changed in the code.

nevcairiel
29th September 2014, 17:26
Its linked both in the readme or the first post of this thread.

DragonQ
30th September 2014, 01:22
Cheers.

NikosD
30th September 2014, 09:06
4K HEVC 8bit is crashing Intel's DXVA.

http://demo-uhd3d.com/files/uhd/Hispasat_UHD_NAB-2014_HEVC.zip

CPU plays fine.

Tell me if you want me to cut a small sample.

cyberbeing
30th September 2014, 17:29
Your latest nightly builds are no longer sending the subtitle styles from the correct segment on certain samples with mkv ordered chapters. This breakage appears to coincide with the recent FFMPEG library version jump, since the LAV 0.62.0 stable using the older libraries is unaffected.
Fixed that just now.

Thanks. I've now tested and confirmed your change yesterday fixed the issue. So it would seem that FFMPEG depreciating their internal AV_CODEC_ID_SSA format (http://git.1f0.de/gitweb?p=ffmpeg.git;a=commit;h=c7d8dbad14ed5fa3c217a4fc1790021d6c0b6416;js=1) was the underlying cause.

DragonQ
30th September 2014, 20:16
Hmm, I found a weird issue today. I wanted to add an audio delay on my HTPC (I used to do this using my AVR but I need that set to no delay for other purposes) so I added a 280 ms delay in the LAV Audio settings. However, now I get a regular ~1 second pause in video every ~7.5 seconds (very regular) in MediaPortal (using EVR). It's entirely reproducible and once I turn off the delay everything's fine. What could cause this?

Motenai Yoda
2nd October 2014, 15:56
Just me or there are some nasty artefacts with 62.0 and lossless x264 encodes?

sneaker_ger
2nd October 2014, 15:59
Old x264 lossless encodes are not spec-compliant and the ffmpeg decoder is now following the spec more strictly. It's recommended to re-encode with a current x264 version. The next LAV version will restore the old behavior, though, simply because 99% of the lossless H.264 files out there were encoded using x264. New x264 encodes are compatible with every LAV version.

/edit:
Try this version (or a newer nightly):
http://forum.doom9.org/showpost.php?p=1693385&postcount=18024

nevcairiel
3rd October 2014, 08:32
LAV Filters 0.63

LAV Splitter
- NEW: Support for playing AES encrypted HLS streams
- NEW: Advanced Subtitle selection allows selecting subtitles by a string match on the stream title
- NEW: Support for rtspu, rtspm, rtspt and rtsph URLs to force the RTSP transport protocol
- NEW: Animated GIF image support
- Fixed: Improved timestamp handling of badly muxed/corrupted H.264 streams
- Fixed: 4K ProRes streams in MKV didn't play reliably
- Fixed: Some HEVC streams in MKV/MP4 didn't play properly
- Fixed: VobSubs in MP4 didn't properly export their color palette
- Fixed: Streaming MP3s through the Microsoft URL filter could result in the last audio frame to be partially repeated
- Fixed: The duration of MP3 files would be wrong if it contained long IDv3 tags
- Fixed: TrueHD streams with an Dolby Atmos sub-stream were not demuxed properly

LAV Video
- NEW: Experimental support for CUVID and DXVA2 HEVC acceleration
- Faster: HEVC decoding is up to 100% faster
- Fixed: DVD subtitle rendering could crash in 64-bit builds

LAV Audio
- Fixed: TrueHD streams with an Dolby Atmos sub-stream did not decode

Download: Installer (both x86/x64) (http://files.1f0.de/lavf/LAVFilters-0.63.exe) -- Zips: 32-bit (http://files.1f0.de/lavf/LAVFilters-0.63.zip) & 64-bit (http://files.1f0.de/lavf/LAVFilters-0.63-x64.zip)

Its been a long time since the last release, which had a multitude of reasons which prevented me from working on LAV as much as I wanted, but I finally finished most of the things I did have planned for this version, so here it is!

Subtitle selection on string match

This feature was contributed to LAV, and it seems at least mildly useful. You can now select subtitle streams based on their title, however its limited to single words, as spaces are a separator for a new token.

Example Syntax:
eng@signs - Select any english subtitle tracks with "signs" in their title.

Note that string matches are case-sensitive, now that I'm writing this, it may make sense to change that to case-insensitive for the next version, maybe?

HEVC HW Acceleration

This version introduces experimental support for CUVID and DXVA2 HEVC HW acceleration on Intel Haswell and recent NVIDIA cards. On the current hardware, this is only a "Hybrid" acceleration, which means it uses the GPUs 3D shaders to perform calculations, and not dedicated decoding hardware like H.264 or MPEG-2 decoding would.

Only 4:2:0 8-bit is supported for now, we'll have to see if the GPU vendors support 10-bit properly at a later time. DXVA2 defines a specification for 10-bit, but its not supported by the GPU drivers (yet?).

Note that I still consider this feature highly experiemental, and it is disabled by default, but it seems to work quite decently nevertheless.

TrueHD Atmos

Really just a bugfix, but maybe still worth mentioning, TrueHD streams with an Atmos substream decode perfectly in this version. Its important to note that the Atmos data is just discarded and not decoded in any way, but the lossless TrueHD stream is decoded perfectly now, while before the Atmos extension screwed up decoding.

Anyway, have fun, and if you find any new issues, please do report them!

Boltron
3rd October 2014, 10:43
Thank you.

ryrynz
3rd October 2014, 10:56
Back into the swing of things, feels like a fairly quiet year in software development for AV related things compared to last year. Great release.

Elbart_
3rd October 2014, 12:41
They look fine here, might be the video renderer causing the problem.
Note that non-mod2 height with 4:2:0 chroma subsampling is technically an invalid format.
When the WebM-reference-decoder is used within mpchc, there's no green line.

I'll do another test-run today.