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

clsid
4th October 2018, 14:22
Can you also export the metadata "comment" value from FFmpeg (as description) for embedded cover art? Then I can use that in MPC-HC to choose the best cover.I have made a patch:
https://github.com/clsid2/LAVFilters/commits/master

mytbyte
4th October 2018, 15:10
Try MPC-HC 1.8.2

Thanks, now it works, both internal and external 0.72.x.x...

nevcairiel
5th October 2018, 09:27
I have made a patch:
https://github.com/clsid2/LAVFilters/commits/master

I've picked that patch with some additions for the second attachment case, thanks.

nevcairiel
5th October 2018, 12:43
LAV Filters 0.73

LAV Splitter
- Changed: Export the description of cover art and attachments for use by players
- Fixed: Properly marked the packet allocator as providing read-only packets, to avoid crashes with in-place transform filters

LAV Video
- NEW: Support for AV1 decoding using libaom
- Changed: Enabled VP9 hardware acceleration by default
- Fixed: The aspect ratio of certain WMV/VC-1 files was not being properly respected in the WMV9 MFT decoder

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

AV1 Support

This is the first officialy LAV Filters release with AV1 support. LAV Splitter can read compliant files, and LAV Video can decode AV1 using the libaom decoder.
The alternative dav1d decoder is still under active development, and at this time is not quite ready for widespread use yet. It'll be included in the future, once the dust settles.

Otherwise, not much changed. General house keeping and some small corrections. New FFmpeg version of course.

As always, please report issues, specifically regressions, in as much detail as possible with a sample file if applicable.

Have fun!

mclingo
5th October 2018, 12:56
bit a noob question this as its never come up as i've only recently started updating the LAV filters in the KODI DS build, to update the LAV filters you normally just copy the filters from: C:\Program Files (x86)\LAV Filters\x86 to \KODI DS\system\players\dsplayer\LAVFilters - or whereever you have it instsalled.

This time they didnt overwrite as the DLL names have changed, do these always change with major build changes nevcairiel?, I assume I'll just delete the old filters and copy the new ones in there.

If you're not sure i'll ask on the DS forum,

Cheers for the new version ! :)

NikosD
5th October 2018, 12:57
AV1 Support

This is the first officialy LAV Filters release with AV1 support. LAV Splitter can read compliant files, and LAV Video can decode AV1 using the libaom decoder.
The alternative dav1d decoder is still under active development, and at this time is not quite ready for widespread use yet. It'll be included in the future, once the dust settles.I think that libaom is in active development too.

Are you going to follow their new releases too ?

They are probably doing great steps regarding SMT, ASM and SIMD optimizations not in every new release of course, but certainly they haven't stopped development.

Also we must have a way to benchmark those two different decoders for AV1.

It would be extremely useful to add both decoders in LAV in order to test which is faster as they release new versions.

nevcairiel
5th October 2018, 13:07
LAV has no real possibility to choose between two decoders based on FFmpeg. If you want to benchmark them, I suggest you use FFmpeg itself - although the dav1d decoder module for FFmpeg has not landed yet, partially because dav1d keeps changing (its just not ready yet).
I'll include whichever ends up better, but just from history I have far more trust in the people working on dav1d to provide the fastest AV1 software decoder. The FFmpeg vp9 decoder, from the same developer, runs leaps around libvpx.

nevcairiel
5th October 2018, 13:14
This time they didnt overwrite as the DLL names have changed, do these always change with major build changes nevcairiel?, I assume I'll just delete the old filters and copy the new ones in there.

The name change was already in February, so 0.72 already had them.
The names change when FFmpeg updates to a newer major version. The old ones should just be deleted.

mclingo
5th October 2018, 13:16
I probably had some really old ones in there then I hadnt removed, thanks for the info, I just tested KODI DS and it works fine.

Thanks again for your excellent work.

:)

clsid
5th October 2018, 13:26
Thanks for the release!

If you get bored, could you take a look at this bug report (https://github.com/clsid2/mpc-hc/issues/26).

NikosD
5th October 2018, 16:43
@nevcairiel

Yes, ffvp9 is a lot faster than libvpx and when SIMD arrives in dav1d it will be a lot faster than libaom.

But right now I would like to test them both.

Thanks.

James Freeman
6th October 2018, 11:17
Video playback in MPC-HC freezes when AAC 5.1 audio stream is selected with newest 0.73 build.
Once a different audio stream is selected, the video continues to play.
This problem did no occur in 0.72.

sneaker_ger
6th October 2018, 11:23
I cannot confirm this. Sample?

James Freeman
6th October 2018, 11:42
I cannot edit a video to cut a sample, I don't know how.

I can post a picture of what audio stream freezes the playback, and the LAV Audio Pin Info of that stream.

Meanwhile I'll try to change output formats and see if it helps.


Filter : LAV Audio Decoder - CLSID : {E8E73B6B-4CB3-44A4-BE99-4F7BCB96E491}

- Connected to:

CLSID: {B98D13E7-55DB-4385-A33D-09FD1BA26338}
Filter: LAV Splitter Source
Pin: Audio

- Connection media type:

Audio: AAC 48000Hz 6ch

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {53544441-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 256000
cbFormat: 25

WAVEFORMATEX:
wFormatTag: 0x4441
nChannels: 6
nSamplesPerSec: 48000
nAvgBytesPerSec: 0
nBlockAlign: 1
wBitsPerSample: 0
cbSize: 7 (extra bytes)

pbFormat:
0000: 41 44 06 00 80 bb 00 00 00 00 00 00 01 00 00 00 AD..€»..........
0010: 07 00|13 30 56 e5 9d 48 00 ...0VåH.


EDIT:
Something in 0.72.0.12 created this bug for me, 0.72.0.3 works fine, as far as the nightly builds I can test.

EDIT2:
I found the problem, it is LAV Splitter.
0.73 Audio and Video work fine with the older 72.03 Splitter.

-

LigH
6th October 2018, 15:02
Attachments in this forum take a while to get approved. Please use a public image hoster instead (frupic, imgur, tinypic, etc.).

clsid
6th October 2018, 15:21
Here is a little tool to cut a sample from front of file:
http://rationalqm.us/dgsplit/dgsplit12.zip

nevcairiel
6th October 2018, 21:25
Without a sample file its unfortunately impossible to help with such problems. Do use the tool clsid linked, it can easily make a small sample from the beginning of the file. Please confirm after cutting that it does infact reproduce the problem still! :)

James Freeman
7th October 2018, 05:35
https://www114.zippyshare.com/v/CmyHXgS7/file.html

This is 5MB from start of the video.
The video doesn't freeze with this segment unlike the complete file (300MB), but there is no audio when selecting the 5.1 track.
I have tested with 0.73 and 0.72.3 LAV Splitter and kept 0.73 audio+video, still the same results, only 0.72.03 Splitter produces audio with the 5.1 track.

LigH
7th October 2018, 06:57
The complete file is only 300 MB small? MediaFire can hold that. Maybe in an encrypted 7-zip archive (doesn't need the strongest compression, media content is hardly compressible).

nevcairiel
7th October 2018, 08:46
The small sample is fine, thanks.

mytbyte
7th October 2018, 09:38
https://www114.zippyshare.com/v/CmyHXgS7/file.html

This is 5MB from start of the video.
The video doesn't freeze with this segment unlike the complete file (300MB), but there is no audio when selecting the 5.1 track.
I have tested with 0.73 and 0.72.3 LAV Splitter and kept 0.73 audio+video, still the same results, only 0.72.03 Splitter produces audio with the 5.1 track.

Can't be bothered to revert to LAV older than 0.73 but your 5.1 track indeed doesn't work with me either. However, my other files with 5.1 AAC audio do work, the difference being that yours, that don't work, is he-aac, mine are aac le. But, the he-aac from here: https://www2.iis.fraunhofer.de/AAC/multichannel.html does produce sound, the difference being 44100 vs 48000 kHz.

manolito
7th October 2018, 19:06
This uploaded sample is indeed interesting...

First of all DGSplit did not bother to correct the duration, loading it into mkvmerge and remuxing it fixes it. No big deal...

I can also reproduce that LAVSplitter 0.73 cannot handle the first audio track. Going back to LAVSplitter 0.72.03 does fix it like James Freeman reported.

But there is another thing about this first audio track which is problematic. Both MediaInfo and FFProbe report that the track has 2 audio channels. But importing it into AviSynth with DirectShowSource using LAV Audio results in a 6-ch audio track. When using ffms2 instead the track appears as 2-ch in AviSynth.

Who is right here? Since MediaInfo and FFProbe and ffms2 all agree that the number of channels is 2 could it be that LAV Audio has a problem recognizing this track correctly?


Cheers
manolito

sneaker_ger
7th October 2018, 19:11
First of all DGSplit did not bother to correct the duration
Naturally. DGSplit simply cuts X bytes on the binary level.


But there is another thing about this first audio track which is problematic. Both MediaInfo and FFProbe report that the track has 2 audio channels. But importing it into AviSynth with DirectShowSource using LAV Audio results in a 6-ch audio track. When using ffms2 instead the track appears as 2-ch in AviSynth.

Who is right here? Since MediaInfo and FFProbe and ffms2 all agree that the number of channels is 2 could it be that LAV Audio has a problem recognizing this track correctly?
Do you have LAV Audio set to mix to 5.1?

nevcairiel
7th October 2018, 19:33
The first track is stereo, and LAV also shows it like that for me. The second track is 5.1 and the one this issue is about - which is already fixed for the next nightly.

manolito
7th October 2018, 23:29
Do you have LAV Audio set to mix to 5.1?

No, the LAV Audio mixer is disabled.

And of course nevcairiel is correct, I stumbled over an audio track peculiarity when using AviSynth with DirectShowSource for audio.

When using audio via DirectShowSource there is no way to specify a track number. Up to now I thought that the first audio track will always get used in such cases.

For this uploaded sample it works differently (tested with AVS 2.61 and also the current version of AVS+). The problematic 5.1 audio track is the second audio track here. But AviSynth will always open this 5.1 track and not the first track which is stereo. In the LAV Splitter configuration the option "Prefer Audio Stream with the Highest Quality" is unchecked.

AVS script:
a = DirectShowSource("f:\download\098 - A Final Attack_0.mkv", video = false)
v = DSS2("f:\download\098 - A Final Attack_0.mkv")
AudioDub(v, a)

AVSMeter report:
AVSMeter 2.6.5 (x86) - Copyright (c) 2012-2017, Groucho2004
AviSynth 2.61, build:May 17 2016 [15:57:42] VC6 (2.6.1.0)

Number of frames: 479
Length (hh:mm:ss.ms): 00:00:19.978
Frame width: 640
Frame height: 480
Framerate: 23.976 (10000000/417083)
Colorspace: YV12
Audio channels: 6
Audio bits/sample: 32 (Float)
Audio sample rate: 48000
Audio samples: 960946

I did not find any information about this behavior in the AviSynth docs. Is this a bug or a feature? :confused:

Whatever, I learned something new again... :devil:


Cheers
manolito

sneaker_ger
7th October 2018, 23:51
Second track is marked as [default], right? Not because of AviSynth.

manolito
8th October 2018, 00:03
Second track is marked as [default], right? Not because of AviSynth.

Ouch, you got me... :o

Now I need to make a bg report for AVStoDVD about the handling of more than 1 audio tracks...

Cheers
manolito

James Freeman
8th October 2018, 16:06
My problem is fixed in 0.73.01, thanks Nev!

manolito
8th October 2018, 19:26
Confirmed...

nevcairiel
11th October 2018, 09:44
LAV Filters 0.73.1

LAV Video
- Fixed: Container-provided color information will only overwrite video bitstream color information if its set and valid

LAV Audio
- Fixed: Certain multi-channel AAC streams did not decode in 0.73

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

Just a quick bugfix release for two issues I fixed since 0.73, one of which was a regression.
If you haven't seen the 0.73 release, check its release notes here (https://forum.doom9.org/showthread.php?p=1853965#post1853965)

As always, please report issues, specifically regressions, in as much detail as possible with a sample file if applicable.

Have fun!

mclingo
11th October 2018, 10:19
LAV Filters 0.73.1
[CODE]
....

Have fun!

awesome thanks :):):):):):):)

max79
18th October 2018, 21:54
Problem with "LAV Splitter Source", on these [HLS]-LIVEstreams it didn't output the highest possible quality for video stream:
http://85.238.112.40:8810/hls_sec/online/list-renome.m3u8
http://85.238.112.40:8810/hls_sec/online/list-ont.m3u8
https://strm.yandex.ru/kal/zvezda_supres/zvezda_supres0.m3u8
https://strm.yandex.ru/kal/fresh/fresh0.m3u8
and on these [HLS]-LIVEstreams it can't even connected:
https://strm.yandex.ru/kal/zvezda/zvezda0.m3u8
https://strm.yandex.ru/kal/euronews/euronews0.m3u8

Any feedback would be appreciated.

max79
18th October 2018, 21:56
Problem with "LAV Splitter Source", on these [HLS]-VoDstreams it can't even connected:
https://media.culture.ru/video/204/204.,144p,240p,360p,576p,.mp4.urlset/master.m3u8
https://media.culture.ru/video/204/204.576p.mp4/index-v1-a1.m3u8

Any feedback would be appreciated.

LigH
19th October 2018, 07:18
Any feedback would be appreciated.

To be taken serious, always avoid "Comic Sans MS", everywhere... :sly:

max79
19th October 2018, 17:08
To be taken serious, always avoid "Comic Sans MS", everywhere... :sly:

forgive me magnanimously, if it's inappropriate, I won't do it again. I only tried to thoroughly describe a problem that really annoys me, so in desperation I stopped watching the HLS-LIVEstreams at all.

nevcairiel
19th October 2018, 17:15
You should probably use software thats actually designed for playing live streams, if you want an actual decent experience. LAV Splitter is designed for file playback first and foremost, and thats always going to be the main focus of its development and my time.

max79
19th October 2018, 18:02
You should probably use software thats actually designed for playing live streams...
roger that. And I'm express my gratitude to you for the excellent work to eliminate the issue from my "SUPPORT REQUEST - #1". Thank you it's really needed for me!

cyberscott
20th October 2018, 04:20
@nevcairiel. I think I found a bug. HDR no longer works properly in 0.73.1. I get distorted video when displaying any HDR file. Problem goes away if I roll back to 0.73.
I first noticed it when launching HDR videos in MPC-HC v1.8.3 which has LAV Filters 0.73 built in.
MPC-HC would work fine but MPC-BE, which was configured to use LAV 0.73.1 would fail. Took one more step and over-write MPC-HC with 0.73.1 and it starting failing running HDR videos as well.
I'm Running latest madvr, Windows 10 64 Pro ver. 1803 and latest nvidia drivers. (2080 Ti)

nevcairiel
20th October 2018, 08:11
There is literally only two changes in 0.73.1 over 0.73, and if the one affecting video breaks HDR for you, then your HDR file has broken metadata.
A sample file would be needed. Alas HDR still works for many other people.

Manni
20th October 2018, 08:53
@nevcairiel. I think I found a bug. HDR no longer works properly in 0.73.1. I get distorted video when displaying any HDR file. Problem goes away if I roll back to 0.73.
I first noticed it when launching HDR videos in MPC-HC v1.8.3 which has LAV Filters 0.73 built in.
MPC-HC would work fine but MPC-BE, which was configured to use LAV 0.73.1 would fail. Took one more step and over-write MPC-HC with 0.73.1 and it starting failing running HDR videos as well.
I'm Running latest madvr, Windows 10 64 Pro ver. 1803 and latest nvidia drivers. (2080 Ti)

There is literally only two changes in 0.73.1 over 0.73, and if the one affecting video breaks HDR for you, then your HDR file has broken metadata.
A sample file would be needed. Alas HDR still works for many other people.

I confirm that 0.73.1 works fine here with HDR using MPC-BE.

cyberscott
20th October 2018, 15:49
There is literally only two changes in 0.73.1 over 0.73, and if the one affecting video breaks HDR for you, then your HDR file has broken metadata.
A sample file would be needed. Alas HDR still works for many other people.

Thank your for the response!

Weird thing with software... I repeated my tests using known, good HDR video files, same results.. working with 0.73 and not with 0.73.1.

However... decided to take the "nuclear" option, completely removed LAV, both MPC-HC and BE, madvr. Used DDU to remove Nvidia drivers (which is something I always do when installing new Nvidia drivers). Proceeded to re-install everything, rebuild profiles, etc.
Now HDR is working for me with Lav 073.1 on all HDR files I have.
It is just weird how consistent the failure was prior to re-installing the drivers and programs. Go figure! :p

NikosD
22nd October 2018, 15:57
Using a new PC with Win x64 October 2018 and a Skylake i5 6500 (HD 530) I couldn't make it work with LAV filters for hybrid VP9 acceleration (DXVA2 native VP9)

It falls back to SW.

Latest versions and updates for everything.

Does it work ?

ryrynz
24th October 2018, 03:36
I've ticked wmapro in the LAV Audio formats page but I still get MPC-BE choosing the WMAudio Decoder DMO for pro V9 files, should this happen?
Having this decode causes stuttering on seek so I have to set MPC-BE's internal decoder for this format.

nevcairiel
24th October 2018, 07:29
It depends how you've setup LAV in MPC-BE. If you've set them to be the preferred filters, it should work. If not, then the MS decoders may have a higher merrit. You could also block the MS decoder on MPC-BE and it should then use LAV.
Personally I just use LAV as the preferred decoders in MPC-HC/BE. Some people don't recommend doing that, but if I want external LAV for everything, I don't see why I shouldnt. :)

VictorLS
24th October 2018, 13:56
Personally I just use LAV as the preferred decoders in MPC-HC/BE.
I'm usually (why not always read lower in this post) too. Because only last version of MPC-BE begins showing video with half-height H265 files but quality without script is worse (with script equal) then with external LAV Video Decoder.
My script https://forum.doom9.org/showthread.php?p=1850467#post1850467 for ffdshow raw works well enough in SmartDVB already (due to implementing LAV Splitter in it) too so I can watch such SAT channels directly from SAT in almost maximum (I'd prefer hardware deinterlacing over yadif x2 in script but don't know how reach it) quality.

MainConcept is working on half-height files supporting but ffmpeg seems not. This is answer on my yesterday's request - I'm sure it's not a secret:
The file you sent us 20180923-225044_CT 24.ts (17MB) https://yadi.sk/d/BfOGlnU7Ftir0g is interlaced. - I know that ;)
We support this in new version of HEVC Video Decoder (v.10.0).
This new SDK version is under final testing now and it'll be available soon...

Btw only MainConcept HEVC Video Decoder due to decoding only key-frames shows first 8K test from Turkish SAT - half-minute record 20181024-132601_TURKSAT_8K_TEST.ts (307MB) https://yadi.sk/d/70tUNE7oK21xfA and longer than minute 20181024-222320_TURKSAT_8K_TEST.ts (761MB) https://yadi.sk/d/7ALFkaKuIMUfRA
I'm not only one who want this feature http://smartdvb.net/bb/viewtopic.php?f=13&t=1699
PS. Elecard with Skip Non-key setting:
REGEDIT4

[HKEY_CURRENT_USER\Software\Elecard\Elecard HEVC Video Decoder\SmartDVB.exe]
"Quality"=dword:00000001
shows that 8K well too.

NikosD
25th October 2018, 08:42
@nevcairiel

Any news regarding VP9 hybrid support of Skylake ?

Do you have one to test it ?

nevcairiel
25th October 2018, 08:45
No, I don't have a Skylake CPU. And as a general answer, LAV has no conditions to check for hardware compatibility (at least not for VP9), it'll just try to open the device in the videos resolution, and if it succeeds, then it'll use it.
Hence if its not being used, then opening the device did not succeed.

The closest I have is a Apollo Lake NUC with a 9th Gen HD500 GPU, but I don't know if there are any media differences between that and Skylake (even though they were released very close to each other and are both 9th Gen).

NikosD
25th October 2018, 09:20
Apollo Lake NUC has full hardware decoding support for HEVC and VP9 for both 8bit/10bit, so it's a lot different and closer to Kabylake's GPU.

It should work for that GPU.

I'll try different drivers, probably.

Thanks.

wanezhiling
25th October 2018, 09:37
Apollo Lake has no 10-bit VP9 ability, Gemini Lake does.

NikosD
25th October 2018, 17:03
No, I don't have a Skylake CPU

Just found out an ancient post of you (late 2015) at benchmark thread.
You owned that time a Skylake NUC and ran a VP9 DXVA2 benchmark too :)

On my NUC5PPYH (ie. Pentium N3700)

Decode Benchmark: 25/31/50, at 40% CPU usage

The clip would maybe just barely run, but probably not quite fluid.