View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
Damien147
28th December 2023, 14:35
Nevermind.Older adrenalin driver stopped the crashes.
magic144
3rd January 2024, 14:59
can't find an an answer to this after several searches:
in the LAV Video Decoder properties page, if choosing a Hardware Device for DXVA2/D3D11 copy-back, my (in this case NVIDIA GeForce RTX 2060) card is listed twice
is there any reason for the duplicate? is there any difference between the two entries?
thanks
clsid
3rd January 2024, 17:11
The way that enumeration works in Windows API is through displays. So if you have two displays, the GPU will be listed twice. There is no difference. But you can't just filter out duplicates, since it is technically possible to have two distinct identical GPUs in a system.
And on laptops with switchable graphics, you may only see the GPU that is currently active. Tip: you can configure a preferred GPU per app in Windows 10/11 display settings in this case.
magic144
3rd January 2024, 17:59
hmm, ok thanks
I only have 1 display connected though? unless it's some vestige of a previous display still held by the system somehow/somewhere? is there anything I can check to uncover the source of the duplicate?
EDIT: perhaps it's related to Citrix?
my System Info lists a "Citrix Indirect Display Adapter"
Sunspark
6th January 2024, 11:37
Wow, I just ran into an issue.. for the first time, I have encountered a video that reports a fps of 47.952 (2x 23.976). What is truly awful about this is that you can hit play from any point in it, the subs and video are in sync with the audio, and then as it plays, the video drifts out of sync more and more (though the subs stay synced with the audio). The only way to fix it is to hit stop and then play again and it is back in sync. I do have Auto A/V sync turned on in LAV and tried disabling it just now, I think it helped but not completely sure.
Is this a bug or a different issue?
Klaus1189
6th January 2024, 19:11
Can you upload the file somewhere? Cutting out a small part with MKVToolNix would perhaps fix the file and produce a file with other specs.
Sunspark
6th January 2024, 23:43
Can you upload the file somewhere? Cutting out a small part with MKVToolNix would perhaps fix the file and produce a file with other specs.
Ok, I snipped out the first 10 seconds, though this won't be long enough to notice the audio drifting out of sync with the video. MKVToolNix didn't change the specs.
10 second snip of 47.952 file (https://dl.dropboxusercontent.com/scl/fi/so16n5406jirjxkq20x4q/47.952-issue-sample.mkv?rlkey=fuqdclfajunooecl4nyerf4iu&dl=0)
This is odd.. MadVR says 47.952.. looking at it in the EVR-CP HUD says Frame rate: 23.shifting numbers ( 20.854 ms = 47.952, P).. VLC also says 23.976 in the statistics screen. MPV statistics say 23.976 FPS.. so, am I looking at a MadVR bug here? Except it should be 41.71 ms for 23.976 and the EVR-CP HUD said 20.854 ms.. so that's a clue of some sort.. I will add to this, I grabbed the file again from a different encoder and the EVR-CP HUD reports 23.### (41.708 ms = 23.976, P).
41.708/2 = 20.854.. so ???
SeeMoreDigital
7th January 2024, 11:24
Ok, I snipped out the first 10 seconds, though this won't be long enough to notice the audio drifting out of sync with the video. MKVToolNix didn't change the specs.
Hmmm...
Sounds like some VFR encoding related nonsense. When you created the encode did you remember to select 'constant frame rate' encoding?
Sunspark
7th January 2024, 22:11
I didn't create it, the NHTFS group did.
Balling
12th January 2024, 20:24
Ok, I snipped out the first 10 seconds, though this won't be long enough to notice the audio drifting out of sync with the video. MKVToolNix didn't change the specs.
10 second snip of 47.952 file (https://dl.dropboxusercontent.com/scl/fi/so16n5406jirjxkq20x4q/47.952-issue-sample.mkv?rlkey=fuqdclfajunooecl4nyerf4iu&dl=0)
This is odd.. MadVR says 47.952.. looking at it in the EVR-CP HUD says Frame rate: 23.shifting numbers ( 20.854 ms = 47.952, P).. VLC also says 23.976 in the statistics screen. MPV statistics say 23.976 FPS.. so, am I looking at a MadVR bug here? Except it should be 41.71 ms for 23.976 and the EVR-CP HUD said 20.854 ms.. so that's a clue of some sort.. I will add to this, I grabbed the file again from a different encoder and the EVR-CP HUD reports 23.### (41.708 ms = 23.976, P).
41.708/2 = 20.854.. so ???
That file says in Mediainfo that its Original framerate is 47.952, i.e. 48/1.001 (47.95204795204795).
The issue is because it has a wrong fps in first frame. Alas
ffmpeg.exe -an -i "47.952 issue sample.mkv" -c copy -bsf trace_headers -f null -
[trace_headers @ 000001de1f985740] 163 num_units_in_tick 00000000100111110001101011001011 = 10427083
[trace_headers @ 000001de1f985740] 195 time_scale 00111011100110101100101000000000 = 100000000
SeeMoreDigital
12th January 2024, 20:38
I didn't create it, the NHTFS group did.
Who are these people?
Sunspark
14th January 2024, 01:41
Who are these people?
Some scenesters.
Update, sorry guys, it's not the decoder.. should have done this first, but just now I tried "None" as the decoding method, and it didn't change anything.. so that means MadVR as a video renderer is permanently buggy with whatever this type of encoding has done.
Other renderers like MPCVR while it can see the ms times aren't quite right, it does report a framerate of 23.976 as do other renderers. Oh well, hopefully whatever this problem is doesn't spread because it'll always have audio drift under default settings. This is not a 47.952 native framerate, unless Apple is doubling it and then releasing it like that, which I doubt.
Balling
19th January 2024, 22:48
roblem is doesn't spread because it'll always have audio drift under default settings. This is not a 47.952 native framerate, unless Apple is doubling it and then releasing it like that, which I doubt.
48 fps is a thing. Even youtube supports that.
Sunspark
20th January 2024, 06:52
Nope. It's an encoder screw-up.
Actual HFR content is really rare, this is a list of movies: https://en.wikipedia.org/wiki/List_of_films_with_high_frame_rates
No TV shows that I am aware of.
SeeMoreDigital
20th January 2024, 13:22
48 fps is a thing. Even youtube supports that.
Native 48.000fps was a thing in cinemas around ten years ago (ie: The Hobbit movie). However, 48.000fps wasn't able to make any headway in home media due to 48.000Hz not being supported within the HDMI specification.
Maybe that's changed now. I would certainly like to see native 48.000fps content displayed at 48.000Hz, instead of being re-flagged and displayed at 60.000Hz.
As for capturing content at native 60.000fps or higher (ie: Gemini Man) and displaying it at 60.000Hz (59.940Hz), I haven't been that impressed. It just looks weird to my eyes/brain...
Balling
22nd January 2024, 00:18
Native 48.000fps was a thing in cinemas around ten years ago (ie: The Hobbit movie). However, 48.000fps wasn't able to make any headway in home media due to 48.000Hz not being supported within the HDMI specification.
Maybe that's changed now. I would certainly like to see native 48.000fps content displayed at 48.000Hz, instead of being re-flagged and displayed at 60.000Hz.
As for capturing content at native 60.000fps or higher (ie: Gemini Man) and displaying it at 60.000Hz (59.940Hz), I haven't been that impressed. It just looks weird to my eyes/brain...
Well, my Galaxy s22 Ultra with VRR supports 10 fps, 24, 30, 48, 60, 96, 120
EDID can in detailed timing describe any rate you want. VRR of HDMI 2.1 and others support all rates, whatsover.
FranceBB
23rd January 2024, 14:26
Native 48.000fps was a thing in cinemas around ten years ago (ie: The Hobbit movie).
Avatar too, when I saw the second one at the theatre it made me remember that 4D 48fps was actually a thing... :)
As for capturing content at native 60.000fps or higher (ie: Gemini Man) and displaying it at 60.000Hz (59.940Hz), I haven't been that impressed. It just looks weird to my eyes/brain...
It feels weird at first 'cause we're not really expecting that level of smoothness, but after a few minutes I didn't mind. And let's face it, 90% of the population leaves true-motion or whatever the vendor of their TV calls linear interpolation / optical flow on, so they're used to seeing "high frame rate" contents all the time, but at least with actual 60p contents they won't see interpolation artifacts eheheheheh
SeeMoreDigital
23rd January 2024, 14:57
Perhaps in the future some media streaming services might offer us some native 48.000fps/48.000Hz content for displaying on supporting TV's.
Sadly we're never going to have native 48.000fps/48.000Hz content on 4K UHD discs, not that our 4K UHD disc spinners are capable of supporting it anyway!
flossy_cake
26th January 2024, 17:38
This is odd.. MadVR says 47.952.. looking at it in the EVR-CP HUD says Frame rate: 23.shifting numbers ( 20.854 ms = 47.952, P).. VLC also says 23.976 in the statistics screen. MPV statistics say 23.976 FPS.. so, am I looking at a MadVR bug here?
MadVR's OSD framerate value is completely untrustworthy for anything with a variable framerate. The only way I've been able to determine if a file is truly variable frame rate or not is to switch to MPC-HC's own video renderer, turn on its OSD and watch its reported fps value fluctuate in real time. If it fluctuates then I know it's a VFR file.
On a separate note I was just looking into HRTF for headphone usage (I saw you guys were discussing this on the previous page) and would really like that feature. In fact I was just Googling it now and it lead me to this thread.
I saw MPC-HC's Audio Renderer and also the Sane Audio Renderer both have a somewhat vaguely related feature called "crossfeed" which kind of shifts the stereo imaging forward to try and simulate the soundstage of having a pair of stereo speakers infront of you rather than having left and right channels piped directly into your ear, but I don't think it's the same thing as HRTF, and the effect is quite subtle (although I definitely can notice it, and kind of like it for headphone use).
In any case if LAV could wire in ffmpeg/libav's HRTF feature if it exists, that would be fantastic. If you've heard the barber shop demo track with a good pair of phones you'll know how convincing it can potentially be.
PirateIce
13th February 2024, 07:41
Hello, the site https://files.1f0.de/lavf/nightly/ links to here as the place to report issues with the latest lav builds, so I am reporting an issue with build 0.78.0-3, it appears to be an incomplete upload
edit: fixed
Damien147
13th February 2024, 18:07
Realtek HD audio manager is set to stereo in speaker configuration as I am using stereo speakers and always used default settings in LAV audio decoder.I have no complain and everything sounds fine to me but today I noticed the ''enable mixing'' setting in LAV audio decoder.Do I have to tick the ''enable mixing'' setting in LAV audio decoder or mixing is already done as Realtek HD audio manager is set to stereo?That's what I suppose but just want to make sure.I leave default settings in LAV audio decoder?
Siso
13th February 2024, 20:07
If you have stereo speakers it is a good choice to enable mixing.
Damien147
13th February 2024, 20:24
OK,I enabled it.Thank you very much.
Sunspark
13th February 2024, 21:29
If you enable it, make sure the output speaker config drop-down says stereo, otherwise Windows will still mix it to stereo for you. :) Also a good idea to put a check in "don't mix stereo sources".
Damien147
13th February 2024, 22:42
Yes,it was saying stereo in output speaker configuration.Also ticked now "don't mix stereo sources" as you said.Thank you too sir.:)
Damien147
14th February 2024, 00:29
I thought that by having Realtek HD audio manager set to stereo in speaker configuration the mixing was happening already.Can someone explain with what we've done what changes?Better quality?
Sunspark
14th February 2024, 09:14
There is always going to be mixing somewhere. The difference here is that with the mixer in LAV you can adjust the center, surround and LFE levels if you want to. Realtek or Windows doesn't have a slider for that.
Damien147
14th February 2024, 13:38
Ok.I don't want to tweak anything like that because I don't know,it sounds just fine to me.I will leave it with defaults and with the settings you both suggested.Thanks again.
Damien147
14th February 2024, 19:58
Someone somewhere mentioned that he has better sound with mixing in LAV audio disabled.Just to make sure.There is no sound quality degradation with these settings,right?
lvqcl
14th February 2024, 21:20
Use your ears already
Sunspark
14th February 2024, 21:25
Was it me? It really depends.. I run multiple renderers and decoders and paths in different players.
With MPC-HC my normal route is sanear renderer in shared mode, the player downmixing, and realtek loudness equalization on. I only use LAV for decoding here. Though, when I did use LAV for mixing, because I have a sub attached to the speakers, I used center 1.00, surround 0.71, LFE 1.58. Don't use a value for LFE if you don't have a sub. Do try center 1.00.
With MPC-BE, mpc audio renderer in exclusive mode, player downmixing w/ redirect bass checked and center level boosted to +3.0 dB. Decoder is MPC's.
Why the difference? Because I usually use BE for my streaming radio where I want clarity, and HC for my videos so I need more volume and you can't have profiles that can be toggled with a button, so I just run two players for this purpose. Also, (this won't apply to you) I sometimes use BE for anime videos too because my broadwell cpu can crash playback on 10-bit HEVC decoding but those usually will work on BE's.
I've also played around with MPV and VLC too. VLC has a dynamic range audio compressor in the advanced audio filter settings which is like realtek's loudness equalization. I use that setting turned on on my Linux setup because I need the audio boosted after the downmix. The browser extension enhanced-h264ify can also be used to disable volume normalization in youtube so I have that option checked. I don't need YouTube changing the volume when I'm already using Realtek's option. Browsers run in shared mode.
The LAV decoder and mixer works well.
Other people have gone further and installed equalizer apo to fine tune it even more, but I never bothered. My hearing isn't that good. :)
Edit: I stopped using 1.58 because I don't actually have a dedicated jack for the sub.
Damien147
14th February 2024, 22:41
Use your ears already
I don't have the ears and the difference has to be really obvious.
If it's the same thing as before enabling these settings with Realtek HD audio manager doing the mixing in stereo where is the profit?The sliders?
I don't use the sliders,I don't wanna tweak something and it was just fine.
I asked having in mind there was some kind of an improvement in sound quality and if the only improvement is the sliders there is no use for me.
Now if someone here doesn't know for sure about the sound quality I better go back to how I was with these settings disabled as I was fine.
tormento
15th February 2024, 13:38
Is there any changelog for nightly builds too?
nevcairiel
15th February 2024, 13:51
Is there any changelog for nightly builds too?
https://github.com/Nevcairiel/LAVFilters/commits/master/
Manually curated changelogs are only assembled for releases.
tormento
15th February 2024, 13:55
Manually curated changelogs are only assembled for releases.
Thank you. If you want, put that link under the nightly builds in the description part of your useful package.
Siso
15th February 2024, 21:43
Could anyone point me to a good sound compressor to use. I find the sound in lav audio decoder way too quiet for my stereo set up.
Damien147
16th February 2024, 01:24
I have a pair of bookshelf speakers and looking to have a faithful sound with what I have.Someone on reddit (https://www.reddit.com/r/htpc/comments/cug7np/mpchc_audio_settings_for_heapdones/)suggested to disable clipping protection.Is it a good idea in my case to disable it?
tebasuna51
16th February 2024, 10:08
I have a pair of bookshelf speakers and looking to have a faithful sound with what I have.Someone on reddit suggested to disable clipping protection.Is it a good idea in my case to disable it?
Short answer: never.
Damien147
16th February 2024, 14:32
That's the answer I've been looking for.Thank you very much.
Sunspark
16th February 2024, 16:41
@Siso It's not the decoder, it's a side-effect of downmixing 5.1 to stereo. Move LAV's center mix level slider from 0.71 to 1.00 and this will help, see how it is. If you need more, then turn on "loudness equalization" in Realtek's settings (others will have similar) and that will boost it. If your card doesn't have that setting VLC is an option too, it has a compressor in the advanced settings but really, your audio device should have that loudness equalization checkbox (don't use it for important stuff like classical music but it's perfect for things like spoken audio).
Siso
16th February 2024, 16:47
I was hoping for a dsp plugin or other audio compressors.
clsid
16th February 2024, 18:16
If voices are too soft compared to the other sounds, then the center mix level is a great solution when downmixing.
Loudness Equalization is a standard Windows sound enhancement setting. It is not specific to Realtek driver.
MPC-HC has a "Volume Normalization" setting in its audio switcher settings. That does audio compression.
Damien147
17th February 2024, 00:19
Now that you mentioned Realtek I found this (https://maxedtech.com/realtek-audio-best-settings-guide/) the other day suggesting to put default format in 24 bits 48000hz.You agree or I am missing something?
Sunspark
17th February 2024, 05:56
Yes, it is ideal because video is almost always that.
Siso
17th February 2024, 11:01
MPC-HC's volume normalization adjust the volume in a noticable way, you can spot when the volume is adjusted, not what I'm looking for.
Damien147
17th February 2024, 14:55
Yes, it is ideal because video is almost always that.
Ok,thanks.
Sunspark
17th February 2024, 17:11
In fairness to the normalization function, it's a hard problem it's trying to solve. If the whole video was pre-fed into it, then it would be easier because it would be able to calculate everything in advance, but what happens instead is that it has to do it in real time. That, plus there are other parameters that can be set how it functions. Everyone has a different algorithm, this is why I suggest trying additional ones like the ones in the soundcard like Realtek's loudness equalization to compare against.
Related, the default value of 400% might be too high, 200% might be a better value to use.
Siso
17th February 2024, 17:28
In fairness to the normalization function, it's a hard problem it's trying to solve. If the whole video was pre-fed into it, then it would be easier because it would be able to calculate everything in advance, but what happens instead is that it has to do it in real time. That, plus there are other parameters that can be set how it functions. Everyone has a different algorithm, this is why I suggest trying additional ones like the ones in the soundcard like Realtek's loudness equalization to compare against.
Related, the default value of 400% might be too high, 200% might be a better value to use.
Loudness equalization is kind of a silly feature, tried it last night didn't like it at all.
Sunspark
17th February 2024, 19:13
It's a useful feature. It's needed for DTS 5.1>2.0 which will often be too quiet. Also for streaming video from various websites, haven't you noticed many are also quiet?
I was doing an listening test earlier in HC trying out different combinations. One suggestion I can make which will make a difference whether normalization is on or off, is to have "ignore system channel mixer" be checked. This is actually disable windows audio enhancements which you can also do manually in the sound control panel. I find that when it is unchecked (enabled), voices are quieter on this realtek. Also in LAV mixer output set to stereo, change mixing center level to 1.00 (default is 0.71).
flossy_cake
19th February 2024, 11:34
I was hoping for a dsp plugin or other audio compressors.
Save this as a .avs file and open it in your media player with LAV as the source filter for opening .avs files
file = "C:\YourVideoFile.mkv"
# Decode the source file using LWLibav decoders (most reliable imo)
video = LWLibavVideoSource(file)
audio = LWLibavAudioSource(file, stream_index=-1, av_sync=true)
AudioDub(video, audio)
# Apply audio peak normalization - scans the entire audio track prior to playback and raises
# peak volume until loudest sample touches 2% below clipping
Normalize(0.98)
If the loudness still isn't sufficient for your taste, you will have to use compression to boost the quiet sounds and lower the loud sounds relative to each other.
If implemented poorly like the Microsoft driver then you will hear volume pumping which sucks. Dolby compression profiles are a lot better imo and have less pumping. Here are the Dolby profiles implemented in Avisynth with Sox Filter (specifically pinterf's recently updated version here (https://forum.doom9.org/showthread.php?t=185189) which supports realtime use without distorting audio).
In order from least compression to most compression:
# film light fast
SoxFilter("compand 0.01,1.00 -90,-90,-70,-64,-53,-47,-41,-41,-21,-21,-10,-16,0,-15 0 0 0.054")
# film light slow
SoxFilter("compand 0.10,3.00 -90,-90,-70,-64,-53,-47,-41,-41,-21,-21,-10,-16,0,-15 0 0 0.054")
# music light fast
SoxFilter("compand 0.01,1.00 -90,-90,-70,-58,-65,-53,-41,-41,-21,-21,0,-11 0 0 0.054")
# music light slow
SoxFilter("compand 0.10,3.00 -90,-90,-70,-58,-65,-53,-41,-41,-21,-21,0,-11 0 0 0.054")
#film standard fast
SoxFilter("compand 0.01,1.00 -90,-90,-70,-64,-43,-37,-31,-31,-21,-21,0,-20 0 0 0.054")
#film standard slow
SoxFilter("compand 0.10,3.00 -90,-90,-70,-64,-43,-37,-31,-31,-21,-21,0,-20 0 0 0.054")
# music standard fast
SoxFilter("compand 0.01,1.00 -90,-90,-70,-58,-55,-43,-31,-31,-16,-21,0,-20 0 0 0.054")
# music standard slow
SoxFilter("compand 0.10,10.0 -90,-90,-70,-58,-55,-43,-31,-31,-16,-21,0,-20 0 0 0.054")
# speech fast
SoxFilter("compand 0.01,0.20 -90,-90,-70,-55,-50,-35,-31,-31,-16,-21,0,-20 0 0 0.054")
# speech slow
SoxFilter("compand 0.10,1.00 -90,-90,-70,-55,-50,-35,-31,-31,-16,-21,0,-20 0 0 0.054")
https://i.ibb.co/v3TJ4tN/3LxGoz.png
For maximum volume do it before the Normalize(0.98) however the loading time will be longer due to having to run the whole audio track through SoxFilter first.
Fast/slow refers to the attack & decay times specified by Dolby which control how fast the compressor reacts to increases & decreases in the source volume.
Thanks to tebasuna51 for linking me to the Dolby docs to make these profiles from :thanks:
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.