View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
nevcairiel
9th July 2012, 17:22
0.51 is pretty problematic for me. I am using LAV Video within DVBViewer (DXVA2 native). When switching between H.264 HD channels I often get a green image, sometimes the DVBViewer even crashes.
Because the other version i posted would probably not have done much, here is another one to test:
http://files.1f0.de/lavf/LAVFilters-0.51-dxvatest2.zip
Let me know how this one fares.
If anyone else wants to test this one on DXVA things, you're welcome to it.
Keiyakusha
9th July 2012, 17:29
Thanks for the new version! Its perfect! :)
6233638
9th July 2012, 17:36
Down-Mixing
One of the big new things in this version is of course the new audio downmixing.
In this version, you get the first set of down-mixing functionality, which should probably cover this function for most people.
To use it, basically just enable it and select the target speaker configuration. You can fine-tune some of the other options, but in general it should work just fine with the defaults.It's fantastic to have this built into LAV Audio now, but can you explain what the difference between "clipping protection" and "normalize matrix" is?
I would have thought that "normalize matrix" would be the default option, but it seems to be "clipping protection".
And has anyone figured out the solution is for DVD playback Macrovision Errors with madVR and LAV Filters beyond 0.50.1 without modifying system files? It only seems to be affecting some people now, so there must be a way around it.
nevcairiel
9th July 2012, 17:42
It's fantastic to have this built into LAV Audio now, but can you explain what the difference between "clipping protection" and "normalize matrix" is?
Normalize Matrix will always normalize the matrix, and some people complained that the resulting audio was not loud enough for their low-powered speakers/headphones (because the volume of all channels is reduced to remove the theoretical possibility of clipping)
Clipping Protection on the other hand will not normalize the matrix, and instead work on the assumption that audio is mastered with so much headroom in the dynamic range that mixing will not overflow it (much). Clipping protection will then analyze the audio and check if it would overflow, and if it does, apply a small normalization factor which reduces the volume a bit so it doesn't overflow.
This has the advantage that you basically use the full dynamic range and don't lower the volume of the audio for no good reason. It'll only lower the volume if required, to avoid clipping.
In my tests, on default settings in LAV, it usually ends up overflowing to 1.2 or something, so the clipping protection reduces the global volume by factor 1.2, so the maximum goes back to 1.0. In contrast, a normalized matrix reduces the volume by 2.6.
fastplayer
9th July 2012, 17:48
Can you please add that explanation in a tooltip? I have a "feeling" 6233638's question will come up again and again.
6233638
9th July 2012, 18:10
Normalize Matrix will always normalize the matrix, and some people complained that the resulting audio was not loud enough for their low-powered speakers/headphones (because the volume of all channels is reduced to remove the theoretical possibility of clipping)
Clipping Protection on the other hand will not normalize the matrix, and instead work on the assumption that audio is mastered with so much headroom in the dynamic range that mixing will not overflow it (much). Clipping protection will then analyze the audio and check if it would overflow, and if it does, apply a small normalization factor which reduces the volume a bit so it doesn't overflow.
This has the advantage that you basically use the full dynamic range and don't lower the volume of the audio for no good reason. It'll only lower the volume if required, to avoid clipping.
In my tests, on default settings in LAV, it usually ends up overflowing to 1.2 or something, so the clipping protection reduces the global volume by factor 1.2, so the maximum goes back to 1.0. In contrast, a normalized matrix reduces the volume by 2.6.Thanks, so is it adjusting dynamically then, or simply reducing the volume by 1.2?
What happens if both are enabled? (I would assume only normalization takes effect, as it should avoid clipping)
Personally I'd rather take the volume reduction of normalization to avoid clipping and DRC.
Any thoughts on expanding the downmixing with HRTF/Dolby Headphone functions? (I don't know if Dolby Headphone is something that could be implemented in a similar fashion to DTS-HD decoding using an external DLL)
nevcairiel
9th July 2012, 18:14
Thanks, so is it adjusting dynamically then, or simply reducing the volume by 1.2?
Its dynamic.
What happens if both are enabled? (I would assume only normalization takes effect, as it should avoid clipping)
Since it would never exceed 1.0, clipping protection would just waste a few cpu cycles, but not touch audio.
Any thoughts on expanding the downmixing with HRTF/Dolby Headphone functions? (I don't know if Dolby Headphone is something that could be implemented in a similar fashion to DTS-HD decoding using an external DLL)
No plans at this time.
ney2x
9th July 2012, 18:15
Can you add Enable sound compressor or Audio Boost in LAV Audio (just like in Reclock)? I ask this because I only have a cheap speaker and also I want to ditch Reclock permanently. Anyways, a big thanks for the new version.
nevcairiel
9th July 2012, 18:16
I also have no plans for dynamic range compression at this time.
Keiyakusha
9th July 2012, 18:20
Any thoughts on expanding the downmixing with HRTF/Dolby Headphone functions? (I don't know if Dolby Headphone is something that could be implemented in a similar fashion to DTS-HD decoding using an external DLL)
We was already talking about Dolby thing not so long ago. It will require implementing wrapper (EDIT: not only wrapper but someone need to figure out its api first.) for 3rd party dll that can't be bundled with LAV filters... Even though I want it too, I don't see it happening in LAV...
There is similar opensource stuff which can be found in ffdshow but to me it doesn't sounds good.
RealSnoopyDog
9th July 2012, 20:09
Hi nev! Thank you for all the latest updates :)
I can confirm what CiNcH wrote: from version 0.50.5-25 on, i get constant crashes when i zap around between HD stations in DVBViewer. I have this with versions 0.50.5-25, 0.50.5-46, 0.51 and LAVFilters-0.51-dxvatest2. When i revert back to LAV 0.50.5, the system is stable again.
I have this on my laptop (Windows 7 64 bit / nVidia GTX560) and my HTPC (Windows 7 32 bit / ATI 6670).
nevcairiel
9th July 2012, 20:14
from version 0.50.5-25 on, i get constant crashes when i zap around between HD stations in DVBViewer. I have this with versions 0.50.5-25, 0.50.5-46, 0.51 and LAVFilters-0.51-dxvatest2. When i revert back to LAV 0.50.5, the system is stable again.
Thanks, that narrows is down a bit at least.
Can you try this?
http://files.1f0.de/lavf/LAVFilters-0.51-dxvatest3.zip
I'm basically stabbing in the dark here. I got it to crash once or so, but it took ages, so testing again if it still crashes just takes too long to be conclusive.
RealSnoopyDog
9th July 2012, 20:21
This version seems to be stable now, but it takes a while to confirm this. The only thing: it takes a very long time, until the filter graph gets activated, maybe, because you do debug output (?)
nevcairiel
9th July 2012, 21:06
I noticed myself that it always took a while until everything got started, but when looking into it seemed like DVBViewer was just not sending data earlier, and the decoder can only properly init itself once data arrives, so not sure whats up.
If that version does not produce any more problems for DXVA in DVBViewer, i'll put out a final version tomorrow, maybe it'll be better again in that build, who knows!
JarrettH
9th July 2012, 22:02
It's fantastic to have this built into LAV Audio now, but can you explain what the difference between "clipping protection" and "normalize matrix" is?
I would have thought that "normalize matrix" would be the default option, but it seems to be "clipping protection".
And has anyone figured out the solution is for DVD playback Macrovision Errors with madVR and LAV Filters beyond 0.50.1 without modifying system files? It only seems to be affecting some people now, so there must be a way around it.
So 0.51 hasn't fix that problem for you? :(
Does the downmixing implemented work similarly/better than ffdshow?
6233638
9th July 2012, 23:57
So 0.51 hasn't fix that problem for you? :(Nope. I wish I knew what the cause was, as others including Nevcariel seem to have DVD playback working fine with madVR now.
Does the downmixing implemented work similarly/better than ffdshow?Seemed fine, though there are no options for a custom matrix. I can't see why you would need that though.
Didn't spend too much time with it though, as it's only working with Blu-rays and not DVDs though. I assume it's being done with at least as much precision as ffdshow.
Keiyakusha
10th July 2012, 00:31
Didn't spend too much time with it though, as it's only working with Blu-rays and not DVDs though. I assume it's being done with at least as much precision as ffdshow.
Mixing works with any kind of audio input... Be it DVD, BD or any user encoded file or even simple mp3 file. Anything that can be decoded with audio filter.
Fullmetal Encoder
10th July 2012, 00:54
So 0.51 hasn't fix that problem for you? :(
Does the downmixing implemented work similarly/better than ffdshow?
I still can't get it to work either. Although I don't get an actual macrovision error I either get a black screen or just the MPC-HC logo.
Superb
10th July 2012, 01:04
Thanks for the new version. Mixing is great.
Any chance you could provide some sort of explanations regarding the different options on the mixing page? Kinda tough to understand for those of us w/o background in the way mixing works.
For example, if I have stereo speakers, why would I need the "don't mix stereo sources"?
killazys
10th July 2012, 03:10
What's the verdict on using an x64 setup (MPC-HC x64, LAV filters x64)? I know a year ago it wasn't recommended because the MPC-HC x64 builds were buggier and slower than x86 builds. Is that still the case? I'm trying to squeeze as much playback speed as possible from my setup while still being able to output P010.
Keiyakusha
10th July 2012, 03:18
I know a year ago it wasn't recommended because the MPC-HC x64 builds were buggier and slower than x86 builds. Is that still the case?
Same if not worse. But even if it will be perfectly stable, x64 wont be any faster. Only few kind of software can really benefit from x64 architecture and this is not one of them. x64 is not a synonym for "more speed"
What do you mean by "output P010"? Where you going to plug it in? I though madvr only 32bit. There is x64 version now?
killazys
10th July 2012, 03:51
Oh, EVR Custom Pres. doesn't support it? I just kind of assumed it did.
And thanks for the response :)
Mercury_22
10th July 2012, 09:37
@nev When I'm trying to update now I'm getting C:\LAVFilters>git pull git://git.1f0.de/lavfsplitter.git
From git://git.1f0.de/lavfsplitter
* branch HEAD -> FETCH_HEAD
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address... do I have to register now?
Yesterday everything was fine and I didn't change anything
nevcairiel
10th July 2012, 09:39
Sounds like your checkout is broken, do "git remote update && git reset --hard origin/master"
Mercury_22
10th July 2012, 10:11
Sounds like your checkout is broken, do "git remote update && git reset --hard origin/master"
Working now
:thanks:
nevcairiel
10th July 2012, 10:14
@CiNcH / RealSnoopyDog:
Any further conclusions on the latest test version, is the crashing fixed now?
Here it is again:
http://files.1f0.de/lavf/LAVFilters-0.51-dxvatest3.zip
Please let me know so i can put it out as a release version if it fixes your problems.
CiNcH
10th July 2012, 10:16
Any further conclusions on the latest test version, is the crashing fixed now?
I can first test this evening, sorry :( . But will definately let you know then..
DragonQ
10th July 2012, 11:31
Ignore me. :/
RealSnoopyDog
10th July 2012, 12:32
Hi nev!
For me, the version LAVFilters-0.51-dxvatest3 is stable now when i'm zapping in DVBViewer!
The only difference to version 0.50.5 - if there is a video format change for H.264 formats (e.g. 1080i => 720p) then it takes up to 8 seconds until is see the picture with 0.51. Sound is already there. With 0.50.5 the picture always came up immediately after a video format change. It does not happen if i switch from H.264 HD to MPEG-2 SD.
You can workaround this if you enable the video format pre-detection in the DVBViewer settings if you use LAV 0.51 but then the zapping speed is slowed down. With 0.50.5 this is not neccessary.
iSunrise
10th July 2012, 12:48
Fantastic work nevcairiel!
I can now finally kiss all the post-processing of other players (like PotPlayer) and filters (ffdshow) goodbye, while enjoying full DTS-MA tracks (wrapped through the external arcsoft DLL) down-mixed to my receiver. I have tested about two dozens of my audio sample videos with different channel configurations and it works perfect, audio quality is great. I will just let it stay on clipping protection, which is the default settings.
LAV has quickly become the swiss army knife of todayīs HTPCs and power users who simply need stable and working filters, which are easy to understand, yet incredibly powerful. I also like your mentality towards minimalistic yet functional (needed) stuff, it makes the setup of your filters extremely straight forward. You donīt include a gazillion settings in the GUI, but the most important stuff so 99,9% of all users should be very happy.
One question I have is though, when a DTS-HD MA track (e.x. 5.1, 6.1 or 7.1) plays and I have my receiver on DPLII+THX, am I supposed to enable matrix encoding for Dolby Pro Logic II? Cause I canīt really hear any difference if I set the option to "none" or "Dolby ProLogic II".
Also, I may have found a small bug while testing.
1. When you play a movie while mixing functionality is disabled, on the status tab, you can see all the volume bars active for all the audio channels, which is exactly as it should be.
2. If you then enable the mixing on the mixing tab (I have set it to stereo) and you look at the volume bars, this shows you only 2 active output channels (front left, front right). This is also working as intended.
Now the bug:
3. If you disable the mixer again and you look at the status tab again and watch the volume bars/channels, you can still see only 2 active channels as if the Status tab "thinks" that the mixer is still active, while it should normally behave like in 1. again. It should show all the output channels active.
Only minor and probably easy to fix. Just to give you a heads up.
PS: Nev, I just donated you something for your continued support and your decision to include audio downmixing!
doveman
10th July 2012, 12:50
Regarding downmixing, I have a rather specific need that I wonder if you might be able to accomodate in a future release.
I have two sets of stereo speakers, my TV's and my Amp's. Sometimes I just want to use my TV and other times, I want to use my Amp for better sound for a film. I only use the analog outputs of my soundcard.
So I need to
a) mix-down to stereo
b) duplicate the stereo to two outputs
Currently I can do this, with my soundcard set to Quad output with the front speaker output connected to the TV and the rear speaker output connected to the Amp, using ffdshow's Mixer to mix all the input channels to FrontL+FrontR and RearL+RearR.
I guess I can just keep using ffdshow as a post-processor to do this and use LAV to do the decoding, but it would be nice if I could ditch ffdshow completely.
Another thing that would be cool is Mixdown profiles, that can be switched remotely from MediaPortal. ffdshow allows me to use auto-switching profiles, such as "If audio is mono, use a mix to stereo Matrix" (not necessary with LAV as it has a upmix mono to stereo option) or "If filename is *.ts, use a reduced volume Matrix", but it doesn't offer any keyboard commands or any other way to manually switch a profile.
The reason I'd like to do this is because then, when watching a film, I could manually switch to a profile that directs the centre channel to my TV's speakers and everything else to my Amp's speakers, for 3-channel playback.
dansrfe
10th July 2012, 15:21
From what I can tell, mixing to stereo from 5.1 returns much better clarity from the "center" track of the 5.1 source to my 2.1 setup than using a Dolby Pro Logic II matrix in ffdshow ever did. I guess I misunderstood what DPLII was or how it is supposed to be used in the first place.
Just to make sure, DPL/DPLII is used to decode stereo -> 5.1? Also if I can live without normalization then having "Clipping Protection" enabled would be useless correct? Therefore the best option would be to just enable downmixing to stereo and that's it?
Also, If I am using ReClock as the last piece in the filter chain, should I output only 32-bit Floating-point and then have ReClock convert the bit depth to 16-bit OR should I have everything unchecked in LAV except for 16-bit? I'm using WASAPI in ReClock for all outputs but I'm guessing the answer to this question would be different if I were outputting to DirectShow from ReClock.
I'm starting to doubt whether ReClock is even worth it but it seems to be working since ReClock's shifting of the clock is causing madVR to show frame repeat/drop from 3-6 days on nearly everything that I play. What is your opinion on ReClock? Is it needed?
Thanks nevcairiel! Is there a place where I can donate to this excellent project? :)
nevcairiel
10th July 2012, 15:42
Now the bug:
3. If you disable the mixer again and you look at the status tab again and watch the volume bars/channels, you can still see only 2 active channels as if the Status tab "thinks" that the mixer is still active, while it should normally behave like in 1. again. It should show all the output channels active.
Yeah i know about the problem.
Not sure how to fix it, stupid page init is only called when its first created. Oh well, not critical, but i'll look into it.
Just to make sure, DPL/DPLII is used to decode stereo -> 5.1?
Yes. LAV can matrix-encode a 5.1 signal into stereo so that a DPL/DPLII decoder could extract 5.1 from it again. Not sure its useful, but the feature was there so i just added the boxes :p
Also if I can live without normalization then having "Clipping Protection" enabled would be useless correct? Therefore the best option would be to just enable downmixing to stereo and that's it?
If you enable normalization, clipping protection is useless (because everythign is normalized already anyway).
If you don't enable normalization, i highly recommend enabling clipping protection, because otherwise you will most likely get clipping.
Also, If I am using ReClock as the last piece in the filter chain, should I output only 32-bit Floating-point and then have ReClock convert the bit depth to 16-bit OR should I have everything unchecked in LAV except for 16-bit?
You should keep as much precision for as long as possible, so output 32-bit float to reclock.
What is your opinion on ReClock? Is it needed?
It can help when your clock is too far off. I use JRiver MC17 now which includes its own audio renderer with a reclock-like function, which also seems to work just fine.
Thanks nevcairiel! Is there a place where I can donate to this excellent project? :)
If you insist, there is a donation button on the google project page: http://code.google.com/p/lavfilters/
CiNcH
10th July 2012, 15:47
Please let me know so i can put it out as a release version if it fixes your problems.
As Snoopy said, no crashes anymore, and no initial green picture.
The only difference to version 0.50.5 - if there is a video format change for H.264 formats (e.g. 1080i => 720p) then it takes up to 8 seconds until is see the picture with 0.51. Sound is already there. With 0.50.5 the picture always came up immediately after a video format change. It does not happen if i switch from H.264 HD to MPEG-2 SD.
You can workaround this if you enable the video format pre-detection in the DVBViewer settings if you use LAV 0.51 but then the zapping speed is slowed down. With 0.50.5 this is not neccessary.
Hmm, I can't reproduce that issue.
nevcairiel
10th July 2012, 15:49
As Snoopy said, no crashes anymore, and no initial green picture.
Great, thanks for testing. I'll put out a 0.51.1 later today.
kitame
10th July 2012, 16:13
even with the added rules on subs i still cant get those song/sign only, some f.cked up encoders sometimes put those in default and others put those in normal, they could've just put those in forced when they had an english audio in the mix ._.
nevcairiel
10th July 2012, 16:14
even with the added rules on subs i still cant get those song/sign only, some f.cked up encoders sometimes put those in default and others put those in normal, they could've just put those in forced when they had an english audio in the mix ._.
Can't do anything if its not flagged properly. Trying to find common words in the track name seems way too fragile to me.
At least its trivial to re-flag MKVs, if you want it for your archive.
kitame
10th July 2012, 16:28
yeah i'll do that, tho any clue whats a good program for a proper reflag? i'll set them to hearing impaired since thats the only rule thats unique =)
nevcairiel
10th July 2012, 16:29
yeah i'll do that, tho any clue whats a good program for a proper reflag? i'll set them to hearing impaired since thats the only rule thats unique =)
I would just use mkvtoolnix, mkvpropedit for CLI or mmg for GUI.
BTW, MKV does not have a hearing impaired flag, personally i would suggest forced.
kitame
10th July 2012, 16:41
hmm i stumbled upon a bug i think
using this setting - eng:eng|h eng:eng|f eng:eng!d eng:0ff *:eng!h *:*!h *:0ff
seems like !d isnt working, it still loaded the default instead.
nevcairiel
10th July 2012, 16:43
You need the | still, so eng:eng|!d (and later |!h). Note also you wrote "0ff" with a zero instead of an o.
kitame
10th July 2012, 16:59
You need the | still, so eng:eng|!d (and later |!h). Note also you wrote "0ff" with a zero instead of an o.
hmm, gotta take note of that, if i type o in this forum it'll become like this *:off
6233638
10th July 2012, 17:08
I'm starting to doubt whether ReClock is even worth it but it seems to be working since ReClock's shifting of the clock is causing madVR to show frame repeat/drop from 3-6 days on nearly everything that I play. What is your opinion on ReClock? Is it needed?ReClock is essential in my opinion. It enables WASAPI output. It will ReClock 25p PAL content to 24p It will ReClock 24/1.001 and 24.000 content to 23/24Hz depending on your display setting. (you should be running 24.000 at the display) It eliminates dropped frames caused by timing differences.
Mixing works with any kind of audio input... Be it DVD, BD or any user encoded file or even simple mp3 file. Anything that can be decoded with audio filter.Sorry, I did not mean to imply that mixing would only work with Blu-ray. I meant that since I cannot get LAV Filters above 0.50.1 to play back DVDs, I cannot test anything else.
nevcairiel
10th July 2012, 17:14
LAV Filters 0.51.1
LAV Video
- Improved compatibility between DXVA and certain DVB players
Download: Installer (both x86/x64) (http://files.1f0.de/lavf/LAVFilters-0.51.1.exe) -- Zips: 32-bit (http://files.1f0.de/lavf/LAVFilters-0.51.1.zip) & 64-bit (http://files.1f0.de/lavf/LAVFilters-0.51.1-x64.zip)
I hope this fixes all issues that were encountered in DVB Viewer with DXVA, and i didn't sneak in anything new by accident. ;)
If you missed the 0.51 release, here are the release notes again:
http://forum.doom9.org/showthread.php?p=1581869#post1581869
CiNcH
10th July 2012, 17:22
I hope this fixes all issues that were encountered in DVB Viewer with DXVA, and i didn't sneak in anything new by accident.
Don't worry, we'll keep an eye on that :p .
kitame
10th July 2012, 17:23
=x reflagging the files ruined ordered chapters when chapters are external, i mean some of the videos i have had their OP/ED drawn externally. so its a no-no for me =/
edit: or the file's ordered chapters were already destroyed, bah.
nevcairiel
10th July 2012, 17:44
=x reflagging the files ruined ordered chapters when chapters are external, i mean some of the videos i have had their OP/ED drawn externally. so its a no-no for me =/
edit: or the file's ordered chapters were already destroyed, bah.
Ordered Chapters don't work with LAV anyway. :p
kitame
10th July 2012, 18:03
it does most of the time tho, most of the videos with ordered chapters seems to be working as intended =/ well i'll just observe it for the time being.
Edit: anyway LAVs is becoming more interesting, all thats missing for me is those few features like fool proof subs rules and support for ordered chapters and such.
cegy
10th July 2012, 18:03
i've also noticed using http://files.1f0.de/lavf/LAVFilters-0.51-dxvatest3.zip or 0.51 both give the video a odd stuttering whiles viewing (this is with out any hw i.e using the cpu to decode with and yes the cpu can decode fine with the older version like 0.50) its like something as changed :/
i forget to say this only happens with hd channel which is use h264
Pat357
10th July 2012, 19:00
yeah i'll do that, tho any clue whats a good program for a proper reflag? i'll set them to hearing impaired since thats the only rule thats unique =)
See http://jmkvpropedit.googlecode.com/
JMKVpropedit is a GUI for MKVpropedit : very easy to use and can process lot's of MKV's at the same time.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.