View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
sneaker_ger
12th April 2015, 23:12
http://forum.doom9.org/showthread.php?p=1717279#post1717279
e-t172
12th April 2015, 23:16
i got a little wish that would help me out alot and proberly others to.
"mix settings depending on output"
I would love to see a setting that would allow me to always downmix to 2.0 on my DAC and on my home cinema there should be no downmix.
I have to change my default output unit in ReClock everytime i go from "home cinema" to "headphones" and if i would be able to simplify it a bit like "mix settings depending on output" it would be great!!
That is exactly what the standard Windows audio output mixer does. That's it's job, it's the right place to do it and it does it well. Why are you downmixing in LAV instead of simply letting Windows do its thing?
huhn
12th April 2015, 23:42
That is exactly what the standard Windows audio output mixer does. That's it's job, it's the right place to do it and it does it well. Why are you downmixing in LAV instead of simply letting Windows do its thing?
first of all i agree that should be the best place but...
try it out windows down mix and lavfilter down mix are totally different lav is way louder. lav sounds about the same as the down mixer in my asus essence STX. so it looks like windows isn't using the right parameter for the down mix.
e-t172
13th April 2015, 00:10
Actually, if LAV is louder it's more likely than LAV is doing it wrong than the opposite, though it depends on the options you set in LAV (normalization and the like). The louder the downmix is, the more likely you are to end up with clipping if multiple channels are being driven near full scale.
In addition, the fact that it "sounds about the same as the down mixer in my asus essence STX" doesn't mean anything at all, and you can't infer that "windows isn't using the right parameter" just from a difference in output level.
Now I'm not necessarily saying that the downmixing in the Windows audio engine is perfect, I'm saying there's no reason not to use it unless we are provided with actual evidence that there is something wrong with it. Just like anything else, really.
huhn
13th April 2015, 00:20
Actually, if LAV is louder it's more likely than LAV is doing it wrong than the opposite, though it depends on the options you set in LAV (normalization and the like). The louder the downmix is, the more likely you are to end up with clipping if multiple channels are being driven near full scale.
In addition, the fact that it "sounds about the same as the down mixer in my asus essence STX" doesn't mean anything at all, and you can't infer that "windows isn't using the right parameter" just from a difference in output level.
Now I'm not necessarily saying that the downmixing in the Windows audio engine is perfect, I'm saying there's no reason not to use it unless we are provided with actual evidence that there is something wrong with it. Just like anything else, really.
if i'm not miss taken nevcairiel has clearly stated the down mix is done with default specs with other word windows is not doing it with the right standard.
you can look at the default settings from lavfilter and check if these are correct.
nevcairiel
13th April 2015, 08:26
Windows probably normalizes the matrix when downmixing, which results in lower volume. LAV has an option to do the same thing.
Not using a normalized matrix can result in clipping or volume changes mid-playback, depending on how the track was mastered. On most commercial content its usually safe (assuming you don't mix the LFE into the stereo channels)
kalston
13th April 2015, 19:12
Windows mixer indeed sounds completely different from Asus Xonar & JRiver mixer (and probably LAV's, never needed it), most likely normalisation. Not that this is a bad thing but it's not always needed I guess.
DigitalLF
13th April 2015, 19:52
i also use pass through for AC3,DTS,DD in my home cinema but not in my bedroom so yeah.. it would really help out a lot for some of us.
NikosD
14th April 2015, 09:49
Hi.
Does anyone have a clue, why LAV Yadif and LAV QS deinterlacing 50p/60p mode doesn't work with DirectShowSource avisynth filter, while 25p/30p mode works for both with the same filter ?
By doesn't work, I mean it still gives 25p/30p output instead of 50p/60p (deinterlacing works)
huhn
14th April 2015, 11:40
because it is not used and 25/30 isn't used to it is simply waved.
the directshowsource tells lav the file is progressive you have to force deinterlacing in lavfilter.
just use YADIF in avisynth.
BTW. directshowsource is frame inaccurate don't use it.
NikosD
14th April 2015, 12:18
As I wrote above, deinterlacing works fine in both modes (25p/30p - 50p/60p) and for both decoders (SW, QS HW) using DSS and LAV Deinterlacing mode to "Auto", without forcing it.
The only issue is the frame rate - it keeps the original interlaced frame rate without doubling it.
huhn
14th April 2015, 13:33
yes DSS is doing some strange stuff it is either not deinterlacing or playing it to slow.
try assumefps(60000, 1001) this may work for QS.
or use a proper source filter like ffmpegsource2 here an example may works for your source:
v = ffvideosource("D:\aikatsu\aikatsu 63.ts")
a = ffaudiosource("D:\aikatsu\aikatsu 63.ts")
audiodub(a, v)
ffmepgsource is flagging the stream interlaced if YADIF is not used unlike DSS and it runs at the right refresh rate. YADIF doesn't work without force deinterlacing and with force deinterlacing it isn't reading the right field order. even DXVA deinterlacing can't handle stream created this way.
best to deal with this is using YADIF in avisynth.
Load_Stdcall_plugin("C:\Program Files (x86)\AviSynth\plugins\yadif.dll")
v = ffvideosource("D:\aikatsu\aikatsu 63.ts")
a = ffaudiosource("D:\aikatsu\aikatsu 63.ts")
audiodub(a, v)
Yadif(mode=1, order=-1, planar=false, opt=-1)
hello_hello
14th April 2015, 13:58
You should be able to unpack the installer using innounp (http://innounp.sourceforge.net/). Then you can simply replace MPC-HC's internal version with the nightly by copying the files into the MPC-HC\LAVFilters folder without the installer messing with your system.
Thanks for that. I read your post after installing LAV, but never mind..... the latest nightly (0.64.0.51) does seem to have fixed the problem. I can navigate after opening my sample and so far I've been able to navigate after opening MKVs while the encoding is in progress. Only limited tested for the latter admittedly.
Thanks Nev!!!
One little quirk.....
I installed LAV after booting to a second copy of Windows for testing and it seemed to work fine (able to navigate) so I then copied the LAV\x86 folder and after rebooting again to my normal XP setup, I used the files within to replace the versions in the MPC-HC\LAVFilters folder. The problem still seems to be fixed but for some reason I can't open any of the LAV configurations by clicking on the system tray icons (when LAV was installed I could, even when using the same file to update it as MPC-HC's internal filters).
It's no big deal, and probably a quirk of the way I did things, but I thought I'd mention it in case it's worth mentioning....
Thanks again!
sneaker_ger
14th April 2015, 15:21
I don't know why that happens. Maybe MPC-HC team does small modifications to the standalone version regarding the settings storage and in turn tray icon behavior.
clsid
14th April 2015, 16:39
Yes, they use a small modification (custom callback) for accessing the settings dialogs. MPC-HC stores the settings of its internal LAV under its own registry key.
NikosD
14th April 2015, 20:13
yes DSS is doing some strange stuff it is either not deinterlacing or playing it to slow.
try assumefps(60000, 1001) this may work for QS.
DSS has a direct option for specifying the frame rate, called fps, it doesn't need AssumeFPS and it can't use it.
By putting directly double fps is wrong and still DSS doesn't follow the LAV deinterlacing options of 25p/30p and 50p/60p
Never mind...
mzso
14th April 2015, 20:48
Is it possible to play DTS-HD MA with LAV x64 these days? I'm wondering now that madVR has a x64 version.
These two things used to prevent me from using a 64 bit player.
sneaker_ger
14th April 2015, 20:55
Yes, LAV now has a free DTS-HD MA decoder out-of-the-box that works in both 32 and 64 bit. It will be in the next version but you can already use the nightly (http://files.1f0.de/lavf/nightly/).
huhn
14th April 2015, 21:38
DSS has a direct option for specifying the frame rate, called fps, it doesn't need AssumeFPS and it can't use it.
By putting directly double fps is wrong and still DSS doesn't follow the LAV deinterlacing options of 25p/30p and 50p/60p
Never mind...
you have to use stuff like this with thsi avisynth source type it's simple broken ...
mzso
14th April 2015, 21:55
Yes, LAV now has a free DTS-HD MA decoder out-of-the-box that works in both 32 and 64 bit. It will be in the next version but you can already use the nightly (http://files.1f0.de/lavf/nightly/).
Really? Someone made a decoder for ffmpeg? Excellent. That's way better news than I expected. :)
I'll try it then.
captainadamo
14th April 2015, 22:11
The decoder was made by someone unrelated to ffmpeg, but nev made a wrapper for ffmpeg that allows using the decoder.
https://github.com/foo86/dcadec
mzso
14th April 2015, 23:28
The decoder was made by someone unrelated to ffmpeg, but nev made a wrapper for ffmpeg that allows using the decoder.
https://github.com/foo86/dcadec
It's cool that someone decided to make it on his own, and just did it.
(Here it' claimed the it's been merged to ffmpeg:
https://github.com/mpv-player/mpv/issues/1621#issuecomment-83970289)
bcec
15th April 2015, 01:26
I am setting up mpc-hc x64 with Lav x64 and madvr x64. How do I make sure that x64 mpc-hc is really using 64-bit version of Lav? I didn't see any clear indication whether it is using x32 or x64
wanezhiling
15th April 2015, 01:52
1.) 64-bit mpc-bc integrates 64-bit lav as the default internal filters.
2.) A 64-bit player can only work with 64-bit filter.
bcec
15th April 2015, 02:13
1.) 64-bit mpc-bc integrates 64-bit lav as the default internal filters.
2.) A 64-bit player can only work with 64-bit filter.
sweet! thanks for the explanation!
petran79
15th April 2015, 16:59
I have an issue with the game Yatagarasu on Steam
When I launch the game, LAV Splitter icons appear all over.
LAV Splitter displays audio as MP3. I have to disable MP3 audio in LAV Splitter for problem to disappear.
Is there any way to exclude the program from using LAV Splitter?
http://abload.de/img/yatagarasun5s56.jpg
huhn
15th April 2015, 17:15
this should do what you want:
General
- NEW: Individual LAV Filters can now be blacklisted through the registry by creating a key with the executable name in HKCU\Software\LAV\<Filter>\Blacklist
hello_hello
16th April 2015, 14:07
Here's a sample MKV. I posted it in the MPC-HC forum a while back but the link hasn't expired yet.
http://ge.tt/7lVDr642/v/0?c (about 29MB).
MPC-HC will open the sample and allow me to navigate when using Haali or LAV 0.62.0.0 but it won't let me navigate when "LAV 0.63.0.52-git" is used. The same applies to the flavour of LAV used by MPC-HC 1.7.7, which is LAV 0.63.0.18
So....... version 0.64.0.51 seems to be opening my sample very consistently, but for MKVs being written by the encoder it's still a little hit and miss. I haven't done enough encoding since updating LAV to do anything but guess, however around one time in ten MPC-HC still opens an MKV (one that's being written by the encoder) without the ability to navigate.
It's maybe also more likely to happen when the MKV in question is on a network drive, but I'm not sure about that one yet.
If the "fix" in question was the patch labelled
"matroskadec_haali: search more aggressively for a duration of incomplete files (http://git.1f0.de/gitweb?p=ffmpeg.git;a=commit;h=dc02cb4d1d7cda0abe7671c9863e61bae58ccdfe;js=1)", could I ask......
are we at maximum aggression yet?? :)
Thanks!
nevcairiel
16th April 2015, 14:21
For performance reasons, it'll only scan the last couple megabytes of the file for a duration (up to 50MB now, iirc), and without a duration, it cannot navigate. If your encoder pre-allocates much more empty space for the file, then it can't really be helped. Its certainly not going to scan the entire file to find a duration, since that would be terribly slow.
MeteorRain
16th April 2015, 19:21
I just found this when I was debugging a video filter.
I spent hours on debugging my code just to find the reason to be incorrectly hardware decoding.
HEVC H/W Decoding on 0.64.0
CUVID & DXVA all broken. AVCodec works.
Can anyone please confirm if it's a known bug, a real bug, or did I break something?
Thanks.
https://www.dropbox.com/s/bd0dkb7ohjjoa4d/t.mp4?dl=0
hello_hello
17th April 2015, 01:43
For performance reasons, it'll only scan the last couple megabytes of the file for a duration (up to 50MB now, iirc), and without a duration, it cannot navigate. If your encoder pre-allocates much more empty space for the file, then it can't really be helped. Its certainly not going to scan the entire file to find a duration, since that would be terribly slow.
I guess that's why MPC-BE takes longer to allow me to navigate after opening large MKVs sometimes. Mind you I don't find MPC-BE painfully slow, but since I've updated LAV it's only been one time in ten (at the most) I'll open an MKV with MPC-HC as it's being written and not be able to navigate. When that happens I just use Ctrl+E to re-open it and usually after one or two re-opens I'm able to navigate, so I'm not complaining. It's pretty usable...... considering what I'm using it for.
Thanks!
nevcairiel
17th April 2015, 01:45
I increased the limit by another 50%, which should hopefully help on more files then. Its written in such a way that it should not get slower on files which have a defined duration in earlier parts of the file.
Half-Light Agent
17th April 2015, 02:12
I have been trying to get HEVC decoded through CUDA via CUVID, but when I play one of the sample files from the h265files.com site AVCODEC is listed as the active CODEC. I'd appreciate some advice.
Zoom Player 9.4.1 Pro
LAV 0.63
and
Zoom Player 10 Pro
LAV 0.64
NVIDIA ION (Integrated GeForce 9400m)
hello_hello
17th April 2015, 02:49
I increased the limit by another 50%, which should hopefully help on more files then. Its written in such a way that it should not get slower on files which have a defined duration in earlier parts of the file.
If I had a first-born, he/she would be yours!
Thank you!
sneaker_ger
17th April 2015, 05:58
I increased the limit by another 50%, which should hopefully help on more files then. Its written in such a way that it should not get slower on files which have a defined duration in earlier parts of the file.
I don't see any change in the gits. Did you not upload the change or did you sneak it into the first commit (http://git.1f0.de/gitweb?p=ffmpeg.git;a=commit;h=0e367cece81ef9174d0b5de3b506f84b2d8828ee) when you re-pushed the ffmpeg git?
hello_hello
17th April 2015, 06:35
I haven't download a newer version of LAV yet, I just assumed the latest nightly would include the change. I'll wait to find out now.....
Cheers.
D2MAC
17th April 2015, 07:31
I've finally found a way of recording the Astra UHD test stream currently broadcasting. I suppose I shouldn't be surprised that my laptop's Core i5-3320M can't cope with it at all, even with MPC-HC x64 + LAV Filters + EVR. :(
It gets 37-40 fps with ~85% CPU usage and ~40% GPU usage. I assume it's using the GPU just for resizing to 1080p.
HI,
In my case, it's work only with latest MPC-BE and a NVIDIA GTX 960.
2% CPU and GPU used for native UHD 4K 10 bits with dxva2.
(With MPC-HC and lav filters 0.64 (internal or external)+ GTX960 = ASTRA DEMO UHD 4K 10 bits use 99% CPU and not DXVA2 / GPU used with an I5)
However MPC-HC works ok with HEVC 8 bits / GPU native GTX960 but not with 10 bits profile of ASTRA/EUTELSAT UHD 4K 10 Bits demo
nevcairiel
17th April 2015, 09:22
I have been trying to get HEVC decoded through CUDA via CUVID, but when I play one of the sample files from the h265files.com site AVCODEC is listed as the active CODEC. I'd appreciate some advice.
What made you think that an ancient device like the NVIDIA ION would be capable of HEVC decoding? Because it is not.
LigH
17th April 2015, 10:09
Possibly the usual mistake. The hardware accelerated decoding would be done by a specialized decoding chip (PureVideo in its seventh generation), not by a CUDA program.
huhn
17th April 2015, 10:36
Possibly the usual mistake. The hardware accelerated decoding would be done by a specialized decoding chip (PureVideo in its seventh generation), not by a CUDA program.
only the GTX 960 and maybe the titan x have a ASIC HEVC decoder all other nvidia cards use hybrid CPU/GPU decoding.
nevcairiel
17th April 2015, 10:40
only the GTX 960 and maybe the titan x have a ASIC HEVC decoder all other nvidia cards use hybrid CPU/GPU decoding.
Sadly no ASIC in the TITAN X, only the GTX 960 so far.
NikosD
17th April 2015, 10:47
I just found this when I was debugging a video filter.
I spent hours on debugging my code just to find the reason to be incorrectly hardware decoding.
HEVC H/W Decoding on 0.64.0
CUVID & DXVA all broken. AVCodec works.
Can anyone please confirm if it's a known bug, a real bug, or did I break something?
Thanks.
https://www.dropbox.com/s/bd0dkb7ohjjoa4d/t.mp4?dl=0
Plays fine in DXVA HEVC with Intel's iGPU using LAV 0.64.52
petran79
17th April 2015, 11:29
this should do what you want:
General
- NEW: Individual LAV Filters can now be blacklisted through the registry by creating a key with the executable name in HKCU\Software\LAV\<Filter>\Blacklist
thanks!
but I am a little confused
In the Blacklist folder, what type of key do I need to create?
just edit the default REG_SZ? Or add another value?
Also after that do I add just the name of the game.exe or include the whole folder as well, eg C:/Steam/steamaps/common/Yatagarasu/beta/game.exe?
Currently I just added in the default REG_SZ the full game path and nothing happens
nevcairiel
17th April 2015, 12:06
A DWORD value with the name of the exe as key (without path), and the value "1".
Aleksoid1978
17th April 2015, 13:43
Plays fine in DXVA HEVC with Intel's iGPU using LAV 0.64.52
Play fine using DXVA Native + GTX 960.
Half-Light Agent
17th April 2015, 14:19
What made you think that an ancient device like the NVIDIA ION would be capable of HEVC decoding?
Because it's CUDA, and I was hoping that CUDA is CUDA.
nevcairiel
17th April 2015, 14:25
Because it's CUDA, and I was hoping that CUDA is CUDA.
It has nothing at all to do with CUDA. Its CUVID, not CUDA.
Half-Light Agent
17th April 2015, 14:28
I meant the ION is CUDA, and I hoped that would give it a shot at decoding HEVC through CUVID. As CoreAVC does for me with AVC.
huhn
17th April 2015, 15:01
I meant the ION is CUDA, and I hoped that would give it a shot at decoding HEVC through CUVID. As CoreAVC does for me with AVC.
even with CUVID HEVC support the GPU would be to slow.
i'm not even sure if HEVC hybrid decoding with CUVID/DXVA is a lot faster than simple CPU decoding using GPU slower than nvidia 460.
and about coreAVC. DXVA should be the same. (and it was the same on my ION)
if coreAVC really uses CUDA and that not over CUVID. DXVA should be a lot faster.
MeteorRain
17th April 2015, 15:51
Plays fine in DXVA HEVC with Intel's iGPU using LAV 0.64.52
Thanks for the testing.
The following is what I found.
I have 2 video cards equipped, each attached with a screen.
Software -> Good
QuickSync -> avcodec -> Good
CUVID -> Corrupted
DXVA Copy -> Corrupted
DXVA Native on nVidia -> DXVA2n -> Corrupted
DXVA Native on IGP -> DXVA2n -> Good
i7-4770 + GT640 with both 0.64 & latest nightly
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.