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

bacondither
29th May 2020, 23:25
Dav1d 0.7 is out, with some speedups (https://www.phoronix.com/scan.php?page=news_item&px=Dav1d-0.7-Performance) for 8-bit decoding.

KoD
30th May 2020, 09:57
amichaelt, nevcariel, thank you both!

Liisachan
30th May 2020, 21:58
Hi, I happened to notice something minor. The language code ain (for Ainu; a minority language in Japan) is defined in ISO 639-2 and supported by MKVToolNix (you can create an MKV with an "ain" track), but it seems that LAV Filters don't recognize this language code...

ryrynz
1st June 2020, 11:52
Dav1d 0.7 is out, with some speedups (https://www.phoronix.com/scan.php?page=news_item&px=Dav1d-0.7-Performance) for 8-bit decoding.

Tested some huge gains in speed with 10-bit as well. Beautiful work.

Damien147
1st June 2020, 14:01
I have this (https://imgur.com/a/BwghYSI) happening to me for months.It always happens with MPC-HC,I use D3D11 native.
I have tried various AMD drivers with DDU or factory reset installation but it still happens.I also tried with no CPU OC (i5 760) just in case to make sure it's not me,haven't touched anything else.Any ideas?
win 10 1909
MPC-HC 1.9.3
GPU RX 470(20.5.1 driver)

edit:Just discovered that it happens with software decoding too.I am confused now.

VBB
1st June 2020, 22:29
I have a question about something that's been bugging me forever: Is it normal for the lossless sound formats to drop the bit-stream when paused for longer than a few seconds? If so, is there a workaround? Sorry if this is not LAV related.

Snowknight26
2nd June 2020, 00:18
I have a question about something that's been bugging me forever: Is it normal for the lossless sound formats to drop the bit-stream when paused for longer than a few seconds? If so, is there a workaround? Sorry if this is not LAV related.

Regression since 0.72.0. Best thing I've found you can do is wait a few seconds, resume. If it doesn't work, pause, wait a few seconds, resume, etc. until it works again.

VBB
2nd June 2020, 00:20
OK, so it's not just me. I've been doing the same, but figured there has to be a better way. Thanks for the reply!

nevcairiel
2nd June 2020, 00:23
Regression since 0.72.0. Best thing I've found you can do is wait a few seconds, resume. If it doesn't work, pause, wait a few seconds, resume, etc. until it works again.

Its the audio renderers job to preserve the stream during pause. In fact a decoder hardly even notices when something is paused. It'll just send data as long as a renderer accept it, and then wait until the renderer wants more data.

VBB
2nd June 2020, 00:26
Do you have any recommendation, Nev? I've been using MPC-HC with the built-in renderer, set to exclusive. Not sure what to do here.

nevcairiel
2nd June 2020, 07:52
I don't know of any that really implement pausing with bitstreaming properly.

Aleksoid1978
2nd June 2020, 08:21
MPC-BE's WASAPI Audio Renderer implement pausing with bitstreaming, what's a problem ?

chros
2nd June 2020, 10:16
MPC-BE's WASAPI Audio Renderer implement pausing with bitstreaming, what's a problem ?
Yes, cheers, I asked for it and You were kind enough to implement it :)

I don't know of any that really implement pausing with bitstreaming properly.

Do you have any recommendation, Nev? I've been using MPC-HC with the built-in renderer, set to exclusive. Not sure what to do here.
MPC-HC's own audio renderer (Sanear) does this as well (https://github.com/alexmarsev/sanear/commit/af6d327bc3682977488d8c8f6f193592d4a927ed) (but had some bugs (https://github.com/alexmarsev/sanear/issues/17) with it, I'm not sure that's still the case), maybe that's the issue.

Regression since 0.72.0. Best thing I've found you can do is wait a few seconds, resume. If it doesn't work, pause, wait a few seconds, resume, etc. until it works again.
@VBB, try it with older Lav filters, maybe ...

nevcairiel
2nd June 2020, 10:50
MPC-HC's own audio renderer (Sanear) does this as well (https://github.com/alexmarsev/sanear/commit/af6d327bc3682977488d8c8f6f193592d4a927ed) (but had some bugs (https://github.com/alexmarsev/sanear/issues/17) with it, I'm not sure that's still the case), maybe that's the issue.

Thats not what I'm talking about. I don't care if other audio is muted or not during pause. In fact thats the opposite of proper bitstreaming.

But theoretically during pause the audio renderer is supposed to keep sending bitstream data to the receiver so it doesn't drop the stream, its called a "pause burst", so you can flawlessly resume right away. I'm not aware of any renderer that performs this task, they all seem to only pass data through, and not sending anything during pause, leaving users to blame the decoder if weird stuff happens during pause.

The "regression" mentioned is just another symptom of that, and only for TrueHD, because I implemented proper compliant TrueHD bitstreaming (before that, high-bitrate TrueHD+Atmos would constantly glitch), but due to the way that works, the lack of a proper pause causes even more of a glitch then other methods (because TrueHD actually has a concept of key frames, and if you lack one of those you get a bigger audio gap). And it only affects certain kinds of AVRs, which I like to call "bad ones" (and it can also be triggered by bad TrueHD authoring, or more often bad remuxing into MKV)

Its not something that can ever be fixed in LAV, since LAV just packs the audio into the proper package for bitstreaming. The actual hardware interaction is in the audio renderer.

Aleksoid1978
2nd June 2020, 11:36
Good way for audio renderer - on pause or when mute - send "silence"(WASAPI have flag for send silence data) to the audio device. Send "real" bitstream with silence - i think it's not possible :)

nevcairiel
2nd June 2020, 13:17
"Pause bursts" are not silence as such, they are special control signals that tell the receiver to wait and hold.

Aleksoid1978
2nd June 2020, 13:30
"Pause bursts" are not silence as such, they are special control signals that tell the receiver to wait and hold.

It there any documentation about it ?

VBB
2nd June 2020, 19:00
Thanks for all the detail, guys. What I still don't understand is, why does this only happen with the lossless formats, and not with the lossy ones?

pacuro
5th June 2020, 07:39
@nevcairiel could you please release new nightly Lav with dav1d 0.7.0 ? These improvements in speed are the missing few % in my setup to play av1 4k60 smoothly. Thanks in advance!

pankov
6th June 2020, 11:56
MPC-BE's WASAPI Audio Renderer implement pausing with bitstreaming, what's a problem ?
Alex,
is this renderer available as a standalone filter for 32-bit apps?

ryrynz
7th June 2020, 09:10
Alex,
is this renderer available as a standalone filter for 32-bit apps?

Yes, grab the 'standalone_filters' package from the usual nightly locations.

sah777
9th June 2020, 03:28
Hi LAV Splitter developer,

Please can you consider adding better/more advanced options for setting the file/network file buffering size (like we can set in VLC media player)???

We want to be able to set the EXACT file buffer size in ms or RAM MB (not just the maximum size which we can currently control).

This would help a lot for playing Windows networked video files.

Thanks for consideration!!!
Thank you :D

VictorLS
12th June 2020, 10:15
Can anybody say is h266 (Versatile Video Codec - VVC) supported by ffmpeg (or plan to support in nearest future) so it can be implemeted in LAV Video Decoder?
I'm asking because (seems) first FTA (so not encrypted) 8K SAT channel The Explorers UHD translation in this h266 (VVC) codec is beginning from 28e2 11973v31000 (I can't receive it personally but hope to get record so I'd want to watch that ;)

soresu
12th June 2020, 11:08
Can anybody say is h266 (Versatile Video Codec - VVC) supported by ffmpeg (or plan to support in nearest future) so it can be implemeted in LAV Video Decoder?
I'm asking because (seems) first FTA (so not encrypted) 8K SAT channel The Explorers UHD translation in this h266 (VVC) codec is beginning from 28e2 11973v31000 (I can't receive it personally but hope to get record so I'd want to watch that ;)

VVC is not even fully standardised yet, let alone any hardware decoders available - best you will manage is the decoder in the reference software for the time being.

VictorLS
12th June 2020, 12:44
VVC is not even fully standardised yet
Thanks for reply.
Btw The Explorers UHD seems just 4K (not 8K).

VictorLS
13th June 2020, 16:15
Here's record TransportRecord11973-59130659.ts (94 MB) https://transfiles.ru/2v8xo of h266 (VVC) translation from 28e2 satellite.

el Filou
13th June 2020, 20:14
It's strange that they're already testing it on a satellite https://www.sportsvideo.org/2020/06/09/ateme-ses-join-forces-for-live-uhd-broadcast-using-versatile-video-coding-standard/ when it's still in draft status (even if late draft) https://mpeg.chiariglione.org/standards/mpeg-i/versatile-video-coding. I think that was a private test and it's not meant to stay.
MediaInfo can't even read the metadata. :)

soresu
13th June 2020, 23:48
It's strange that they're already testing it on a satellite https://www.sportsvideo.org/2020/06/09/ateme-ses-join-forces-for-live-uhd-broadcast-using-versatile-video-coding-standard/ when it's still in draft status (even if late draft) https://mpeg.chiariglione.org/standards/mpeg-i/versatile-video-coding. I think that was a private test and it's not meant to stay.
MediaInfo can't even read the metadata. :)

I can't see any reason why it wouldn't work if packed within a data container format already familiar to the satellites systems, which I would assume to be MPEG 2 TS unless things have changed with newer 4K transmission standards.

VictorLS
14th June 2020, 06:36
IMHO testing on SAT proves h266 VVC will be new SAT encoding standard.
May be someone know where we can download OpenVVC decoder developed by IETR from?

huhn
15th June 2020, 01:00
sure: https://vcgit.hhi.fraunhofer.de/jvet/VVCSoftware_VTM
just hope it's the same old version as your stream and bring a lot of time.

clsid
17th June 2020, 15:32
FFmpeg and Dav1d update please ;)

FFmpeg has had some header refactoring and other stuff moved around. So some adjustments to custom LAV patches are needed after rebase (move avisynth headers/mkv font mimetype/fraps/fix h264 sps patch). Better to catch regressions early.

clsid
18th June 2020, 17:20
Thanks for the quick update!

The VP9 ConfigBitstreamRaw workaround also needs to be applied in FFmpeg dxva2.c

Could you have a look at this hang in LAV:
https://github.com/clsid2/mpc-hc/issues/455

clsid
18th June 2020, 17:57
And another issue:
https://github.com/clsid2/mpc-hc/issues/434

And a flac file with playback issues:
https://www.sendspace.com/file/2oxerj
Beginning is wrong. Seeking back to begin also doesn't work properly.

clsid
18th June 2020, 19:11
And a hang issue with DVD:
https://github.com/clsid2/mpc-hc/issues/464

Could you check if this is a LAV issue? It doesn't happen with Microsoft's MPEG-2 decoder.

nevcairiel
18th June 2020, 20:20
The VP9 ConfigBitstreamRaw workaround also needs to be applied in FFmpeg dxva2.c


It does not. That code is never executed.

huhn
19th June 2020, 01:25
i can later try it with the nightly but the first test build didn't work the second with the change in ffmpeg worked.

galneon
19th June 2020, 04:25
The H.264 MVC decoding option is still experimental from what I've read. In what circumstances should it function? It seems my CPU is recent enough to support it (i7-5820k), but this option resets to unchecked every time I enable it and restart MPC-HC. I use madVR with D3D11 exclusive mode.

nevcairiel
19th June 2020, 08:03
The H.264 MVC decoding option is still experimental from what I've read. In what circumstances should it function? It seems my CPU is recent enough to support it (i7-5820k), but this option resets to unchecked every time I enable it and restart MPC-HC. I use madVR with D3D11 exclusive mode.

You need Intel graphics, not a Intel CPU. Yours does not have a built-in Intel GPU.
On Desktop CPUs I would probably advise against using it anyway, decoding 1080p H.264 isn't that complicated, and it avoids conflicts and problems.

If you're using the MPC-HC built-in LAV Filters, it may not be saving the option properly.

huhn
19th June 2020, 10:28
VP9 decoding using AMD GPUs doesn't work with 0.74.1.57-git
only d3d11 native has been tested.

galneon
20th June 2020, 04:45
You need Intel graphics, not a Intel CPU. Yours does not have a built-in Intel GPU.
On Desktop CPUs I would probably advise against using it anyway, decoding 1080p H.264 isn't that complicated, and it avoids conflicts and problems.

If you're using the MPC-HC built-in LAV Filters, it may not be saving the option properly.

I woke up a few hours after posting hit by the revelation of the absurdity of my question. Thanks for confirming!

huhn
21st June 2020, 13:51
AMD VP9 hardware decoding works with 0.74.1.59 thanks.

fried chicken
26th June 2020, 02:14
Are there plans for a true portable version of LAV? Settings just saved to the same dir LAVvideo.ax is in to like LAVvideo.ini for example.

nevcairiel
26th June 2020, 05:23
LAV by itself (or any DirectShow filter) can by its very nature not be "true portable", since using it requires registering it in the system.
Instead, a specially designed playback application could use it in a portable way - and said application could then also manage the setting storage, LAV has all the APIs needed to stop system-wide settings loading and allow an app to do its own load/save.

MPC-HC, for example, does all this. It can use LAV without registering it, and it does tell LAV to not use the system-wide configuration and instead substitutes its own. Now you just need to figure out how to run MPC-HC portable.

There are no further plans. All the tools are there for an application to use it in a portable manner.

v0lt
27th June 2020, 11:02
nevcairiel
LAV Video decoder does not work in DXVA2 mode with H.264.4096x2304.mp4 (https://cloud.mail.ru/public/4VMN/2cLW58TYm).
Nvidia GTX 950, Intel HD 4000.

nevcairiel
27th June 2020, 14:56
The file is baseline profile. Baseline is not hardware compatible. Only "constrained baseline" is - there is a big difference there. Or at least there can be. You can never know if a baseline file will actually work in hardware, thus the only correct thing is to not do it. If one wanted it to be hardware compatible, it should be encoded as "constrained baseline" instead of "baseline".

The naming of "baseline" is a bit awkward, since it allows many codec features that are not allowed in any other popular profile like main or high.

clsid
29th June 2020, 13:57
This webm file hangs when seeking:
https://www.sendspace.com/file/xcg98p

Infinite loop in mkv_Seek in MatroskaParser.c

clsid
30th June 2020, 14:04
This fixes it for me:
diff --git a/libavformat/MatroskaParser.c b/libavformat/MatroskaParser.c
index f2393b6693..8e6452ba0e 100644
--- a/libavformat/MatroskaParser.c
+++ b/libavformat/MatroskaParser.c
@@ -3444,6 +3444,7 @@ void mkv_Seek(MatroskaFile *mf,ulonglong timecode,unsigned flags) {
ulonglong mask,m_kftime[MAX_TRACKS];
unsigned char m_seendf[MAX_TRACKS];
struct Queue *subPreQueues = NULL;
+ int fallback_cue = -1;

if (mf->flags & MKVF_AVOID_SEEKS)
return;
@@ -3490,8 +3491,10 @@ void mkv_Seek(MatroskaFile *mf,ulonglong timecode,unsigned flags) {
for (;;) {
if (!CueSuitableForSeeking(mf, j)) {
// skip this Cue, re-start from previous
+ if (fallback_cue == -1) fallback_cue = j;
--j;
- goto again;
+ if (j >= 0) goto again;
+ else j = fallback_cue;
}

for (n = 0; n < mf->nTracks; ++n) {

nevcairiel
30th June 2020, 16:07
I applied a more thorough fix for this problem. But the file is rather weird anyway. Who would ever put Cue points for audio? It feels like its meant to be cue points for video, but the track order got messed up.

clsid
2nd July 2020, 14:11
Thanks for the fix.

Latest update may cause build failure due to implicit function declaration for max().

mzso
18th July 2020, 15:25
Hi!

Any reason I can't have any HW deinterlacing with an RX580? The HW deinterlacing section stays dimmed no matter which HW (or SW) decoder setting I use.