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

THP
12th December 2014, 08:40
Since that bug was first mentioned here http://forum.doom9.org/showthread.php?p=1695243#post1695243 almost 2 months ago and because we still don't know what's going on, I decided to do a further investigation.

I tried LAV x64 0.59 - 0.60 - 0.61 - 0.62 versions.

I found out that up to 0.61 version, ALL Samsung clips play just fine.

0.62 version broke that, so I think it's something between those two versions 0.61 - 0.62, probably an FFMpeg update introduced a bug in HEVC decoding, in order to be faster.

Since then, all FFMpeg versions, even latest have this bug.

Case solved (from user point of view)

Good work! As you mentioned, from a user point of view, a workaround is indeed possible. So something must have changed in recent versions.

Thunderbolt8
13th December 2014, 16:22
Does the "Expand mono to stereo" option also work with bitstreaming? so when I bitstream a 1.0 track then I will get sound from the left and right speaker instead of the center one?

nevcairiel
13th December 2014, 17:50
Nothing works with bitstreaming.

kiwijunglist
14th December 2014, 10:58
Hi

My audio chain is as follows.
Source -> LAv Audio Filter -> PCM -> Mediaportal Audio Renderer -> PCM -> Audio Receiver

The MP Audiorenderer does the same thing as re-clock.
I have the arcsoft dll file so I can decode HD audio.
My speakers are 5.1, but I have a 9.1 capable receiver.

http://static.commentcamarche.net/en.kioskea.net/pictures/audio-images-configuration-spatiale-5-1.png

My rear speakers are set at ~95 degrees.

What is the best way to downmix any 7.1 audio tracks to my 5.1 speakers?

Preferably I'd like to send the Surround Rear channel to both the speakers at a 70/30 ratio. ie, Right surround back is sent to 0.7 Right surround side speakers and 0.3 to the left sound side speaker. This creates a virtual surround rear speaker.

Regards
Kiwi

nevcairiel
14th December 2014, 11:03
LAV does not support such kind of mixing. Only mixing it offers is a plain mix of left rear into left side/surround, and vice versa.

filler56789
14th December 2014, 12:27
What is the best way to downmix any 7.1 audio tracks to my 5.1 speakers?

Preferably I'd like to send the Surround Rear channel to both the speakers at a 70/30 ratio. ie, Right surround back is sent to 0.7 Right surround side speakers and 0.3 to the left sound side speaker. This creates a virtual surround rear speaker.

Use ffdshow's Audio Processor, or AC3Filter (with its DTS decoder disabled, of course).

balkerman
14th December 2014, 22:21
LAV does not support such kind of mixing. Only mixing it offers is a plain mix of left rear into left side/surround, and vice versa.

Let the receiver down-mix 7.1 to 5.1

Sent from my GT-I9100 using Tapatalk

kalston
15th December 2014, 09:58
Hey,

So I tried to watch a freshly acquired blu-ray (The Scorpion King, I like my cheesy action flick now and then) the other day and noticed distortion several times (fairly rare but happened enough to make me switch back to the DTS core). The DTS core is fine and so are the other languages (not DTS-HD though) but LAV + ArcSoft dtsdecoder cannot seem to decode the lossless part properly. I tried with different versions of the dll (1.1.0.0, 1.1.0.5, 1.1.0.7, 1.1.0.8) and the same happened every time.

Uploaded a sample here :

https://www.dropbox.com/s/li0ocwv2jbcoahq/dthssampledistorted.mka?dl=0


I tried different software for playback as well as disabling all post processing and I even tried ASIO/wasapi/directsound but nope.

nevcairiel
15th December 2014, 10:10
I can't say I can hear any obvious distortions in that sample, and trying to audibly compare it to the core also doesn't reveal anything obvious.
There is also nothing odd happening in the decoder behaviour, if there is a glitch in there and I just didn't hear it, then the decoder outputs it like that, and there isn't anything I can do anyway.

Edit:
I found the distortion, its in the LFE which I had disabled on this system.
Sounds like its just clipping badly, but again, its just output out of the decoder like this.

kalston
15th December 2014, 10:19
Hum it is super obvious to me, night and day between the core and -hd version. I do suspect it's the decoder and not LAV though. It's like, really loud crackling (it's brief though, I think it's in the first 10 sec or so of the sample)

edit : ah there you got it too :)

Well, I'm just surprised because this is the first time I see Arcsoft decoder failing but I do not have any other DTS-HD decoder to compare it with so I'm not really sure what to think. Not that this matters much, it's by no means a great film but I've never had anything like it before. Just makes me lose some faith in the Arcsoft decoder :(

nevcairiel
15th December 2014, 10:29
We've confirmed before that the ArcSoft decoder operates lossless, so its quite certainly possible that the video is mastered terribly. Of course it could also be an obscure bug in the decoder that happens on 0.1% on all audio streams only.
I've actually seen a similar problem before that caused corruption in the LFE due to clipping, but not this strong.

mzso
15th December 2014, 11:47
We've confirmed before that the ArcSoft decoder operates lossless, so its quite certainly possible that the video is mastered terribly. Of course it could also be an obscure bug in the decoder that happens on 0.1% on all audio streams only.
I've actually seen a similar problem before that caused corruption in the LFE due to clipping, but not this strong.
Didn't anyone try to make an open source decoder?

nevcairiel
15th December 2014, 15:16
There is development underway, unfortunately the developer working on this hasn't been very active for the last couple months, presumably because of lack of time.

e-t172
15th December 2014, 16:20
I found the distortion, its in the LFE which I had disabled on this system.

Makes sense. Poor mastering resulting in various artifacts in the LFE channel are not that unlikely, because most systems (including systems used for production) low-pass LFE at 120 Hz or less. Therefore people doing the mastering would not hear any artifacts if they are above 120 Hz, but on the other hand, simply downmixing LFE into the main channels (which is something that LAV can do) would make them audible again. This is why such issues can easily go unnoticed during production.

One solution would be to add an option for an LFE 120Hz low-pass filter in LAV Audio before downmixing, but it's not clear if it's really worth the hassle.

nevcairiel
15th December 2014, 16:35
If I low-pass the audio manually at 120 Hz, the artifacts are barely audible, you can only make them out when you listen to the LFE track alone.
I wonder if its worth providing such an option, and how much effort it would actually be ... I would think ffmpeg has all the tools somewhere..

kalston
15th December 2014, 16:52
Huum interesting, I'm not at home but I think JRiver has such option so maybe I could actually look into that.

zambelli
16th December 2014, 02:09
I noticed that when I open any H.264 video (I tried MP4, TS and MKV containers) with LAV source filter (v0.60.0) and the Microsoft DTV-DVD Video decoder, the first 15 frames or so are completely missing from the output - the decoded stream starts at frame #15, for example. If I replace the Microsoft decoder with the LAV decoder, the problem goes away, but of course it can be tricky to adjust filter merits on every machine.

Is this a known issue? Is there a workaround that doesn't involve changing filter merits?

Anakunda
16th December 2014, 13:38
hi
I have problem with LAV video decoder not using HW acceleration even if the GPU supports MPEG-2. It reports the state only as availabe but rather using avcodec software decoder.
http://i.imgur.com/rYVJIne.png
The same player already uses HW acceleration when watching HD channel (H.264.AVC), so this must be related to MPEG-2. Possibly another filter is stealing the precedence?
Curious because this only happens with certain player while primary offline video player which is also configured to use LAV for everything uses HW acceleration succesfully for the exactly same format. Any hints to resolve the problem? (or debug LAV to see why it's actually not using HW decoder)

LigH
16th December 2014, 13:56
I am not sure but wonder if it is related to the selected renderer. See if you can change the preferred renderer of the players to prefer one which supports acceleration (possibly EVR).

Anakunda
16th December 2014, 14:10
Renderer is EVR by default, changing it to EVR Custom Present or anything else doesn't make any change.
I know the problem is not on side of the codec (stream copy of the broadcast can be HW decoded by PotPlayer+LAV)
Strange is that if I change HW decoder in LAV control to NVIDIA CUVID and reopen the stream, cuvid is active.
This happen only for QuickSync (even that in Nvidia control I have chosen the live player's preference to always use Intel GPU)

jkauff
17th December 2014, 03:25
What version of Windows are you running? Prior to 8.1, QuickSync would not run unless the iGPU was connected to a display. You can set up a "fake" display in the Screen Resolution settings that will make it work in earlier versions of Windows.

Also, make sure you have the latest version of the Intel drivers installed.

theoneofgod
17th December 2014, 20:52
What version of Windows are you running? Prior to 8.1, QuickSync would not run unless the iGPU was connected to a display. You can set up a "fake" display in the Screen Resolution settings that will make it work in earlier versions of Windows.

Also, make sure you have the latest version of the Intel drivers installed.

It also works fine with 8.

hubblec4
18th December 2014, 19:19
Hi Nev

I hope you're not too much stress at the time and not immediately say, no.

Would it be possible to support the Haali TRACKSETEX function(HTS)?
This function is very helpful and easy to use.

I have in almost all videos 2 or more languages with subtitles.
If I change the language, I still have a second time to switch in the menu the subtitle.

http://forum.gleitz.info/attachment.php?attachmentid=98396&d=1418478803

In the Haali menu you see above the Trackset's.
They can be accessed directly and the corresponding tracks are being loaded.
Is a Trackset linked to an edition, they are also loaded the Trackset's when selecting this editon.

The HTS code is also constructed quite simple.
To use, add a tag with the Name set to TRACKSETEX, and the String value set to: EditionUID VideotrackUID AudiotrackUID
SubtitletrackUID Three-letter_language_code Optional_name
No Target is necessary. Setting any of the track UID’s to “.” (a dot, full stop, whatever; without quotes) means “don’t change”,
setting the subtitle track UID to “x” (lowercase letter X; again without quotes) means “disable subtitles”.
When the edition given by the EditionUID is activated, the given set of tracks will be chosen. The track UID’s can be found with
mkvinfo. If you’re too lazy for that you can also just specify track numbers if you say # before the number.

I have installed in my chapterEditor an HTS editor. You can then save those Trackset's directly into a Matroska file.
http://forum.gleitz.info/attachment.php?attachmentid=98400&d=1418483969

If you could set it up, it would be great if you could use the Haali Trackset code.
Here you will find a Tags.xml (http://forum.gleitz.info/attachment.php?attachmentid=98413&d=1418926160) with three examples of Trackset codes.


Thank you and best regards.

NikosD
19th December 2014, 14:42
@Nev

Thanks for the last LAV x64 build 0.63.27 (13/12)

It has fixed the 10 bit HEVC issue with Samsung video files.

I don't know who I have to thank for mentioning the bug to FFMpeg developers, but thanks :rolleyes:

nevcairiel
19th December 2014, 23:33
I reported it to the developers of course, however they haven't moved yet, hopefully in the next year when the end-of-the-year stress dies down.
In the meantime, I applied a quick&dirty fix myself, its probably not 100% correct, but it works for most of the cases anyway.

v0lt
20th December 2014, 19:51
@nevcairiel
I opened .dff file and received the following media type:
Audio: 0x5344 705600Hz stereo 11289kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_DSD {20445344-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 256000
cbFormat: 18

But when I opened .dsf file, then got the wrong media type:
Audio: 0x0000 705600Hz stereo 11289kbps

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

nevcairiel
21st December 2014, 09:50
@nevcairiel
I opened .dff file and received the following media type:

But when I opened .dsf file, then got the wrong media type:

Please fix it.


I updated the DSD media types, however because there is 4 different DSD encoding styles, there is 4 media types now: DSDL, DSDM, DSD1 and DSD8, which match the 4 DSD codec IDs in ffmpeg.
DSD1 seems to be the most common type, nevertheless all the others are supported as well right away.

ryrynz
21st December 2014, 12:11
Nevcairiel, ATM, Microsoft's DTV-DVD decoder works to output the Dolby stream when my receiver is off so that my TV accepts it (stereo)
Would LAV sometime be able to support that? MPDN only supports LAV and the file fails to playback, plus I guess it would be nice to be using LAV exclusively in this instance. Cheers.

nevcairiel
21st December 2014, 12:13
Just tell LAV to bitstream Dolby Digital/AC3? I don't see any problems there.

ryrynz
21st December 2014, 12:38
I do that, it's fine when the receiver is on for certain files, I get 6 channels, but when the receiver is off some files load the DTV-DVD decoder.
The only difference I can see in the audio properties with them is the lsample size is 1 for the file that loads the DTV-DVD decoder rather than 24.

nevcairiel
21st December 2014, 13:21
Sounds like it falls back to decoding and mixing to stereo, rather than bitstreaming.
This automatic fallback is currently not supported with LAV, but is something I plan to work on in the future.

v0lt
21st December 2014, 15:55
I updated the DSD media types, however because there is 4 different DSD encoding styles, there is 4 media types now: DSDL, DSDM, DSD1 and DSD8, which match the 4 DSD codec IDs in ffmpeg.
I think it would be enough of one media type. We could write the type of DSD in wFormatTag.

nevcairiel
21st December 2014, 16:10
This is easier to understand. The bitstream of the different codecs is distinctly different, so a different media type is warranted.

Thunderbolt8
21st December 2014, 22:40
is LAVaudio able to decode DTS Express tracks?

nevcairiel
21st December 2014, 23:07
is LAVaudio able to decode DTS Express tracks?

Only if you provide the ArcSoft DTS decoder DLL.

P.J
22nd December 2014, 20:13
@Nev

Thanks for the last LAV x64 build 0.63.27 (13/12)

It has fixed the 10 bit HEVC issue with Samsung video files.

I don't know who I have to thank for mentioning the bug to FFMpeg developers, but thanks :rolleyes:

Where did you get build 0.63.27?

hubblec4
23rd December 2014, 13:18
Where did you get build 0.63.27?

here! (http://tmod.nmm-hd.org/LAVFilters/)

P.J
23rd December 2014, 22:41
here! (http://tmod.nmm-hd.org/LAVFilters/)
:thanks:

@Nev

Thanks for the last LAV x64 build 0.63.27 (13/12)

It has fixed the 10 bit HEVC issue with Samsung video files.

I don't know who I have to thank for mentioning the bug to FFMpeg developers, but thanks :rolleyes:
But I can't still play them, just black screen :confused:

Arm3nian
24th December 2014, 07:37
Is there any theoretical difference if lav or reclock does float to integer conversion? For example inputting a 8 channel dtshd ma 24bit file, downmixing to stereo, outputting the 32bit float, and letting reclock convert to 24bit int to output via wasapi. Versus unchecking 32bit float support in lav, which I'm guessing would convert to float for the mix, then convert back to 24bit to output it, so reclock would not touch it.

Thunderbolt8
24th December 2014, 09:28
Only if you provide the ArcSoft DTS decoder DLL.I had a dts express track named the same way as I named a blu-ray remux (it was a mkv remux so I couldnt mux it into it), but I wasnt able to find and pick up that track from any menu in mpc-hc (audio switcher is activated). any idea why that is?

filler56789
24th December 2014, 10:46
I had a dts express track named the same way as I named a blu-ray remux (it was a mkv remux so I couldnt mux it into it), but I wasnt able to find and pick up that track from any menu in mpc-hc (audio switcher is activated). any idea why that is?

Please correct me if I am wrong: you've got a "pure" DTS-Express stream, and LAV Splitter does not support 'containerless' DTS Express --- you would need to wrap it in an .m2ts file, at least. You might add a .WAV header to the stream as well.

Thunderbolt8
24th December 2014, 11:03
Please correct me if I am wrong: you've got a "pure" DTS-Express stream, and LAV Splitter does not support 'containerless' DTS Express --- you would need to wrap it in an .m2ts file, at least. You might add a .WAV header to the stream as well.yes, a pure stream just with the .dts file extension.

I tried muxing that stream into a m2ts file with tsmuxer, but the result is still the same. cannot find or select the file with mpc-hc

I also cant play the .m2ts file with the dts express track itself, mpc-hc then says I cannot render the file. tried with mpc internal LAV audio and standalone LAV audio, with the dtsdecoderdll.dll placed in those directories

filler56789
24th December 2014, 11:42
^ Make sure the checkbox for "Secondary (audio)" is ticked in the TSmuxer GUI.

filler56789
24th December 2014, 11:59
...but I wasnt able to find and pick up that track from any menu in mpc-hc (audio switcher is activated).

You said "menu"? :confused:

Control + O, select the video file, then choose the "dub" file.

(I'm still using MPC-HC Lite, and I presume/hope the "LAVved" MPC-HC still supports the same trick).

P.S.: As a last resort, you will have to add a proper .WAV header to the DTSX stream:

http://forum.doom9.org/showthread.php?p=1641949#post1641949

Thunderbolt8
24th December 2014, 13:10
^ Make sure the checkbox for "Secondary (audio)" is ticked in the TSmuxer GUI.that field is greyed out for me.
You said "menu"? :confused:

Control + O, select the video file, then choose the "dub" file.

(I'm still using MPC-HC Lite, and I presume/hope the "LAVved" MPC-HC still supports the same trick).well, I meant right click into the picture and then either audio or filters + audio switcher or filters + lav audio. cant see the dts express track anywhere there.

didnt work with ctrl + o and then the dub file either. only can see the standard 5.1 track of that movie.

filler56789
24th December 2014, 13:13
I added a P.S. to my previous post.

Yes, it seems TSmuxer has something against 24-bit DTS Express :confused:

P.S.:

that field is greyed out for me.

Ooops, by using TSmuxer.exe, not the GUI, it's possible to add manually the secondary switch to the .META file.

Thunderbolt8
24th December 2014, 13:49
thanks for the link to the waveheader. however I dont understand how to edit it. Do I edit the hex field or the text field? and what If the numbers I need exceed the space of the symbols? (e.g. \\\\ for number of bytes arent enough for that many digits I need to express the size in bytes). the track I have is a 1.0 48kHz 96kbps 24-bit track with a size of 80.674.816 bytes

I are confused

filler56789
24th December 2014, 13:55
Before going into more complications,
please give a try to my last P.S. :)

Thunderbolt8
24th December 2014, 15:12
alright, the muxing worked. I can now select the track in mpc-hc. however I still cannot play the track. whenever I switch to it, the video just stops and doesnt continue any more -.-

do I maybe need a certain version of arcsoft here? currenly I am using 1.1.0.1

filler56789
24th December 2014, 15:37
Versions 1.1.0.8 and 1.1.0.9 support mono DTS Express.

1.1.0.8 converts mono to stereo, whereas 1.1.0.9 redirects the front center channel to the front left channel :scared: