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

LigH
25th March 2018, 12:44
Already available via AviSynth Wiki: AviSynth+ x64 plugins (http://avisynth.nl/index.php/AviSynth%2B_x64_plugins) in the Web Archive. And I uploaded an own archive (http://www.ligh.de/software/DSS2mod.7z) as well...

anas
25th March 2018, 12:54
Already available via AviSynth Wiki: AviSynth+ x64 plugins (http://avisynth.nl/index.php/AviSynth%2B_x64_plugins) in the Web Archive. And I uploaded an own archive (http://www.ligh.de/software/DSS2mod.7z) as well...

man!
too much thanks.. i'll give it try and back..
cheers

anas
26th March 2018, 12:50
@Ligh it's work good..
thanks

LigH
26th March 2018, 20:01
Good to know, thanks for sharing.

kuchikirukia
27th March 2018, 06:56
LAV 0.71.0 has broken seeking when using linked mkvs with a Hi444PP video. Works in 0.70.2. It will also play just fine if you don't try to seek.

Yes, this is the most obscure thing ever.

richardpl
27th March 2018, 07:52
No, that is not obscure at all, it is about bug in previous encoder and mkvs creators stripping usefull info from AVC encodes.
If you haven't strip those you would get still working videos.
There is option in libavcodec though to enable old behaviour.

MrGlasspoole
27th March 2018, 08:02
Hi,

i have problems playing 60fps 8bit on a Core i5-6600 Skylake-S.

No matter what hardware acceleration i choose the sound is stuttering.
For example this two HEVC videos:
http://4kmedia.org/sony-surfing-uhd-4k-demo/
http://www.4ktv.de/sony-camp-2016-sdr-version-download/

But also Big Buck Bunny H.264-AVC MPEG-4 [60.000fps][8-35Mbps][8bits] does not play.

There are no dropped frames but Sync Offset is avg -529ms, dev: 450 ms

The videos play fine in this player:
https://mirillis.com/en/products/splash-free-hd-video-player.html

sneaker_ger
27th March 2018, 11:55
LAV 0.71.0 has broken seeking when using linked mkvs with a Hi444PP video. Works in 0.70.2. It will also play just fine if you don't try to seek.

Yes, this is the most obscure thing ever.
No, that is not obscure at all, it is about bug in previous encoder and mkvs creators stripping usefull info from AVC encodes.
If you haven't strip those you would get still working videos.
There is option in libavcodec though to enable old behaviour.

Yes, some old 4:4:4 profile x264 encodes are broken. Old ffmpeg matched old behavior, new ffmpeg matches new/fixed behavior. If LAV sees x264's old custom SEI (the one you see in MediaInfo with the x264 info) it falls back to the old behavior.

For lossless files: simply re-encode with e.g. old ffmpeg decoder but newest x264 (in the future you may activate --no-8x8dct for compatibility with old and new decoders, but currently it is forced off anyways).

sneaker_ger
27th March 2018, 11:57
Hi,

i have problems playing 60fps 8bit on a Core i5-6600 Skylake-S.

No matter what hardware acceleration i choose the sound is stuttering.
For example this two HEVC videos:
http://4kmedia.org/sony-surfing-uhd-4k-demo/
http://www.4ktv.de/sony-camp-2016-sdr-version-download/

But also Big Buck Bunny H.264-AVC MPEG-4 [60.000fps][8-35Mbps][8bits] does not play.

There are no dropped frames but Sync Offset is avg -529ms, dev: 450 ms

The videos play fine in this player:
https://mirillis.com/en/products/splash-free-hd-video-player.html
What renderer are you using? If it has an OSD (ctrl+j) show it to us. You tried D3D11 native? What OS?

MrGlasspoole
27th March 2018, 16:37
Sorry i did forget some info's.

Win 8.1 - but for testing i did install 10 with the same result.
It's a fresh installation...
EVR custom presenter...

I did forget the renderer and tried EVR and there it seems to work.
I moved the board and CPU from my HTPC into my workstation.
On the HTPC i use madVR but the workstation has no dedicated graphics card.

I thought EVR custom presenter is the first choice?
Does it make sense to use madVR without a dedicated graphics card?

sneaker_ger
27th March 2018, 16:42
I thought EVR custom presenter is the first choice?
It's default. Doesn't mean it will always be better than other renderers.

Does it make sense to use madVR without a dedicated graphics card?
You can try madVR with native(*) D3D11 decoding. Just can't use any complex algorithms. I don't know how much sense it makes for you. One of the biggest things missing from vanilla EVR is the support for MPC-HC's internal subtitle renderer.



(*):
Note that the way you select Native/Copy-Back for D3D11 is different than DXVA2. D3D11 will use Native-mode when its set to "Automatic" device choice, and the renderer supports Native mode. If you select a specific device, that forces Copy-Back mode (because for Native to work, the renderer basically selects the device).

clsid
27th March 2018, 17:28
The main reason why EVR gives better performance than EVR-CP is because it uses DXVA scaling.

You could try this setting for EVR-CP:
Options > Playback > Output > Resizer > Bilinear (PS 2.0)

Then it will use the GPU for scaling instead of CPU.

MrGlasspoole
27th March 2018, 18:04
Bilinear (PS 2.0) makes no difference.

Nobody using a Skylake-S (HD 530)?
The settings should be the same for everybody, shouldn't it?

This is just a workstation and all i need is that the videos play smooth without to much CPU usage. Video quality (madVR) is not that important on this machine.
Oh and it's a 1080p Dell monitor...

Edit:
I tried the "madVR low-end preset for low-end GPUs such as Intel built-in GPUs" settings from LAV Filters Megamix (https://anime.my/tutorials/watching-h264-videos-using-compute-unified-device-architecture-cuda/#checklist) - which should be madVR default anyway.
Dropped frames all over the place...
Even on 4K H.264-AVC MPEG-4 [29.970fps][19Mbps][8bits]...

sneaker_ger
27th March 2018, 21:14
I tried the "madVR low-end preset for low-end GPUs such as Intel built-in GPUs" settings from LAV Filters Megamix (https://anime.my/tutorials/watching-h264-videos-using-compute-unified-device-architecture-cuda/#checklist) - which should be madVR default anyway.
Dropped frames all over the place...
Even on 4K H.264-AVC MPEG-4 [29.970fps][19Mbps][8bits]...
I answered in the madvr thread:
https://forum.doom9.org/showthread.php?p=1837634#post1837634

kuchikirukia
27th March 2018, 23:28
Yes, some old 4:4:4 profile x264 encodes are broken. Old ffmpeg matched old behavior, new ffmpeg matches new/fixed behavior. If LAV sees x264's old custom SEI (the one you see in MediaInfo with the x264 info) it falls back to the old behavior.

For lossless files: simply re-encode with e.g. old ffmpeg decoder but newest x264 (in the future you may activate --no-8x8dct for compatibility with old and new decoders, but currently it is forced off anyways).

What does ffmpeg have to do with this? I don't use it and all my encodes are broken.

sneaker_ger
27th March 2018, 23:30
LAV Filters are based on ffmpeg.

kuchikirukia
27th March 2018, 23:40
So how is it fixed if it was working before but now it's broken?

nevcairiel
27th March 2018, 23:42
Your files do not conform to the H.264 standard, because x264 4:4:4 lossless encoding was buggy, so you have to re-encode them if you want it truely fixed.

kuchikirukia
27th March 2018, 23:45
These aren't lossless. It's bugging out on ordered chapters/linked mkvs.

sneaker_ger
27th March 2018, 23:46
Lossy 4:4:4+CABAC is also affected.

nevcairiel
27th March 2018, 23:47
Hi444PP is a lossless profile, but I suppose one could use it without using lossless coding? But all the same anyway, you need to re-encode them to fix it forever.

kuchikirukia
27th March 2018, 23:56
Why does it only break if ordered chapters/linked mkvs are used? If I take those out it plays fine.

sneaker_ger
28th March 2018, 00:00
Every part plays fine for itself?
Provide sample.

nevcairiel
28th March 2018, 00:11
Try with tomorrows nightly build (in ~3 hours or so), maybe that helps. Although you're screwed if you mix old and new files in one timeline, but who would ever do that.

kuchikirukia
28th March 2018, 00:12
https://nofile.io/f/NbE7BTMX2ZY/New+folder.torrent

That has ordered chapters. The OP and ED play fine since they don't have chapters, and the main plays fine if you remove the chapters.

Though I just noticed that attempting to split the mkvs ruins what comes after the split.
So it works fine with no ordered chapters, it'll stay fine through a complete remux, but if you add ordered chapters or split it it's now screwed.

sneaker_ger
28th March 2018, 00:19
If you split the file using mkvtoolnix only the first part will have the information about the x264 encoder revision used because x264 stores it in the front. That's why only the first part will play fine if you attempt that.

The other thing should hopefully be fixed with the nightly as nevcairiel said. I could also reproduce the issue - it was a bug after all.

kuchikirukia
28th March 2018, 00:33
If you split the file using mkvtoolnix only the first part will have the information about the x264 encoder revision used because x264 stores it in the front. That's why only the first part will play fine if you attempt that.

The other thing should hopefully be fixed with the nightly as nevcairiel said. I could also reproduce the issue - it was a bug after all.

Ah, so if any 4:4:4 ordered chapter encode was made by splitting the output h.264 instead of encoding them in separate pieces then it would be screwed?
I don't think I've ever done that so I should be good there.

sneaker_ger
28th March 2018, 00:35
Ah, so if any 4:4:4 ordered chapter encode was made by splitting the output h.264 instead of encoding them in separate pieces then it would be screwed?
No, as long as the very first mkv file has the x264 information even the splitted parts should work fine as a part of ordered chapters with the upcoming nightly. But if you try to play the splitted parts by themselves (without the very first part/without ordered chapters) then it will not work correctly because LAV has no way of knowing an old x264 version was used.

kuchikirukia
28th March 2018, 18:01
The fix worked. Thanks.

mclingo
28th March 2018, 22:10
Hi, i've recently noticed when the sound I get when I play a movie back using plex on my TV through my reciever amp sound loads better than when I play the same movie through any app on my HTPC, this isnt strictly a LAV filter issue I dont think but all my players are using LAV.

The sound coming from my TV is PCM DOLBY 5.1 PCM, from my PC its full digital bitstreamed and all shows up correctly on my amp dialog. I'm using standard HDMI audio from my AMD RX card. To me the audio sounds thinner, has quite a bit less weight as it far less immersive, I can hear my rears much more through plex and my TV, it all just sounds loads better.

Can anyone hazzard a guess whats going on here, is there anything i'm missing using standard audio renderers in MPC-BE / HC / KOD?

i'm defo getting proper 7.1 as I have test files and each speaker calls out, its just the mix PLEX is providing seems fuller and better.

nevcairiel
28th March 2018, 22:21
Usually stuff is just louder and misleads you. But in any case thats not a LAV concern, its a decoder that generates perfect decoded PCM to the specifications of the codecs, anything that happens after that is not in its control.

mclingo
28th March 2018, 22:33
doh... found it. I'd turned my dialog level on my receiver up to 9 for some reason at some point, feeling pretty silly now :)

pkirill
30th March 2018, 13:46
man, can you put dll file here?
i used DSS2mod before, but i need DSS load lav without reg because DSS2mod has some issues and admin system permissions don't allow me reg or install lav
thanks ..

I took the original build of LAV here:
https://github.com/Nevcairiel/LAVFilters/releases

anas
30th March 2018, 15:21
I took the original build of LAV here:
https://github.com/Nevcairiel/LAVFilters/releases

thanks for reply,
i mean dll file of DirectShowSource to load lav filters without register
now i use DSS2 but it didn't load audio..
if you have directshowsource that load lav filters like dss2 with audio, please put it here..
:thanks:

LigH
31st March 2018, 10:02
No, that is one of the main flaws of DSS2Mod: It supports only video. Sorry I forgot this detail. You may need additional plugins to load audio streams.

@anas: For your needs, FFMS2 or L-SMASH Works may be recommendable, they use libavcodec/libavformat libraries just like LAV Filters, but with native AviSynth API. In contrast, pkirill had different needs than you, uses the DirectShow API without AviSynth.

anas
31st March 2018, 11:09
No, that is one of the main flaws of DSS2Mod: It supports only video. Sorry I forgot this detail. You may need additional plugins to load audio streams.

@anas: For your needs, FFMS2 or L-SMASH Works may be recommendable, they use libavcodec/libavformat libraries just like LAV Filters, but with native AviSynth API. In contrast, pkirill had different needs than you, uses the DirectShow API without AviSynth.

thanks man,
now i used DSS2 it's okay, i managed to load the audio file..

i pushed to use avisynth just for vsfilter :(
i just wonder if someone can make port for vsfilter to get work with ffmpeg without avs

x264 cli can use vsfilter without avs in tmod version, through patch
https://gist.github.com/1462458
i can make donate for who do it for me..

zaemon
2nd April 2018, 12:41
Hi!

I tried D3D11 in native mode with madVR but videos don't play, I got a black screen. When using copy-back, it works but performance is horrible (dropped frames where when I'm using DXVA2 copy-back it's fine). I'm using the latest build of madVR and latest Nvidia drivers (GTX 1080). Any idea? Thanks.

nevcairiel
2nd April 2018, 14:17
If copy-back works and native does not, this is best reported to madshi.

pkirill
2nd April 2018, 14:55
thanks for reply,
i mean dll file of DirectShowSource to load lav filters without register
:thanks:

Here is what I did to load filter into an IGraphBuilder instance(CLSID_FilterGraph):

LAVSplitterClassID = "171252A0-8820-4AFE-9DF8-5C92B2D66B04"L;
HMODULE hDLL = loadLibrary("LAVSplitter.ax");
LPFNGETCLASSOBJECT pFactory = GetProcAddress(HMODULE(hDll), "DllGetClassObject");
IClassFactory * pFactory = pFactory(UuidFromStringW(LAVSplitterClassID), _uuidof(IClassFactory));
IUnknown *filter = pFactory.CreateInstance();
IBaseFilter *pfilter = filter->QueryInterface<IBaseFilter>();
graphBuilder->AddFilter( pfilter, L"LAVSplitter");



After that the graphBuilder is able to playback all supported audio formats, exactly what I need.

LigH
2nd April 2018, 19:15
@pkirill+anas:

But that works only if you write an own application in C/C++. This is no recipe for an AviSynth user.

Using "DirectShowSource" or "DSS2" in AviSynth to access LAV Filters requires LAV Filters to be registered in the system.

"DSS2Mod" can use LAV Filters without registering LAV Filters in the system, but supports only the video decoders.

To use libavcodec video and audio decoders and libavformat splitters natively in AviSynth, L-SMASH Works and FFMS2 are recommendable; e.g. MeGUI supports them via "File Indexer" in its AVS Script Creator.

zaemon
2nd April 2018, 21:06
If copy-back works and native does not, this is best reported to madshi.



Thanks.

mclingo
3rd April 2018, 20:20
found a bug with D3D11, on my system anyway. I have an issue with MADVR where when you play a 3D movie (1080p) and you stop it I lose HDMI handshake going from 3D 1080p back to 4k 2160p. It does this every time. The workaround is to disable MADVR refresh rate switching and use your movies players switching instead, i've had this working for ages and its been fine up until recently.

recently I switched from DXVA copy back to D3D11 decoding as I found it was about 20% faster than DXVA on my system, what I had forgotten to test was 3D though which I tested today. Whats happening now is the same as what happens in MADVR, when I stop a 3D movie I get HDMI loss which cant be gained back easily without resetting it, I use HDMION.

If I switch back to DXVA copyback the problem goes away, I think its interesting that now both MADVR refresh rate switching and now D3D11 with MPC or KODI DS refresh rate switching causes the same problem, HDMI loss coming from out of a 1080p 3D connection back to a 2160 2d desktop.

Its very possible its connected issues with FSE which is required on most systems for 3D playback.

Both issues happen with with AMD RX cards, i havent tested my NVIDA 1050 but this also had HDMI handshake issue coming out of 3D for me too.

Another workaround would be to run your PC desktop in 1080p but who wants to do that when you've got a 4k display, this also explains why most people dont see this, there are still fewer people with 4k displays than 1080p ones.

I'll post this on both MADVR and LAV forums as the issues seems to be connected now.

nevcairiel
3rd April 2018, 20:50
3D decoding is not hardware accelerated, neither mode is involved when you play a 3D file.

mclingo
3rd April 2018, 22:51
3D decoding is not hardware accelerated, neither mode is involved when you play a 3D file.

I know but its still makes up part of the processing chain, something in D3D11 is causing handshake loss in both MPC and KODi DS, when I switch back to COPY BACK mode all is well, so something D3D11 is doing is breaking handshake when the media player is switching back from 1080p to 4k.

nevcairiel
3rd April 2018, 23:02
Like I said, the hardware acceleration option in LAV Video has absolutely no effect on 3D movies. Those are decoded with an entirely different component.
The only way it might even be remotely involved is when you manually open the configuration page, because that probes the hardware for support. This does not happen when you don't open the settings page.

mclingo
4th April 2018, 01:18
i'm only reporting whats happening mate, i'm not changing anything else, If I set LAV to COPYBACK its fine, if I set it to D3D11 the movie plays fine but when I stop it I get black screen HDMI loss, if I set it back to COPYBACK again, start and stop the movie no problem, I did this several times in a row to see if it was fluke or intermittent, every single time D3D11 is used I get HDMI loss when movie is stopped.

this is exactly the same behavior I get with MADVR when I used refresh rate switching, this is why I use KODI DS and MPC refresh rate switching, what ever is causing the MADVR problem is also causing the D3D11 problem this cant be a coincidence.

if I run my desktop at 1080p all problems disappear, its simply an issue of resolution switching somewhere.

I get what you are saying though, D3D11 cant be directly responsible but it must be indirectly responsible. MADSHI wont look at it either has he feels MADVR is not a fault, I feel it is indirectly responsible in the same way as if I make no other changes and take MADVR and D3D11 out of the equation all problems are solved.

If you two dont look into it then it will never get solved :(

foxyshadis
4th April 2018, 04:04
A situation like that sounds more like a display driver bug is being triggered. Interesting that it might be triggered due to 3D bypassing acceleration; what happens with normal 1080p if you turn off HW acceleration entirely?

That, or it's triggering a bug in your TV.

huhn
4th April 2018, 07:39
you could try a 3D computer game and see if the same happens.

pikaczu
4th April 2018, 09:29
please correct the time for the aac file

LigH
4th April 2018, 09:39
You still don't understand the problem of variable bitrate audio streams?

AAC has no header field telling the playback duration. And guessing the playback time by extrapolating the bitrate of only the first audio block is inaccurate because the bitrate will probably change during the following playback.

The only way to calculate the playback time accurately would be to scan the whole audio stream from the beginning to the end. But a decoder won't do that because there are usage cases (live streaming) where the audio stream is only accessible once: When you are at the end of the stream to collect statistical data, the stream is gone and you can't play it anymore.