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

nevcairiel
4th April 2017, 12:11
Problem with "LAV Splitter Source" & "LAV Splitter". This DASH(AVC)-video stop automatically after try to starts:
https://www.dropbox.com/s/5ydixpwtg9rnl4z/%D0%9A%D0%B0%D0%BB%D0%B5%D1%82%D0%B8%D0%BD%20%D0%90%D0%BD%D0%B4%D1%80%D0%B5%D0%B9.mp4?dl=0

Any feedback would be appreciated.

The file plays fine here with the latest nightly version.

videoh
4th April 2017, 12:16
Maybe Nev can shed some light. Apparently not.

nevcairiel
4th April 2017, 12:21
If using "LAV Splitter Source" stream playback reload from start after returning from pause state. Steps to reproduce:
1. Add "LAV Source" to GraphStudio, use "http://podcast.dimitrysmirnov.ru/blog/wp-content/uploads/2017/02/propoved-82258/propoved-82258_i.mp4" as the URL.

Try with tomrrows nightly version, I enabled reconnect for http connections.

nevcairiel
4th April 2017, 12:49
Apparently not.

I tried the most basic YV12 script, something like:

Version()
ConvertToYV12()

And it plays fine in latest MPC-HC. Even more so if you install stand-alone LAV Filters, as it will then use LAV Video to convert the video, instead of relying on a system I420 codec.

So whatever is wrong, is on your end. You didn't exactly give much information other then "it doesn't work" though, so there is nothing i can do.

sneaker_ger
4th April 2017, 12:51
@videoh
Which AviSynth version are you using?

videoh
4th April 2017, 15:50
Avisynth+ 2085

Kadano
5th April 2017, 13:35
I downloaded a version of LAV Filters that allows setting a priority chain for Hardware Decoders (see screenshot below). However, I don't remember where I found it, and I can't find it with Google any longer. Yet I want to install it on a different PC too. Does anybody know where this version is being released?

http://i.imgur.com/poCT6A3.png

clsid
5th April 2017, 14:49
That is tmod version:
http://tmod.nmm-hd.org/LAVFilters/
But chain is usually pointless. Just use DXVA2 copyback.

Avisynth+ 2085
Here you can get a newer version:
http://avisynth.nl/index.php/AviSynth%2B

videoh
5th April 2017, 15:56
Thanks, clsid, I'll try it out today. These are just my growing pains from moving to Win10. :rolleyes:

max79
6th April 2017, 09:50
to sneaker_ger:
I don't understand what do you mean "forced"? My settings:
[HKEY_CURRENT_USER\Software\LAV\Splitter]
"substreams"=dword:00000000
"prefAudioLangs"="rus,eng"

If one of the two remaining questions the answer was- "Yes", then the same problem would be with other types of containers.

Info from "MediaInfo" about .MKV-file with two RUS-audio tracks:
Audio Menu ID: 1(have AC3 format)
Audio Menu ID: 2(have DTS HD MA format)

sneaker_ger
6th April 2017, 10:07
In MKV tracks can be marked as "default" and "forced". If the AC3 track is marked "default" that will have priority over quality.

https://abload.de/img/lav_mkv_default_flag_nzutj.jpg
MediaInfo should also show those flags. Unfortunately, you cut the log down...

the same problem would be with other types of containers.
Post a sample if that is the case.

max79
6th April 2017, 13:26
to sneaker_ger:
Thank you! I got an answer to my question)
If so, why I have no problems with other types of containers? And if the AC3 track is marked "forced" and not "default" what is the difference in that case?

nevcairiel
6th April 2017, 13:30
No other container defines a "Default" stream flag, only Matroska does - and LAV listens when its set. "Forced" is only used for subtitles by LAV, on an audio stream it doesn't have any impact.

LigH
6th April 2017, 14:52
@ max79:

You can inspect (and change) MKV container flags with the MKVToolnix GUI. (Also with mkvpropedit and some GUI for it, but that's rather outdated now, and not so user friendly, editing XML control files etc.)

max79
6th April 2017, 16:37
Why these HLS-streams stoped after few minutes?:
http://www.djing.com/tv/live.m3u8
http://www.djing.com/tv/animation.m3u8
http://www.djing.com/tv/classics.m3u8
http://www.djing.com/tv/dancefloor.m3u8
http://www.djing.com/tv/underground.m3u8

I can play it only through this:
https://www.hlsplayer.net/

to LigH:
Thank you for information!

Any feedback would be appreciated.

nevcairiel
6th April 2017, 16:39
Streaming support is provided "as is", it either works or it doesn't. Streaming doesn't fit very well into the current design of LAVs internals (its designed for file playback).

Helios61
8th April 2017, 15:32
LAV: 0.69.0
Mediaportal 1 current version
INTEL HD 4600 HD Audio
HDMI Connection HTPC -> Yamaha RX-V681



Hi @nevcairiel, Hi @all
I've noticed a lot of audio dropouts while playback of live tv (DVB/C) in Mediaportal with RTL TV, only the AC3 stream. With other stations and MPEG audio streams all is working fine. LAV Audio AC3 bitstreaming is configured in MediaPortal 1.
Testfile ->Link (https://www.dropbox.com/s/sak22gpwjt0c236/Der%20Blaulicht%20Report.ts?dl=0)<-

Have made some tests:
1. Playback in MP with LAV Audio (passthrough): Drop Outs
2. Playback in MP with AC3Filter (passthrough): Drop Outs
3. Playback in MP with MS DTV-DVD Audio (passthrough): Playback is fine
4. Have demuxed the audio stream from the .ts container. Playback of the ac3 stream in Foobar2000 (WASAPI) ist working fine without drop outs. In MPC/HC (LAV Audio) again dropouts.

Could you please look at this behaviour?

Best regards
Helios

max79
8th April 2017, 23:18
to nevcairiel:
I'm checked. In v0.69.0.18-git my SUPPORT REQUEST - #1 not(!) fixed. :(
And my SUPPORT REQUEST - #4 fixed now. :)

max79
9th April 2017, 00:01
Problem with "LAV Splitter Source" but only just in information delivery about audio channels. It's show 5.1ch but E-AC3_Audio-file[http://s1.demo-world.eu/hd_trailers.php?file=dolby_digital_plus_channel_check_lossless-DWEU.mkv] have 7.1ch(please see pic in attachment). Anyway this DD+ file plays correctly through "LAV Splitter Source"+"CyberLink Audio Decoder (PDVD Generic)[v9.4.0.2221]".
https://forum.doom9.org/attachment.php?attachmentid=15846&d=1491692385

Any feedback would be appreciated.

max79
9th April 2017, 00:04
Problem with "LAV Audio Decoder". It's show 5.1ch but E-AC3_Audio-file[http://s1.demo-world.eu/hd_trailers.php?file=dolby_digital_plus_channel_check_lossless-DWEU.mkv] have 7.1ch. And plays BACK channels in SIDE channels(please see pic in attachment).
https://forum.doom9.org/attachment.php?attachmentid=15847&d=1491692662
https://forum.doom9.org/attachment.php?attachmentid=15848&d=1491692670

Any feedback would be appreciated.

sneaker_ger
9th April 2017, 00:18
ffmpeg decoder doesn't decode eac3 substreams. You have to bitstream or use a different decoder. Activate "Use legacy 5.1 channel layout" to output back instead side.

max79
9th April 2017, 00:28
to sneaker_ger:
I think you are wrong! Look at my pic from my SR-#7: Codec = eac3. All DD+ audio files with 5.1ch plays fine! Problem only with DD+ 7.1ch.

huhn
9th April 2017, 06:25
looks like an ffmpeg limitation: https://trac.ffmpeg.org/ticket/4608
bitstreaming should work fine.

adding attachments doesn't mean we can see them.

nevcairiel
9th April 2017, 08:37
Please test these streams with ffmpeg, if it outputs 5.1 there, then you should report the problem there. LAV just uses ffmpeg for decoding, it doesn't implement its own decoders.
As sneaker_ger has said, dependent substreams (ie. as found on Blu-ray EAC3 tracks) are not supported, which is often used for 7.1

PS:
"Side" is the default 5.1 surround channel for Dolby codecs.

nevcairiel
9th April 2017, 08:55
Hi @nevcairiel, Hi @all
I've noticed a lot of audio dropouts while playback of live tv (DVB/C) in Mediaportal with RTL TV, only the AC3 stream. With other stations and MPEG audio streams all is working fine. LAV Audio AC3 bitstreaming is configured in MediaPortal 1.
Testfile ->Link (https://www.dropbox.com/s/sak22gpwjt0c236/Der%20Blaulicht%20Report.ts?dl=0)<-

The stream seems to be broken (the frame CRCs don't match on the audio frames with glitches). Did you have bad reception when recording it?

max79
9th April 2017, 10:36
to huhn:
Sorry. I didn't know. Now i'm fix that.

sneaker_ger
9th April 2017, 10:39
You can't fix attachments. A moderator needs to approve them manually and that often takes days. That's why most people here upload to external hosters instead. (like imgur.com, abload.de for images or sendspace.com, mediafire.com, mega.nz for other files)
But in this case we probably don't need your screenshots. You know it's an ffmpeg feature limitation.

max79
12th April 2017, 11:51
to nevcairiel:
I'm checked. In v0.69.0.20-git my SUPPORT REQUEST - #1 still did not fixed...

nevcairiel
12th April 2017, 11:53
Repeatedly asking will also not fix it. LAV Filters is provided "as is", I cannot fix every obscure use-case immediately, sorry.
Feel free to send a patch that fixes it.

Helios61
12th April 2017, 17:05
The stream seems to be broken (the frame CRCs don't match on the audio frames with glitches). Did you have bad reception when recording it?
It is german Unitymedia cable TV. Quality and signal strength are 100%. TV card is Digital Devices cine DVB-C/C2/T2.

nevcairiel
12th April 2017, 17:43
Well, the stream still appears to be corrupt, the checksums don't match for a bunch of audio frames. Can't really try to improve playback if the first message i get is wrong frame checksums - who knows what happened to the stream exactly.

manolito
12th April 2017, 19:20
@Helios61

Your stream is MPEG2-TS, and these streams ALWAYS need to be converted to PS elementary streams (with PropjectX or PVAStrumento. I prefer ProjectX).

I ran your file through ProjectX, and for the AC3 stream there were many complaints about missing sync words. But after ProjectX had repaired the audio and I remuxed it to an MPEG2 program stream it played perfectly, no dropouts and no sync problems.

Looks like UnityMedia is sending out corrupt AC3 streams...


Cheers
manolito

manolito
12th April 2017, 19:28
@nevcairiel

Since the good old DVB-T is history (in Germany), I do have lots of problems with DVB-T2... :mad:

I decode the files (mTS container, HEVC video, audio either eac3 or aac-latm) using LAVFilters with DSS2Mod. Basically this works, but it looks like leading B-Frames cannot be decoded. See this post by Mr. Cypheros (TS-Doctor):
https://cypheros.de/forum_ger/index.php?PHPSESSID=79ba096d4857235c2d131cc16234f552&topic=3702.msg25288#msg25288

Is this true? I mean, is LAV splitter to blame?


Cheers
manolito

LigH
12th April 2017, 20:03
Sounds like a usual "open GOP" issue? To support easy channel switching, video streams should be encoded with closed GOPs, I believe; but that reduces efficiency slightly...

sneaker_ger
12th April 2017, 20:43
Here (https://drive.google.com/open?id=0B5YjHFt4OQFFb2tlTy1INXFzZDQ)'s a recent sample if needed. Seeking breaks the picture until what I assume is the next keyframe. (And only one program can be used but IIRC that's by design/a known LAV limitation.)
MPC-BE splitter + LAV Video works fine.

nevcairiel
12th April 2017, 22:13
The FFmpeg TS demuxer does not offer such functionality (it doesn't know what kind of frames are in the stream, since thats codec dependent information and mpeg-ts itself does not carry such flags), and I do not currently plan to work on this myself.
I could maybe hide the frames (like h264 does) if that makes you feel better? :) It would still start decoding a "proper" image at the same spot as it does now though.

MPEG-TS is generally not a format you should expect "perfect" seeking on, because the format itself has basically no seeking support. Even finding the appropriate timecode in the file is already a slow process, and with broadcast streams can even be really annoying (ie. with wrap-around).

manolito
13th April 2017, 00:01
@sneaker_ger

Your sample is even nastier than the files I get from my new Xoro DVBT2 receiver... :mad:

MediaInfo reports 7 video and audio streams. Pretty weird already. Repacking it to MKV using the current MKVMerge works without errors, but the resulting MKV does not show any video, neither in VLC nor in DirectShow based players.

Using FFmpeg to repack the file to MKV does work, but I get a nasty A/V sync error. I need to determine the delay manually, taking the values from MediaInfo does not work.

I need to convert my HEVC TV captures to AVC because my streaming box (XTreamer Sidewinder) does not support HEVC, and I desperately need to develop an automatic way to make these conversions. Looks like I got some work ahead of me...

Cheers
manolito

Helios61
14th April 2017, 08:35
Well, the stream still appears to be corrupt, the checksums don't match for a bunch of audio frames.


Looks like UnityMedia is sending out corrupt AC3 streams...

The issue seems to be over. I didn't have noticed dropouts within the last days.
Big Thanks for yor support @nevcairiel and @manolito

oddball
14th April 2017, 15:16
I've just reinstalled Windows 10 Creators Update and I can't seem to get subs to NOT display using XYSubFilter with MPC-BE. Normally I put eng:eng|f;eng:off;*:eng;*:* in both the audio and subtitle fields under 'Advanced' in LAV Splitter. But it's not working. Subs are displaying no matter what.

Any ideas?

sneaker_ger
14th April 2017, 15:30
Do you have "Default track preference" ticked in MPC-BE "Options">"Playback"? It overrides LAV's selection.

P.S.: audio priority is only simple like e.g. "eng,jap,spa" ..., only subtitle field accepts pairs

oddball
15th April 2017, 00:07
Do you have "Default track preference" ticked in MPC-BE "Options">"Playback"? It overrides LAV's selection.

P.S.: audio priority is only simple like e.g. "eng,jap,spa" ..., only subtitle field accepts pairs

That may be why and I am sure I have asked this before and forgot about it :)

Budtz
17th April 2017, 12:04
I get presentation glitches in madvr (one every 5 minutes) with dxva copy back but not cuvid? What could cause this?

Budtz
17th April 2017, 14:21
I get presentation glitches in madvr (one every 5 minutes) with dxva copy back but not cuvid? What could cause this?

I think setting my gtx1060 to optimal performance fixes the issue. but this kind of nagates the point of using dxva in the first place since my cpu can handle 1080p just fine.

any1 got any experiance in this?

Asmodian
17th April 2017, 15:03
It is an Nvidia driver issue, while adaptive often works well the optimal power mode(s) can be too aggressive when saving power.

nevcairiel
17th April 2017, 16:09
Using CUVID puts your GPU into high performance mode at all times, thats the only reason it sometimes is perceived as "better" - you can however do the same setting in the control panel regardless of decoder API used.
So yes, put your card into Adaptive mode, avoid Optimal Power.

Budtz
17th April 2017, 18:15
thx for the info. I wonder how many turns this stuff on who dont need it thinking it gets things running more effeciently when really - unless the cpu cant handle the decoding - its drains more power

lots of sites and forums recommand turning it on to save resourses - seems it most likely will do the opposate on a modern desktop pc

I need it for HECV 4k material but its so far and few between im cosidering running decoding of the cpu to save the resourses.

I cant get HECV 4k matirial to decode. does cuvid not support this? is that why I couldnt get it to work?

I see lots of older sites saying cuvid is the best but i have a feeling that nowadays its dxva thats best

sneaker_ger
17th April 2017, 18:24
I need it for HECV 4k material but its so far and few between im cosidering running decoding of the cpu to save the resourses.
Only tick the respective "UHD 4K" and "HEVC" boxes in LAV Video. It's automatic, then.

I cant get HECV 4k matirial to decode. does cuvid not support this? is that why I couldnt get it to work?

I see lots of older sites saying cuvid is the best but i have a feeling that nowadays its dxva thats best
DXVA2 (copy-back) is recommended. CUVID can be problematic.

But what exactly do you mean by "I cant get HECV 4k matirial to decode."? Only CUVID? Not at all? Black screen? Error message? Software fallback (see "active decoder" in LAV settings during playback)? OS? HEVC 8 bit or 10 bit or 12 bit ... ?

Budtz
18th April 2017, 14:15
Only tick the respective "UHD 4K" and "HEVC" boxes in LAV Video. It's automatic, then.

Thats a good idea. thou i have set my card to run at max performance for dxva to be stable so i guess its using the resourses anyway

DXVA2 (copy-back) is recommended. CUVID can be problematic.

But what exactly do you mean by "I cant get HECV 4k matirial to decode."? Only CUVID? Not at all? Black screen? Error message? Software fallback (see "active decoder" in LAV settings during playback)? OS? HEVC 8 bit or 10 bit or 12 bit ... ?

checking active decoder its not using hardware decodoing. i get no balck screens or anything - it just uses software which resaults in 100% cpu usage

i can only get lav to decode the 4k hevc files using dxva copy back

nevcairiel
18th April 2017, 14:27
As sneaker_ger suggested, your video is likely 10-bit then, which CUVID does not support properly at this time (still waiting for NVIDIA to release the new Video Codec SDK).
In anycase, as mentioned above, DXVA is generally favorable for decoding.

nevcairiel
21st April 2017, 22:08
I've been working the last couple days on refactoring some internals of LAV Video to reduce overhead and make it more efficient, as well as generally cleaning up the code and updating to newer API standards of FFmpeg.
There is still some more work to come, but the big chunks are done. As a result, video decoding in basically all modes is slightly faster (except DXVA2-Native, which stays mostly the same, as it by-passed much of the logic already).

The catch is that I refactored *a lot* of the internals of the LAV Video avcodec module (primary software decoder, and also for the DXVA2 modes), and it is possible that there are new bugs in there that I did not find yet. So to everyone using nightly builds, it would be greatly appreciated if you would report any issues that appear in todays nightly (0.69.0-32 and newer), which did not occur before - either with earlier nightlies, or the 0.69 release.

You can find the latest nightly here:
https://files.1f0.de/lavf/nightly/

The changes I described are in 0.69.0-32 and newer builds.