View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
Thanks for the sample, I can reproduce the issue. Will take a look.
Edit:
Fixed
Thank you for your quick response.
nevcairiel
20th June 2025, 11:18
LAV Filters 0.80
LAV Splitter
- NEW: Introduced the IURLSourceFilterLAV interface to allow opening URLs with custom user agent and referrer
- NEW: Added support for WebP images
- Changed: Increased the length of the advanced subtitle selection field, so its no longer cut off after 255 characters
- Changed: Improved buffering behavior on badly interleaved video files
- Fixed: Audio streams with an unknown/unsupported codec are no longer selected for playback, as long as others are present
- Fixed: Improved accuracy of reported FPS from AviSynth scripts
LAV Video
- NEW: D3D11 support for HEVC 4:2:2 and 4:4:4 hardware decoding
- NEW: Dolby Vision extension metadata is exported for renderers to use
- Changed: Added additional media types to support more video streams
- Changed: Updated dav1d for significant AV1 decoding improvements
- Fixed: Improved handling of H.264 4:4:4 files encoded by certain versions of x264
- Fixed: VP9 DXVA2/D3D11 decoding could result in artifacts on some clips
- Fixed: Decoding ProRes reports more accurate color details
LAV Audio
- Changed: Added support for additional ADPCM audio codecs
Download: Installer (both x86/x64) (https://files.1f0.de/lavf/LAVFilters-0.80.exe) -- Zips: 32-bit (https://files.1f0.de/lavf/LAVFilters-0.80.zip) & 64-bit (https://files.1f0.de/lavf/LAVFilters-0.80-x64.zip)
After a long wait, finally new update.
Headline change in this update, for me, D3D11 HEVC 4:2:2/4:4:4 support. Both in copy-back, and in theory in native, although I'm not sure if any renderer supports native (yet).
I do not currently plan to bring that to DXVA2 as well due to certain limitations, but maybe that changes in the future.
As always, report issues and regressions, in as much detail as possible.
lvqcl
20th June 2025, 21:02
Thanks!
LAV Filters 0.80
Headline change in this update, for me, D3D11 HEVC 4:2:2/4:4:4 support. Both in copy-back, and in theory in native, although I'm not sure if any renderer supports native (yet).
It seems that MPC VR supports 4:4:4 native (maybe it also supports 4:2:2, but I cannot test it right now).
But: I can get HEVC 4:4:4 8-bit native decode only if I manually enable AYUV format in LAV Video settings. If it's disabled then I get copyback with YV24.
No problems with 10-bit and 12-bit HEVC.
nevcairiel
20th June 2025, 21:28
That is expected, because AYUV is the 4:4:4 8-bit hardware surface format for the decoder. AYUV caused some issues in the past with some renderers, but maybe it should be enabled by now.
Note that 4:2:2 >8-bit native is not currently supported because LAV does not support Y210/Y216 output formats natively. I should probably add it at some point.
Blight
29th June 2025, 13:27
nev:
Is there a way to control the timeout on network connections? (.ts / .m3u8 streams)
I noticed that with some bad connections, the timeout can be ~20seconds, it would be nice to be able to control the timeout value.
tv-viewer
3rd July 2025, 07:05
The librempeg (https://github.com/librempeg/librempeg) fork of ffmpeg has added support for a number of codecs not supported in mainline ffmpeg, most notable to me being AC-4 due to its use in ATSC 3.0 broadcasts in the USA, Korea, and elsewhere. Can AC-4 support be added to LAV Filters?
v0lt
12th July 2025, 13:36
most notable to me being AC-4 due to its use in ATSC 3.0 broadcasts in the USA, Korea, and elsewhere.
Please provide recording files of real broadcasts with AC-4 audio (not tests, not demos).
tv-viewer
17th July 2025, 01:18
Please provide recording files of real broadcasts with AC-4 audio (not tests, not demos).
Happy to. Is there a preferred place to upload them?
v0lt
17th July 2025, 16:10
Happy to. Is there a preferred place to upload them?
drive.google.com, mega.io, www.dropbox.com, www.mediafire.com and other services.
ipanema
17th July 2025, 16:49
If I connect a custom DirectShow filter that only accepts samples in RGB format to the output of the LAV video decoder when D3D11 hardware acceleration is selected in the settings, will it output the RGB frames in GPU memory?
I know that the custom filter's input pin must also implement ID3D11DecoderConfiguration to receive samples in GPU memory.
But reading the source code suggests that only NV12 and some other YUV pixel formats can be output in GPU memory - for example in d3d11va.cpp we have:
CMediaType mt = m_pCallback->GetOutputMediaType();
if ((m_SurfaceFormat == DXGI_FORMAT_NV12 && mt.subtype != MEDIASUBTYPE_NV12) ||
(m_SurfaceFormat == DXGI_FORMAT_P010 && mt.subtype != MEDIASUBTYPE_P010) ||
(m_SurfaceFormat == DXGI_FORMAT_P016 && mt.subtype != MEDIASUBTYPE_P016) ||
(m_SurfaceFormat == DXGI_FORMAT_AYUV && mt.subtype != MEDIASUBTYPE_AYUV) ||
(m_SurfaceFormat == DXGI_FORMAT_Y410 && mt.subtype != MEDIASUBTYPE_Y410) ||
(m_SurfaceFormat == DXGI_FORMAT_Y416 && mt.subtype != MEDIASUBTYPE_Y416) ||
(m_SurfaceFormat == DXGI_FORMAT_YUY2 && mt.subtype != MEDIASUBTYPE_YUY2) ||
(m_SurfaceFormat == DXGI_FORMAT_Y210 && mt.subtype != MEDIASUBTYPE_Y210) ||
(m_SurfaceFormat == DXGI_FORMAT_Y216 && mt.subtype != MEDIASUBTYPE_Y216))
{
DbgLog((LOG_ERROR, 10, L"-> Connection is not the appropriate pixel format for D3D11 Native"));
SafeRelease(&pD3D11DecoderConfiguration);
}
So is LAV video decoder only capable of outputting frames in RGB format in CPU (not GPU) memory?
nevcairiel
17th July 2025, 21:55
So is LAV video decoder only capable of outputting frames in RGB format in CPU (not GPU) memory?
LAV Video can only output hardware frames in the same format as the decoder outputs them. First it would depend on the video you are decoding, as that would dictate the format, and secondly, RGB is not among those. Even if a video was RGB (eg. HEVC 4:4:4 in RGB), it would come out as AYUV/Y410 with a RGB color matrix instead.
LAV can certainly not convert any video to RGB as a hardware surface. If you require that, its on you to make happen.
ipanema
18th July 2025, 00:02
Thanks for confirming that. Sounds like the custom filter needs to accept nv12 to receive it in GPU memory, then use a shader to convert it to RGB, still in GPU memory.
ipanema
18th July 2025, 14:29
Just one more quick confirmation...
If the LAV decoder is configured to use D3D11, and it is outputting RGB (either because it is the only output format selected in the config window, or the downstream filter will only accept RGB), it will be outputting in CPU memory BUT the actual decoding will still be done in hardware (not using the software decoder)?
(So LAV will convert the decoded frames from NV12 in GPU memory to RGB in CPU memory for output.)
clsid
18th July 2025, 22:45
Yes, copyback mode can output/convert in all colorspace in cpu mem.
What does your custom filter do? Ideally it should support nv12/p010/etc.
tv-viewer
19th July 2025, 03:47
Please provide recording files of real broadcasts with AC-4 audio (not tests, not demos).
Couple of real ATSC 3.0 broadcasts from HDHomeRun:
WJCT-DT https://www.dropbox.com/scl/fi/8hcfd5hscr8cmd73gdpeq/WJCT.ts?rlkey=3fz6xh5n9cnnu57ql7ldwmgye&st=gdq04678&dl=0
KDAF-DT https://www.dropbox.com/scl/fi/63knsuhsdocns60oo82q0/KDAF.ts?rlkey=spa9qtat1n0dw1mdi8wa6klac&st=g9xho4xg&dl=0
v0lt
19th July 2025, 05:35
Thanks.
Checked in MPC-BE - plays.
Sent to ticket #8349 (FFmpeg) (https://trac.ffmpeg.org/ticket/8349#comment:96).
ipanema
20th July 2025, 14:38
Thanks - OK, think I've got it now.
Eventually hoping the filter will write text or other graphics directly onto the surface/texture in GPU memory - but it's early days so far! Still quite a bit to learn. Thanks again.
mclingo
26th July 2025, 21:35
I haven't got much DTSX material So I'm not sure how long I've had this issue when I play Dolby Atmos it correctly plays all the sounds on the correct speakers I have 5.1 .2 which is a 5.1 standard setup with two front height speakers. when I play DTSX it correctly plays the rear height out of the front heights But plays the front heights out of left and right where it should be summing both heights to the front heights, This works correctly in atmos so it can't be an issue with lav setup?
i have a yamaha V685 anyone any ideas
tebasuna51
27th July 2025, 09:14
LAV filters can't decode properly 3D audio from DTSX or Atmos. You need a proprietary decoder to do so (only Cavernize can decode EAC3 Atmos).
To obtain the 3D audio you need to tell the player to pass the Atmos or DTSX directly to your Yamaha for decoding.
Therefore, it can never be a problem with the LAV filters.
What is your player? Verify if have passtrough (bitstreaming HDMI) for audio TrueHD, Eac3, DTS...
mclingo
27th July 2025, 11:06
you can't get any height audio without using pass through, as atmos is perfectly fine it should tell you I'm already using bit streaming, this is just dts-x issue as far as I can tell
mclingo
27th July 2025, 11:59
I've actually had some progress with this using chat GPT Of all things, it told me to check what my front height present speakers were set to on my AVR which I just assumed was set correctly because atmos was working, however they were set to "overhead" and not "height" When they were set to it "height" it sent my front height audio out of my height speakers however it sent my rear height information out of my rear speakers, but as I don't have any rear heights having it come out of the might be better than come out of the front heights anyway.
I'm still not sure why it's not summing all high audio information to my front heights as my AVR is definitely set up as 5.1.2
tebasuna51
28th July 2025, 09:23
If you use always passtrough the problem concern always to your AVR YAMAHA RX-V685, maybe you can open other thread out off this LAV filter thread.
I have a Denon AVR and I can't help you with your Yamaha, sorry.
mclingo
28th July 2025, 13:07
out of interest, in LAV audio options, what should be ticked their for my setup, 5.1.2 using front heights to sum all height audio - I currently have expand 6.1 to 7.1 ticked, use legacy 5.1 layout ticked and convert to standard channels is unticked. Thoughts?
huhn
28th July 2025, 14:41
only matters for PCM if you are bit streaming and rare formats that may not be supported.
you have to know if you have the legacy 5.1 or "modern" 5.1 as a base layout.
mclingo
28th July 2025, 15:10
thanks for the info, not sure what you mean by modern or base, my AVR is set to BASIC which is 5.1.2 front height presence, maybe its normal behaviour, maybe ATMOS sums all height audio to whatever height speakers you have setup and DTS sends front height audio to front and if you dont have back heights it sends them to back surround, kind of makes sense, just thought someone might know if that was the case.
tebasuna51
29th July 2025, 10:14
out of interest, in LAV audio options, what should be ticked their for my setup, 5.1.2 using front heights to sum all height audio - I currently have expand 6.1 to 7.1 ticked, use legacy 5.1 layout ticked and convert to standard channels is unticked. Thoughts?
As I mentioned before, this is excluded from LAV filters when the source is Atmos or DTSX audio, as they cannot be properly decoded.
However, if these formats have been previously decoded to PCM 5.1.2, as I explained in Surround 3D (https://forum.doom9.org/showthread.php?t=186285) (I don't know how for DTSX), it would be interesting to investigate how a player that uses LAV filters can send that PCM to an AVR.
In my specific case, a Denon AVR, I was only able to achieve this with a trick (https://forum.doom9.org/showthread.php?p=2017560#post2017560), as any configuration I used failed to recognize the high front channels.
mclingo
29th July 2025, 10:55
right got you, I think I have it setup now with something I can live with, not much DTS in my collection anyway so great, thanks.
clsid
29th July 2025, 12:05
MPC-HC audio switcher has a channel mapping feature that you could use to redirect those two channels.
mclingo
29th July 2025, 12:38
that would only work with PCM surely though?
clsid
29th July 2025, 13:00
Of course.
When bitstreaming, the audio stream is send in its original compressed form to the receiver, and the receiver is completely and totally responsible for doing ALL decoding / processing / channel mixing / volume control. No exceptions. On the PC side the audio can not be manipulated at all (unless it is transcoded).
tebasuna51
30th July 2025, 07:33
that would only work with PCM surely though?
Like I say in my thread:
"This way, whether mpc-hc decodes a correct EAC3/m4a/flac 5.1.2 or an AAC/Opus 7.1 with inverted 5.1.2 channels, the result will be the desired one: hearing the top channels through the fake back channels."
LAV filters can decode previously (if EAC3 you need unmark the bitstreaming for it) and after the AudioSwitcher do the job.
I recommend m4a generated by ffmpeg with libfdk
Kurt.noise
25th August 2025, 14:22
Not sure if this is the right place to ask new request but is it possible to have the APV codec support since its officially available through FFmpeg 8.0 release ?
:thanks:
v0lt
25th August 2025, 14:48
Not sure if this is the right place to ask new request but is it possible to have the APV codec support since its officially available through FFmpeg 8.0 release ?
1. First, tell us what you need this codec for? :rolleyes:
2. Where is this codec used?
3. Please provide samples with this codec. Files should not be made in FFmpeg.
Kurt.noise
25th August 2025, 15:03
1. First, tell us what you need this codec for? :rolleyes:
why not ? why we have RealVideo, FLV1, VP3 in there ? Noone use them nowadays :rolleyes:
2. Where is this codec used?
All Android 16 devices (https://www.androidauthority.com/android-16-beta-1-3518608/) + Samsung stuff, mpv and related players, not enough for you ?
3. Please provide samples with this codec. Files should not be made in FFmpeg.
https://forum.doom9.org/showthread.php?t=185868
v0lt
25th August 2025, 16:09
why not ? why we have RealVideo, FLV1, VP3 in there ? People have old video files. :rolleyes:
People have old video files.
All Android 16 devices + Samsung stuff, mpv and related players, not enough for you ?
This does not answer the question of what this codec is used for.
https://forum.doom9.org/showthread.php?t=185868
There are no samples except one test file encoded with FFmpeg.
LigH
25th August 2025, 16:27
The media-autobuild suite added support for this high quality high resolution intermediate codec, similar to Apple ProRes.
The APV codec is a professional video codec, which was developed in response to the need for professional level high quality video recording and post production. The primary purpose of the APV codec is for use in professional video recording and editing workflows for various types of content.
https://github.com/AcademySoftwareFoundation/openapv (raw samples in test subdir)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.