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

NikosD
6th May 2015, 17:33
Have you tried to convert a VC-1/WMV3 clip with an Avisynth filter ?

And yes of course I have benchmarked decoders using AVSMeter another reason to say that copy-back is slower than QS (sometimes a lot slower, other times with a small difference)

huhn
6th May 2015, 18:03
i can easily open a vc-1 stream from a BD with ffmepsource2.

and yet again it doesn't really matter how fast avsmeter is as long as it is not slower as real world encoding.

@ligh

i agree dss is not a proper source.

carlos.henrique
7th May 2015, 21:56
Hello,

I´m using LAV Audio Decoder to process audio streams from brazilian DVB-T broadcasts and noticed something.

Some transmissions here have multiple audio streams. If I select a stereo audio stream, LAV Audio Decoder works fine, but if I select a 5.1 stream the resulting audio is not properly decoded. These happened in both 0.64.0 and 0.65.0 versions.

I have uploaded two files, one stereo and other 5.1, that were dumped directly from the audio streams being broadcasted:
http://www.fileconvoy.com/dfl.php?id=g570dcb3d2108e4a3999660704ffade222e22f61ad

I have tried playing these files with ffplay and it works fine for both, identifying them as aac_latm streams. I then built a filtergraph for playing each file using LAV Splitter Source and LAV Audio Decoder and the same thing happened again: the stereo stream played fine, the 5.1 stream did not.

As a side note, when decoding from live broadcasts I wasn´t using LAV Splitter, only LAV Audio Decoder was involved on the chain.

I would be very grateful if someone could test these files and confirm my results, or else tell me what am I missing.

Thanks in advance guys.

foxyshadis
7th May 2015, 22:17
The only use case I can think of where realtime transcoding matters to normal people is AVC->ASP for old XBox streaming, or HEVC->AVC or VP9->AVC for newer consoles/TVs/etc. I doubt you'd get enough difference to go up a preset just from changing to faster decoding, especially if it involved using up some of the CPU resources.

mindbomb
8th May 2015, 00:51
I always thought the difference between the hardware decoders was that copyback was mainly limited to full bitstream decoding, and cuvid and quicksync could more easily do formats where only hybrid decoding was supported. But copyback does support hybrid hevc decoding, so I don't even know anymore.

edcrfv94
8th May 2015, 01:13
if have a Extra Audio *like flac mka , seek will very slow
Can it be fix?

huhn
8th May 2015, 01:39
I always thought the difference between the hardware decoders was that copyback was mainly limited to full bitstream decoding, and cuvid and quicksync could more easily do formats where only hybrid decoding was supported. But copyback does support hybrid hevc decoding, so I don't even know anymore.

the difference is that CUVID and QS are always copyback no matter what. CUVID can do some more uninportant codecs like MPEG4 ASP but who needs a hardware MPEG4 ASP decoder?

CUVID and DXVA use the same decoder for HEVC/AVC/VC-1 making CUVID pretty much useless these days.

if i'm not mistaken QS can decode VC-1 and intel DXVA(ivy/sandy no clue about haswell) can't decode that.

older AMD GPUs have pretty bad DXVA decoder that can't decode UHD AVC. QS could be useful in these cases. but in general if hardware decoding is needed DXVA should deliver anything that is needed.

romulous
8th May 2015, 10:53
Found a clip where the audio does not work correctly on my 5.1 system:
http://videos.hd-trailers.net/MissionImpossible5_TLR-1-1080p-HDTN.mp4 (174MB)

Audio for certain parts of the trailer is impossible to hear (using LAV 0.65, default configuration). AC3Filter is fine.

nevcairiel
8th May 2015, 12:50
I have uploaded two files, one stereo and other 5.1, that were dumped directly from the audio streams being broadcasted:
http://www.fileconvoy.com/dfl.php?id=g570dcb3d2108e4a3999660704ffade222e22f61ad

I have tried playing these files with ffplay and it works fine for both, identifying them as aac_latm streams. I then built a filtergraph for playing each file using LAV Splitter Source and LAV Audio Decoder and the same thing happened again: the stereo stream played fine, the 5.1 stream did not

Actually, ffplay and ffmpeg have the same problems - LAV is just more aggressive at maintaining audio/video sync, which causes audio glitching.
But the core problem is the same - the ffmpeg aac decoder fails to decode a few of the audio frames, which result in missing audio (which triggers LAVs A/V sync correction logic).

I recommend to report this directly to ffmpeg (http://ffmpeg.org/bugreports.html)

nevcairiel
8th May 2015, 12:54
Found a clip where the audio does not work correctly on my 5.1 system:
http://videos.hd-trailers.net/MissionImpossible5_TLR-1-1080p-HDTN.mp4 (174MB)

Audio for certain parts of the trailer is impossible to hear (using LAV 0.65, default configuration). AC3Filter is fine.

Seems to play just fine here.

clsid
8th May 2015, 15:08
With Mixer disabled that file outputs 0x60f channel mapping, with Mixer enabled the standard 0x03f.

So either enable the Mixer or update the audio driver.

nevcairiel
8th May 2015, 15:23
Thats actually a bug, 5.1 should all be using 0x60f now, as that is the more correct form.

carlos.henrique
8th May 2015, 15:51
Actually, ffplay and ffmpeg have the same problems - LAV is just more aggressive at maintaining audio/video sync, which causes audio glitching.
But the core problem is the same - the ffmpeg aac decoder fails to decode a few of the audio frames, which result in missing audio (which triggers LAVs A/V sync correction logic).

I recommend to report this directly to ffmpeg (http://ffmpeg.org/bugreports.html)

Ok, thanks nevcairiel for your time.

I made some more tests with FFmpeg, this time transcoding the AAC 5.1 stream to PCM, and I can see that there are many "channel element 0.2 is not allocated" errors being reported, although that the resulting file seems to be generated without errors, no glitches. Transcoding the stereo stream produces no error messages.

I´ll try to report this to FFmpeg, let´s see what I can get there.

As you said that the problem is related to audio/video sync, I have also tried to disable the LAV Audio Decoder setting "Auto A/V Sync correction", but nothing changed.

Anyway, thanks for your help man.

nevcairiel
8th May 2015, 16:43
The channel element not allocated error is the one you want to go away. As long as that shows up, audio is missing. It may not be terribly obvious when listening to it through ffplay or a conversion through ffmpeg, but LAV does more magic for spot-on AV sync, which causes an extra glitch as it re-syncs after the decoding failure.

Liandri
10th May 2015, 08:59
I'm getting lags when using LAV Splitter Source on some MPEG-4/HEVC videos (not using DXVA2, no lags with internal splitters). Does this sound like a known issue?

cihub
11th May 2015, 19:39
I have Matroska VFR video in which last frame is a duplicate that lasts for about 40 frames. Problem is, it seems that both Haali and LAV splitter stop playback when they reach that frame (AviSynth hangs, MPC-HC just skips like there's no 40 frames in-between). Is it a bug, or just a way the whole system works (i.e. someone else's bug)? ATM I can solve this by making the last frame a real one, not virtual, but it is an ugly, time-consuming, error-prone hack.

nevcairiel
11th May 2015, 21:23
The duration of frames is largely irrelevant and mostly not used at all in DirectShow playback. Don't expect that to ever work.

foxyshadis
12th May 2015, 02:38
I have Matroska VFR video in which last frame is a duplicate that lasts for about 40 frames. Problem is, it seems that both Haali and LAV splitter stop playback when they reach that frame (AviSynth hangs, MPC-HC just skips like there's no 40 frames in-between). Is it a bug, or just a way the whole system works (i.e. someone else's bug)? ATM I can solve this by making the last frame a real one, not virtual, but it is an ugly, time-consuming, error-prone hack.

You don't need to rework your scripts to separate out the last few milliseconds from the 2-second final frame, you can just copy it, or add a black frame. If it's re-encoding you're worried about, you can concatenate a fresh-encoded black frame with mp4box or mkvmerge.

cihub
12th May 2015, 12:19
OK, thank you both. BTW, I figured out how to avoid that "ugly, time-consuming, error-prone hack": since I use DeDup all I need is to edit file with metrics and set the difference between frames N-1 & N to 100%.

NikosD
13th May 2015, 17:33
Hello.

Nevcairiel are you interested in developing QS decoder based on Eric's decoder or build a fresh one ?

It's been almost 2 years since the last update by Eric and since you have developed a decoder based on NVCUVID, maybe you could be involved in MSDK too.

According to Eric it's just a thin wrapper over DXVA and much more easier to write code for that.

There are a lot of things that DXVA doesn't support and never will, but MSDK supports them already.

For example VP9/VP8 - I don't know when Microsoft is going to release a DXVA decoder device for them, if ever.

But even for video formats like HEVC hybrid decoding, MSDK supports 8bit/10bit, I'm not sure about DXVA since I don't have a Broadwell.

Anyway, it's just a thought.

nevcairiel
13th May 2015, 17:37
Didn't my earlier post on QS/MSDK make my feelings quite clear?
I would rather remove it then spend time working on code for only one GPU, when I could be working on code that works on all GPUs (DXVA).

NikosD
13th May 2015, 17:47
But NVCUVID it's for one GPU only too.

And I know that you like to write your own code and not based on the others, so I didn't think that your feelings were for MSDK in general but only for that specific project of MSDK.

It's your call.

nevcairiel
13th May 2015, 17:51
CUVID was the first decoder, before even DXVA2 existed in LAV, so its just legacy now. And there is maybe only a handful changes that were required to it since 2012, and most of that was support for HEVC (which was still quite easy)

Della
14th May 2015, 16:50
Please pardon my ignorance, though I've googled the crap out of this question.

Could someone explain to me why when I choose bitstreaming (for any format my Samsung HU8550 suports, AAC, DD, DTS etc) in LAV filters to the TV, no audio is played? It'll bitstream just fine to the AVR (Emotiva XMC-1), but not to the TV.

The reason I'd like to do this is to avoid having to choose the windows default audio source when I switch between the the AVR & TV. I know I can use PCM, but then I have to change the LAV Mixing setting from 5.1 to stereo, otherwise the volume (using 5.1 mixing to TV) is VERY low.

Thank you for any guidance.

nussman
14th May 2015, 19:36
Because your TV doesn't accpect audio bitstreaming?

Della
14th May 2015, 21:06
Because your TV doesn't accpect audio bitstreaming?

Yeah, I get that.

But if a device is capable of decoding a particular format (i.e. MKV-> video =ts ad audio = DTS), playing the file directly, am I to understand that a player like MPC, using LAV "bitstreams" the audio to the set.

IOW, just because a device can decode a format, it doesn't mean it can accept a "bitstream" OF that format?

Thanks

captainadamo
14th May 2015, 21:57
But if a device is capable of decoding a particular format (i.e. MKV-> video =ts ad audio = DTS), playing the file directly, am I to understand that a player like MPC, using LAV "bitstreams" the audio to the set.

No, that's not what it means. That's only telling you it can decode when using built-in player of the smart TV. You're not using the built-in player if you're using MPC with LAV. At that point, you're at the mercy of what audio it will accept to be fed directly which is much more limited.

Qaq
14th May 2015, 22:41
just because a device can decode a format, it doesn't mean it can accept a "bitstream" OF that format?You can find all supported formats in sound device properties ("TV HDMI audio" or something).

Della
14th May 2015, 22:55
No, that's not what it means. That's only telling you it can decode when using built-in player of the smart TV. You're not using the built-in player if you're using MPC with LAV. At that point, you're at the mercy of what audio it will accept to be fed directly which is much more limited.

Thank you. I asked sideways, but I understand now that the ability to decode a supported format does not equate to accepting a stream of bits in that format.

I think.

Della
14th May 2015, 22:57
You can find all supported formats in sound device properties ("TV HDMI audio" or something).

Thanks.

TheShadowRunner
16th May 2015, 23:33
Nev, today I (finally) tried the big jump from Haali splitter to LAV splitter for matroska.
I was worried how LAV subs selection would work but the Advanced mode can replicate exactly how I had Haali set up, that's perfect.

However I notice opening files + going to previous/next chapter is significantly slower with LAV.
While it's pretty much instantaneous with Haali, it takes up to 2-3 seconds with LAV.
I play the files from local HDD so the "Stream Analysis Duration" setting has no effect.
Similarly the "Maximum Queue Memory" setting didn't seem to change anything.
I use LAV Video decoder in both cases (when using LAV or Haali splitter)..
The video format is h264.
Actually the only thing that changes in the chain when testing is the splitter.

Would you have any idea what this slight delay could be due to?

kiwijunglist
19th May 2015, 04:10
Hi

Q: If I set surround mix level to sq(.5) ie 0.701 then does clicking normalize matrix in a 7.1 to 5.1 dowmix actually do anything? ie. Isn't it already normalized? Because I would guess that mixing two channels together at a 0.701 would be 1.0?

The reason I ask is because I'd like have my cake and eat it to, ie
1. Avoid a large reduction in dynamic range/volume due to the normalization
2. AND also have settings where clipping is unlikely to happen.

I read earlier in this thread that in most situations using clipping protection, you usually only decrease volume by a factor of 1.2x (whereas normalization gives a 2.4x reduction ). So I thought if I set mix level to 0.8 (or maybe sq(0.8)=0.774), and enabled clipping protection I would be in a situation where I had a smaller amount of volume reduction and activation of the clipping protection would be very very infrequent.

ie.

Mix to 5.1 = Yes
Normalize Matrix = No
Clipping protection = Yes
Surround Mix = 0.8 or 0.774

Is my understanding correct?

Thanks
Kiwi

PS: Well done on adding support for DTS-HD MA and Dolby TrueHD!

mogli
19th May 2015, 08:04
@kiwi
Loudness-wise you're correct, since it means adding the squares, i.e. sqrt(0.5)^2 + sqrt(0.5)^2 = 1.
However clipping-wise your wrong, since this means plain adding, i.e. sqrt(0.5) + sqrt(0.5) ~= 1.4.
So you either need to normalize by dividing by about 1.4 or use the clipping protection to lower the volume only when needed.

burfadel
21st May 2015, 10:09
I tried out the latest nightly, LAVFilters-0.65.0-8.exe, and it caused Staxrip not to work. The issue was the QAAC audio encoder was failing. I tried reinstalling LAVFilters-0.65.0-8.exe with no avail, but version LAVFilters-0.65.0-7.exe seems to work fine. Actually, LAVFilters-0.65.0-7.exe is what I have been running for a few days without this issue.

nevcairiel
21st May 2015, 10:12
-8 only had a minor insignificant change in the build script compared to -7, there must be something else broken for you.

LigH
21st May 2015, 10:22
I could not imagine how LAV Filters could interfer with QAAC, specifically. If at all, decoding your audio source via DirectShow may fail?

Qaq
21st May 2015, 10:39
Is Intel IGP's "copy back" data routing somewhat different from AMD's and Nvidia's?
I'm trying to figure out the best decoding strategy for G1830 + madVR.

burfadel
21st May 2015, 12:37
-8 only had a minor insignificant change in the build script compared to -7, there must be something else broken for you.

I could not imagine how LAV Filters could interfer with QAAC, specifically. If at all, decoding your audio source via DirectShow may fail?

I worked out the issue. Well, more precisely worked out why it was failing and how to fix it.

I'm running Windows 10 TP, and build 10122 was released. Windows didn't quite update as cleanly as it should have, and the reason why I thought it was LAVF is that I updated it at the same time. Strangely enough, installing the older version immediately made it work for two encodes... until I stopped it and started it again! I previously also reinstalled the Apple Application support etc.

So, I ran the latest Auslogics Regcleaner (with all the check areas selected on the left). Could possibly have been a media filter registry error or something... It seems to be working flawlessly now on the latest build of LAV Filters, no matter if I stop and start it again etc.

You can download it here:
http://www.auslogics.com/en/software/registry-cleaner/

So keep in mind those with Windows 10 TP and on the fast path, that there may be a media filter anomaly after you update!

Edit:
Well, I stopped and rebooted and started it again (I got curious about it)... Sure enough, it failed continuously (went on to the next file and same thing). Anyways, I stopped it, started it again, dropped it down to the system tray and it works. So, after all that, it could be a NET Framework issue... I don't know lol. Windows 10 10122 issue.

stax76
21st May 2015, 15:18
I'm also on Win10 build 10122 and latest LAV Filters nightly, no problem with the win update, qaac or anything else except a annoying Win10 bug I had from the beginning.

mkanet
24th May 2015, 00:48
How do I upmix stereo to 5.1 audio? I tried searching for this topic, only to find other people asking to do the same thing. I tried selecting Enable Mixing + Output Speaker Configuration = 5.1... and also selected Dolby Pro Logic II encoding. However, none of that made any difference. I'm hoping I don't have to install ffdshow just to be able to get upmix audio to work, but it's starting to look that way.

I found a directshow matrix mixer which seems to specifically support upmixing.
http://matrix-mixer.sourceforge.net/

huhn
24th May 2015, 01:36
How do I upmix stereo to 5.1 audio? I tried searching for this topic, only to find other people asking to do the same thing. I tried selecting Enable Mixing + Output Speaker Configuration = 5.1... and also selected Dolby Pro Logic II encoding. However, none of that made any difference. I'm hoping I don't have to install ffdshow just to be able to get upmix audio to work, but it's starting to look that way.

I found a directshow matrix mixer which seems to specifically support upmixing.
http://matrix-mixer.sourceforge.net/

lavfilter doesn't support up mxing. and to be honest that should be the work of the audio renderer.

mkanet
24th May 2015, 04:12
Actually, after thinking about, it does make sense to do this in a postprocessing audio filter.

I did try MatrixMixer's basic stereo expand to 5.1 upmix; however, ffdshow Audio Processor filter (with DolbyPrologicII + LFE crossover + Mixer3/0/2+LFE) gave me the stereo sound processing I was looking for; actually, sounds better than I expected.

lavfilter doesn't support up mxing. and to be honest that should be the work of the audio renderer.

burfadel
24th May 2015, 08:46
How do I upmix stereo to 5.1 audio? I tried searching for this topic, only to find other people asking to do the same thing. I tried selecting Enable Mixing + Output Speaker Configuration = 5.1... and also selected Dolby Pro Logic II encoding. However, none of that made any difference. I'm hoping I don't have to install ffdshow just to be able to get upmix audio to work, but it's starting to look that way.

I found a directshow matrix mixer which seems to specifically support upmixing.
http://matrix-mixer.sourceforge.net/

I was going to say that looks like AC3Filter, then I saw the link down the bottom!

http://www.ac3filter.net/wiki/Download_AC3Filter

It's open source now, and could probably do with some work and tweaking etc (and a new build). It still works perfectly fine on Windows 10 x64 though and has included 32-bit and 64-bit versions. You just need to add it to the external filter list of your media player (MPC-HC, MPDN or whatever).

JarrettH
25th May 2015, 15:56
Ok I can't find this and there's no tooltip for it. I forget what the difference between film and video output mode in YADIF is :S

25/30 means you're outputting 25 or 30 fps?
50/60 means you're outputting 50 or 60 fps?

captainadamo
25th May 2015, 15:59
25/30 means you're outputting 25 or 30 fps?

For PAL you'll get 25fps for NTSC you'll get 30fps because it's doing single-rate deinterlacing.

50/60 means you're outputting 50 or 60 fps?

Same as above but it's doing double-rate deinterlacing.

huhn
26th May 2015, 02:11
Ok I can't find this and there's no tooltip for it. I forget what the difference between film and video output mode in YADIF is :S

25/30 means you're outputting 25 or 30 fps?
50/60 means you're outputting 50 or 60 fps?

for interlaced material 50/60 is the right choice. 25/30 is a trade quality for speed option.

for film you usually want to use a detelecine filter not a deinterlancer.

cvrkuth
26th May 2015, 18:44
One question about the system tray icons. Use Lav filters with Subtitle Edit.

So, while the movie is playing icons show is system tray. When I stop the movie, icons are still there... and so on

http://krstic.eu/system_tray.jpg

nevcairiel
26th May 2015, 18:46
That happens sometimes when the application is closing the filter too aggressively, and is an unavoidable side-effect. You can just disable the tray icons if you don't want them.

Schwartz
30th May 2015, 01:02
Watching a H.265 video in a M4V container, even though I have HEVC ticked and set LAV to DXVA2 copy-back, it only does software decoding.

wanezhiling
30th May 2015, 01:15
Watching a H.265 video in a M4V container, even though I have HEVC ticked and set LAV to DXVA2 copy-back, it only does software decoding.
Your video card is not GTX 960, is it?:p