View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
ddjmagic
27th October 2012, 23:54
Don't know if any of you guys have seen or not but the latest version of AnyDVD HD seems to have implemented a cool feature -
It adds a "disc.inf" file to the root of the Blu-ray disc that contains some basic information about the disc, this could be most useful on Blu-ray's that contain fake playlist protection (Which causes LAV to pick the wrong playlist)
The correct playlist is listed in the "disc.inf" file, it looks like this -
[disc]
type=BD-ROM
totalsectors=24382848
label=WARRIOR
region=1
playlists=789, 790
Is this something that software like LAV/XBMC etc could read from to help choose the correct main movie playlist?
Thanks for the latest update Nev!
SamuriHL
28th October 2012, 00:16
It's the player's responsibility to use that, not LAV. I've requested it for MC18.
Reino
28th October 2012, 00:19
LOL! I quit this pointless discussion. Never met anyone like you before.
ddjmagic
28th October 2012, 01:28
It's the player's responsibility to use that, not LAV. I've requested it for MC18.
I'm using MPC-HC, anyway I can get that to work with the disc.inf file?
SamuriHL
28th October 2012, 01:31
No. That's what I'm saying, the player itself needs to support it. Nev said he looked at it but he doesn't have a screen pass disc so didn't see the playlist info. So maybe now that you posted one he might consider looking at it. At least for exposing just the valid playlists that the player can then pick from. It would make the non-commercial players infinitely more useful. Especially now where the commercial ones all have Cinavia.
6233638
28th October 2012, 03:26
No it doesn't, and for good reason. The 10dB boost is done at the amplification stage (if not downmixing). If it was done earlier in the chain it would be implemented as a -10dB attenuation in all other channels, which reduces dynamic range, thus defeating the purpose of the +10dB boost in the first place.That makes sense, I simply assumed it was done at the decoding stage due to it being applied automatically in the receiver when it was sent anything other than PCM. Of course boosting it at the amplification stage avoids the reduction of dynamic range.
What nevcairiel is afraid of is that the 7dB LFE boost translates to a -7dB attenuation for other channels when downmixing with a normalized matrix. This means you're losing 7dB of dynamic range, you're raising your signal source noise floor by 7dB, and you might run into maximum gain issues. Whether or not this is an issue depends heavily on the hardware you're using.What is the reason for using 7dB and not 10dB?
You can also try without normalizing, in which case you get the correct LFE level and no dynamic range reduction, but you risk clipping. That said, I think that standard stereo downmix of 5.1 content is not allowed to clip per Dolby specifications.You say it is "not allowed to clip" do you mean that normalization should not be necessary to avoid clipping, or that you should be normalizing because clipping is not allowed? (of course I want to avoid clipping)
6233638
Still, check to the filter chain, after LAV Audio, were no other audio filters, which can not handle 32 float.
Examples:
Mixing AC3 5.1 in stereo (not normalized matrix):
LAVSplitter -> LAVAudio - Dump
no clipping (http://i.imgur.com/g7ITi.png)
LAVSplitter -> LAVAudio -> ffdshow Audio Processor (enabled: Volume -> Master volume: 99%) - Dump
clipping (http://i.imgur.com/qRTar.png)Thank you. I am currently either using:
LAV Audio (Float) → ReClock (Float) → Windows 8 Mixer (24-bit HDMI)
LAV Audio (Float) → ReClock (24-bit Int Padded to 32) → WASAPI Exclusive (HDMI)
Either scenario has this "crackling" problem when LFE is above 0.04 in the stereo mix.
How are you dumping the audio for these images? (and what software is that?)
Deim0s
28th October 2012, 05:23
6233638
LAV Audio (Float) → ReClock (Float) → Windows 8 Mixer (24-bit HDMI)
LAV Audio (Float) → ReClock (24-bit Int Padded to 32) → WASAPI Exclusive (HDMI)
I do not use ReClock, do not know how it handles 32 float.
In conjuction: LAV Audio (32 float) -> Win 7 Mixer (24 bit, 48000 Hz) -> Creative X-Fi (48000 Hz, Bit-Matched), even when playing the file with the overflow > 0dB (an example from the post above), I do not get clipping:
Image 1 (http://i.imgur.com/T7c2a.png) Image 2 (http://i.imgur.com/GVjeD.png)
If after LAV Audio (and before mixer Win) is going audio filter not capable of processing 32 float, then there will be clipping:
Image 1 (http://i.imgur.com/jsL49.png) Image 2 (http://i.imgur.com/CmP2k.png)
I have got so.
How are you dumping the audio for these images? (and what software is that?)
I use a Dump Filter (http://i.imgur.com/WzHiA.png) from GraphStudioNext (http://code.google.com/p/graph-studio-next/). Further open the raw-file in Adobe Audition (Import -> Raw Data).
bugmen0t
28th October 2012, 08:07
If you set LAV Audio to output 32bit Integer directly will it prevent overflow/clipping in such situations? Is this overflow/clipping stuff a rounding problem?
nevcairiel
28th October 2012, 08:09
Integer will always clip because you can't go over 100%. Which integer mode you use does not matter. Float on the other hand has no limitation on its value range, so you can go above 100% (which in float is 1.0), so a value of 1.1 is perfectly valid. The question just is how other components deal with this, and since DACs are typically integer, it needs to be converted at some point.
6233638
28th October 2012, 08:22
I use a Dump Filter (http://i.imgur.com/WzHiA.png) from GraphStudioNext (http://code.google.com/p/graph-studio-next/). Further open the raw-file in Adobe Audition (Import -> Raw Data).Thank you, I have now exported this to a raw file (32-bit Float, 48kHz) and also converted that to a 24-bit, 48kHz FLAC using Audacity (http://audacity.sourceforge.net/) for easier playback.
http://www.filedropper.com/thunder
There does not appear to be any clipping (this is at 2.24 LFE) but I am still hearing that crackling noise when including any significant amount of LFE in the downmix.
Can anyone confirm that they hear it in these files? I suppose there's always the possibility that it's my audio setup.
I'm also hearing it when I set the LAV mix to:
Center: 0.0000
Surround: 0.0000
LFE: 1.0000
Which makes me think that either something in my audio setup is causing that crackling with LFE, or it's part of the encoded audio.
bugmen0t
28th October 2012, 08:34
So normalization scales floats to (0.0, 1.0) to prevent clipping/overflow, right? Shouldn't this always be performed if integer output is explicitly requested, then?
EDIT: Yes, 6233638, i can definitely hear the crackling, but it seems to affect mainly the high frequencies here. No overflow/clipping. Don't think is has something to do with the LFE.
EDIT 2: Yes, LFE channel is still crackling. Peak meter still shows no overflow (or it is to fast for me to see). Crackling still seems to be mainly in the high frequencies. How can that be?
6233638
28th October 2012, 08:41
So of course immediately after that last post, it occurred to me to disable mixing in LAV and just dump a raw 5.1 file instead.
This is the LFE channel on its own: http://www.filedropper.com/lfe
Can anyone confirm the crackling in it, or is something going wrong in my audio setup?
So normalization scales floats to (0.0, 1.0) to prevent clipping/overflow, right? Shouldn't this always be performed if integer output is explicitly requested, then?I would assume that's what Normalization does.
nevcairiel
28th October 2012, 08:49
LAV does not perform normalization. Don't confuse "Matrix normalization" with actual Normalization. Matrix normalization only normalizes the matrix coefficients, so that the sum of the coefficients for one channel never exceeds 1.0. If the audio is spiking over 1.0 before mixing, it will still do that after mixing.
ddjmagic
28th October 2012, 10:08
No. That's what I'm saying, the player itself needs to support it. Nev said he looked at it but he doesn't have a screen pass disc so didn't see the playlist info. So maybe now that you posted one he might consider looking at it. At least for exposing just the valid playlists that the player can then pick from. It would make the non-commercial players infinitely more useful. Especially now where the commercial ones all have Cinavia.
Thanks for the info, it definitely would be useful IMO, after studying some of these screen pass titles it seems there is no logical way to determine the correct playlist from the fake ones, making it impossible for non commercial players to play these discs correctly.
Hopefully some players can implement it in the future.
e-t172
28th October 2012, 11:22
What is the reason for using 7dB and not 10dB?
LFE needs to be played 10dB louder than any other channel. If you just boost LFE by 10dB and mix it into L and R, you end up with +13dB because both L and R are playing LFE at the same time (two acoustic sources = +3dB). So if you want the result to be correct, you need to use +7dB in both channels, which sums up to +10dB at your ears.
You say it is "not allowed to clip" do you mean that normalization should not be necessary to avoid clipping, or that you should be normalizing because clipping is not allowed? (of course I want to avoid clipping)
I mean the former. But I'm really not sure about that part, I'd have to check the specs.
Dogway
28th October 2012, 12:09
Simply because FFDShow's Audio Decoder by default has a higher merit than the LAV Audio Decoder
That's what had to be expected, but in order to know that you need to "have messed" with (the forbidden) merit settings.
Either uninstall FFDShow (do you really still need it?), disable specific formats in the "Codecs"-section, or lower FFDShow's merit settings, for LAV Filters to take over.
What's so bad in FFDShow that you encourage me to uninstall it? I mean it's the same question I'm trying to get an answer for since 2 pages back. What's so bad in rasing or lowering merit settings? Can't I raise LAV Filter merits? (you didn't name it as an option)
but I can perfectly play videos where LAV Filters does the splitting and FFDShow the decoding
Yes sorry I had some confussion for when I couldn't split AVS with LAV but had to decode with ffdshow.
LOL! I quit this pointless discussion. Never met anyone like you before.
That's very offensive, I don't consider my questions pointless and what's that "like you", like what?, my questions are very straight forward, unlike your answers (http://forum.doom9.org/showthread.php?p=1597923#post1597923). :S I'm shocked by people intransigence.
But don't worry, I'll make a new thread (http://forum.doom9.org/showthread.php?t=166305) so nevcairiel or you don't feel annoyed by questions probably way over your head.
Pepp
29th October 2012, 00:52
How to Use
Here are some guides that include LAV Filters (but are usually not limited to them):
Advanced MPC-HC Setup Guide
Someone said this guide needs to be updated , Is this true?
mindbomb
29th October 2012, 01:07
it should be fine
blexley
29th October 2012, 08:55
Someone said this guide needs to be updated , Is this true?
If nevcairiel gave his settings for MPC to the community then their wouldn't be this problem and people could submit better bugs reports.
But he prefers to piddle everyone about with a guessing game of the settings just so he can say " well it works on my setup "
ryrynz
29th October 2012, 09:40
But he prefers to piddle everyone about
I'm save anyone else replying to this and say that you're 100% incorrect on this assumption.
"His setup" is a clean working as intended installation, where other people's systems can have other software or builds not released by him installed which may cause issues, he does not.
End of discussion.
Dodgexander
29th October 2012, 11:37
Sorry to bring this up again but I think amongst other things my post (http://forum.doom9.org/showthread.php?p=1596723#post1596723) was overlooked.
I do not get this "flickering" sound if I use different audio filters from Lav. I wonder why this only happens with lav and not others.
nevcairiel
29th October 2012, 12:07
Sorry to bring this up again but I think amongst other things my post (http://forum.doom9.org/showthread.php?p=1596723#post1596723) was overlooked.
I do not get this "flickering" sound if I use different audio filters from Lav. I wonder why this only happens with lav and not others.
If this can be clearly reproduced on some files, you need to provide a sample that allows us to reproduce the issue. A description of "flickering" sound doesn't really give me much to work with.
If you have some old recordings around from before you first noticed the problem, you should also try them to check if anything in the stream changed. If you think it only started with some version of LAV, you can also try an older version to check this, and try to determine when it started. Many of the old versions are available on google code: http://code.google.com/p/lavfilters/downloads/list
Pepp
29th October 2012, 14:00
I'm save anyone else replying to this and say that you're 100% incorrect on this assumption.
"His setup" is a clean working as intended installation, where other people's systems can have other software or builds not released by him installed which may cause issues, he does not.
End of discussion.
So you install MPC then Lav filters and you don't alter any of the settings and this is the developers recommend way?
the_weirdo
29th October 2012, 14:19
So you install MPC then Lav filters and you don't alter any of the settings and this is the developers recommend way?
Yes, unless you know what you're doing.
Pepp
29th October 2012, 14:23
Yes, unless you know what you're doing.
So the MPC guide on the first page doesn't need updating it needs removing?
As that says to change the MPC settings to use lav filters.
nevcairiel
29th October 2012, 14:24
LAV runs fine in its default settings. The only setting you might want to change is to enable hardware acceleration.
How you configure your player of choice is beyond LAVs scope, i can't offer settings for every player on this planet. There are several guides available that set up for example MPC-HC to use LAV, i linked two guides in the first post of this thread which i briefly looked over and deemed acceptable. Personally, i don't even use MPC-HC for actual movie watching, so i have no settings to share. I only use it for testing during development, and those development settings are not what i would recommend anyone to use for normal playback.
For MPC-HC, in short, just disable all internal filters, and LAV should take over. If you have a long list of other filters installed, this might not be the case, i personally just add LAV to the external filter list as preferred, but some people think thats not a good solution, but what can you do. Works for me. :p (remember, development settings, often have to switch between different decoders for comparison).
As an alternative there are several tools that can control which filter is the preferred decoder for certain formats, which you can use to control this in a global system scope - or just uninstall the filters you don't want. :)
Pepp
29th October 2012, 14:35
Thank you for explaining. :)
What do you use to watch movies instead of MPC as i would like to give it a go?
SamuriHL
29th October 2012, 14:45
A lot of us use MC18.
nevcairiel
29th October 2012, 14:54
Yes, i use JRiver MC18, but its not free, and more then a simple player.
Pepp
29th October 2012, 15:09
Thanks :)
Dodgexander
29th October 2012, 16:36
If this can be clearly reproduced on some files, you need to provide a sample that allows us to reproduce the issue. A description of "flickering" sound doesn't really give me much to work with.
If you have some old recordings around from before you first noticed the problem, you should also try them to check if anything in the stream changed. If you think it only started with some version of LAV, you can also try an older version to check this, and try to determine when it started. Many of the old versions are available on google code: http://code.google.com/p/lavfilters/downloads/list
The problem isn't repeatable. e.g it doesn't happen at a certain time in each file. If i hear it, i can run the time back and play the same part again and there won't be any flickering. The flickering is not heard on other systems I have tried using Lav so it seems its related between my hardware, these files and lav itself. Interestingly when listening through my headphones through the same sound card, although analogue rather than digital out the problem does not exist. Likewise when viewing the .wtv files with different filters/players the problem does not exist.So its only related to spdif, only happens with .wtv files or those files converted to .ts. I have tried connecting to my amp via coaxial rather than optical the the same happens.
I could upload a sample, but I am pretty sure it will repeatable. Such an annoying problem:(
cruse
29th October 2012, 17:01
Dodgexander are you using CUVID as hardware accelerator? Then the problem might be related to this issue:
code.google.com/p/lavfilters/issues/detail?id=135 (http://code.google.com/p/lavfilters/issues/detail?id=135)
Give other accelerators in LAV Video a try and see if the problem persists.
Dodgexander
29th October 2012, 18:05
I am using Copy Back but i tried no hardware acceleration also and the same problem applies.
Pat357
29th October 2012, 21:47
I am using Copy Back but i tried no hardware acceleration also and the same problem applies.
Probably the easiest way, but could as well be the only way to be sure is trying on a different OS (if multi-boot) or just on a different system.
kitame
30th October 2012, 04:19
is it possible to run LAVs in linux-wine yet? or linux natively. just curious.
nhakobian
30th October 2012, 06:44
Well, since libavcodec is part of ffmpeg / libav, then yes, the underlying library is available under linux.
As far as under wine, this doesnt make much sense. The major benefit would be for hardware acceleration, but since DXVA is a windows interface, that nix's that. Also since there is no hardware interface for DirectShow under wine (only emulated devices that link into SDL for certain devices with limitations), I'm not sure it would be useful.
Linux has its own interface for hardware video decoding. There is libvdpau for NVIDIA devices (is there one for ATI/AMD Radeons?). Does the linux CUDA library have a CUVID interface? Or does libvdpau essentially do the same thing?
While I'd love to see a set of linux decoders work as seamlessly as the LAV filters do under Windows, nothing quite like it exists. But I must say VLC does a pretty good job.
I think nevcairiel has done an amazing job with adding many features, working on fixing as many bugs as possible, and everything else he does. I personally use it everyday on an old pc I threw together as a media computer hooked up to my tv. I tried various linux programs and while they were good, there were always little annoyances on this old hardware.
I digress. Perhaps there is a special use case you have in mind for wanting this under Linux? Maybe someone can help you get it working if we know what the usage is?
Joniii
30th October 2012, 07:37
Nev, in case of Radeon GPU and EVR, do you think it's better to let LAV Video to convert to RGB32 or just use NV12 and let EVR do it?
Joniii
30th October 2012, 12:33
Here is a small comparison from Avatar BD, if anyone is interested. For comparison there is also one shot with madVR.
MPC-HC / LAV Video (NV12) + EVR
http://sdrv.ms/PEquFn
MPC-HC / LAV Video (RGB32) + EVR
http://sdrv.ms/PEqFRj
MPC-HC / LAV Video (NV12) + madVR
http://sdrv.ms/SuhwZT
There is not much difference between EVR RGB32 and madVR NV12. EVR NV12 is slightly brighter in colours. I guess RGB32 for EVR produces the correct colours.
kitame
30th October 2012, 14:08
Well, since libavcodec is part of ffmpeg / libav, then yes, the underlying library is available under linux.
As far as under wine, this doesnt make much sense. The major benefit would be for hardware acceleration, but since DXVA is a windows interface, that nix's that. Also since there is no hardware interface for DirectShow under wine (only emulated devices that link into SDL for certain devices with limitations), I'm not sure it would be useful.
Linux has its own interface for hardware video decoding. There is libvdpau for NVIDIA devices (is there one for ATI/AMD Radeons?). Does the linux CUDA library have a CUVID interface? Or does libvdpau essentially do the same thing?
While I'd love to see a set of linux decoders work as seamlessly as the LAV filters do under Windows, nothing quite like it exists. But I must say VLC does a pretty good job.
I think nevcairiel has done an amazing job with adding many features, working on fixing as many bugs as possible, and everything else he does. I personally use it everyday on an old pc I threw together as a media computer hooked up to my tv. I tried various linux programs and while they were good, there were always little annoyances on this old hardware.
I digress. Perhaps there is a special use case you have in mind for wanting this under Linux? Maybe someone can help you get it working if we know what the usage is?
not at the moment, but when the quadcore atom silvermont(hell yes it might be great stuff) i might run a linux distro with an android gui on it (ease of use rather than punching commands into a terminal).
im also interested in longene, a project of merging window's kernel into linux's. if the project goes well even windows drivers should run on linux.
well hey the reason is opting out of the hideously expensive windows os while staying legal. :)
other than that i'd either wait for a 10bit 1080p capable phone to become affordable(im guessing 2014...), or wait for a cheap haswell line.
hey, docking your portable unit unto a friend's awesome TV isn't a bad idea right?
thomaz909
30th October 2012, 16:00
hi,
i need a vga card with 512mb ram max.
is gt 240 fast enough for everything what lavfilters does ?
Chirico
30th October 2012, 16:03
other than that i'd either wait for a 10bit 1080p capable phone to become affordable(im guessing 2014...)
2014? More like never going to happen. No phone is ever going to have an ASIC capable of 10-bit H.264 decoding.
wanezhiling
30th October 2012, 16:05
hi,
i need a vga card with 512mb ram max.
is gt 240 fast enough for everything what lavfilters does ?
GT240 is shit....:o
The best choice is GTX650
nevcairiel
30th October 2012, 17:13
2014? More like never going to happen. No phone is ever going to have an ASIC capable of 10-bit H.264 decoding.
Not an ASIC, but a CPU to do it.... :p
LoopinFool
30th October 2012, 17:50
Here's a minor issue I just noticed -- using the 0.52 release.
If the source file is interlaced, but YADIF is enabled, the video decode filter still sets dwInterlaceFlags in VIDEOINFOHEADER2 during format negotiation.
I believe it should always clear the interlaced flags when YADIF is actually enabled since it will be delivering de-interlaced frames to the downstream filter.
- LoopinFool
nevcairiel
30th October 2012, 17:53
If the source file is interlaced, but YADIF is enabled, the video decode filter still sets dwInterlaceFlags in VIDEOINFOHEADER2 during format negotiation.
I believe it should always clear the interlaced flags when YADIF is actually enabled since it will be delivering de-interlaced frames to the downstream filter.
Fixed, now go test the version i send you to see if your crash is gone, so i can commit those changes if they help. :p
kitame
30th October 2012, 18:32
2014? More like never going to happen. No phone is ever going to have an ASIC capable of 10-bit H.264 decoding.
what? havent you guys been looking up android MXplayer? they could manage 720p smoothly on an S3 quadcore, choppy with 1080p.
but in a sense theres a rumor going around that intel would start stepping into phones and tablets with their 2014 atoms.
so it would be possible to see a decent x86 processor rolling around.
it makes me wonder how those underpowered arm processors could manage to decode 10bit videos, is there something in their codecs thats making it run so smoothly?
---------------------
ok i've stumbled upon an issue, while i was playing a video it suffered a major hiccup that lead to the audio having multiple reverbs(like a mountain echo).
pausing it and continuing seem to fix the issue, i cant reproduce it though, coincidence?
LoopinFool
30th October 2012, 18:47
Fixed, now go test the version i send you to see if your crash is gone, so i can commit those changes if they help. :p
Been testing...PM on its way.
- LoopinFool
hoborg
30th October 2012, 18:49
Well, Tegra3 devices can play 1080P60fps (at last Nev. sample) by using MXplayer HW+ decoder just fine.
But it is not compatible with 10bit of course. You can play it, but it is slow.
Chirico
30th October 2012, 19:04
Well, Tegra3 devices can play 1080P60fps (at last Nev. sample) by using MXplayer HW+ decoder just fine.
Well, yes, because that's using the ASIC to decode in hardware.
And, yes, nev you can use the CPU but then battery life will be terrible. And if you have to plug in the phone while playing so that the battery won't die that sort of defeats the point of the device being mobile.
kitame
30th October 2012, 19:10
Well, yes, because that's using the ASIC to decode in hardware.
And, yes, nev you can use the CPU but then battery life will be terrible. And if you have to plug in the phone while playing so that the battery won't die that sort of defeats the point of the device being mobile.
hey, docking your portable unit unto a friend's awesome TV isn't a bad idea right?
there are already reports of 10bit 720p being decoded smoothly without problems, but no hint of it happening with 1080p yet, we'll see in a few months.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.