View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
nevcairiel
28th March 2024, 00:05
There have been no relevant changes between 0.78.0-8 and 0.79, only some minor bugfixes in ffmpeg.
AngelGraves13
28th March 2024, 00:49
There have been no relevant changes between 0.78.0-8 and 0.79, only some minor bugfixes in ffmpeg.
0.78.0-8 works fine, but 0.78.0-10 and newer have frame pacing issues for me and others, but not everyone.
Both of my affected systems have Nvidia GPUs and AMD CPUs. Don't know if you need more information than that. I don't know if Ultra Low Latency mode has issues with the newer versions or if it's something else in the code.
I would like to help get this sorted as I don't want to miss out on newer versions. Let me know what info you need.
One system is an older AMD Ryzen 5 3600 with 64GBs DDR4 and a 1080 Ti and the other is a AMD Ryzen 9 5950X with 128GBs of DDR4 and a 4090 RTX. Neither system has an issues playing MKV files (mainly remuxes) with older versions pre-0.78.0-10. New version just freezes or skips every 2-3 seconds with frame rate dropping to 21 or 22 fps (average according to MPC VR). madVR has the same behavior but displays the frame rate of the file as 23.976.
https://i.postimg.cc/YG7hTZ33/Screenshot-2024-03-27-171104.png (https://postimg.cc/YG7hTZ33) 0.79 - reporting incorrect frame rate and frame rate dropping to 20 fps
https://i.postimg.cc/8JbjG4XV/Screenshot-2024-03-27-171531.png (https://postimg.cc/8JbjG4XV) 0.78.0-8 - playing with correct frame rate and no issues
Hmmm...seems it has something to do with HDR. It seems only HDR files are affected with the frame pacing issues. Are you guys testing HDR files, the people who are saying they don't have issues?
Snowknight26
28th March 2024, 01:56
Hmmm...seems it has something to do with HDR.
It doesn't, it happens regardless of SDR/HDR.
I see the issue too, but not with all videos.
Can't seem to get DbgLog to output anything, though, so dunno what additional info to provide.
AngelGraves13
28th March 2024, 02:01
It doesn't, it happens regardless of SDR/HDR.
I see the issue too, but not with all videos.
Can't seem to get DbgLog to output anything, though, so dunno what additional info to provide.
Interesting...I guess we can add another affected user to the list.
ryrynz
28th March 2024, 09:06
Not sure if it's related but it's out of the ordinary for my system to see two playblack crashes within an hour or so, seemed to be similar to memory overlocking/timing instability with the player crashing during playback. Thinking it's previous latest nightly LAV 0-8 as that's the only thing in the chain that's been updated recently and previously everything has been super stable.
I've reverted to 0.78.0-5, so far no issues. CPU & RAM are at defaults.
nevcairiel
28th March 2024, 10:43
I've been looking at the glitch issue and identified that its limited to HEVC video only, and looking into a fix.
nevcairiel
28th March 2024, 10:58
There is a new nightly up at https://files.1f0.de/lavf/nightly/LAVFilters-0.79.0-1.exe if you could test on your end.
AngelGraves13
28th March 2024, 17:03
There is a new nightly up at https://files.1f0.de/lavf/nightly/LAVFilters-0.79.0-1.exe if you could test on your end.
It's fixed for me :D
nevcairiel
28th March 2024, 17:32
LAV Filters 0.79.1
LAV Video
- Fixed: Resolved a glitch when playing HEVC video
Download: Installer (both x86/x64) (https://files.1f0.de/lavf/LAVFilters-0.79.1.exe) -- Zips: 32-bit (https://files.1f0.de/lavf/LAVFilters-0.79.1.zip) & 64-bit (https://files.1f0.de/lavf/LAVFilters-0.79.1-x64.zip)
A tiny update on top of 0.79 to fix a glitch when playing HEVC videos.
For 0.79 check here: https://forum.doom9.org/showthread.php?p=1999624#post1999624
As always, report issues and regressions, in as much detail as possible.
clsid
28th March 2024, 17:36
Assuming there will be a fixed release soon, could you consider also including the animated webp patches? They were just posted on ffmpeg mailing list, and have gone through review before.
nevcairiel
28th March 2024, 17:53
I don't generally cherry-pick major features before they land in the tree. Its just a chore to maintain a patchset of 11 patches and then figure out their conflicts later when it gets merged officially.
But you are also too late.
nevcairiel
8th April 2024, 09:25
LAV Filters 0.79.2
LAV Splitter
- Fixed: Buffering media from a high latency source was slower then expected (since 0.79)
LAV Audio
- Fixed: Bitstream AC3 audio could fallback to PCM on streams that start with a corrupt audio frame (since 0.78)
- Fixed: Resolved a memory leak when bitstreaming AC3
Download: Installer (both x86/x64) (https://files.1f0.de/lavf/LAVFilters-0.79.2.exe) -- Zips: 32-bit (https://files.1f0.de/lavf/LAVFilters-0.79.2.zip) & 64-bit (https://files.1f0.de/lavf/LAVFilters-0.79.2-x64.zip)
Another set of fixes for issues that have been reported recently, which impacted the playback experience.
For 0.79 check here: https://forum.doom9.org/showthread.php?p=1999624#post1999624
As always, report issues and regressions, in as much detail as possible.
ryrynz
8th April 2024, 11:19
Thank you sir.
Sebastiii
8th April 2024, 14:16
Thanks [emoji106]
Envoyé de mon LYA-L29 en utilisant Tapatalk
rock
9th April 2024, 14:32
I try to play spx file and sound crackling. I check lavfilters is built with libspeex but it seems it use ffmpeg decoder instead. notice this while playing a sample (https://filesamples.com/formats/spx)
Tlen
18th April 2024, 20:35
@nevcairiel
Testing x264 lossless compression ratio in another thread
I found that on a cpu i5-1035G1 with MPC-HC
accelerated hardware decoding of h264 works without problems with "standard" compression
But the HW acceleration is not used when playing lossless x264 (done with Ultrafast preset or others).
Is that an expected behaviour?
Thank you
LigH
18th April 2024, 20:36
Yes, lossless compression in H.264 works in a completely different way than any lossy method, so it is not supported by decoder chips.
Tlen
18th April 2024, 21:33
Really? Thank you for the information.
huhn
18th April 2024, 23:23
Yes, lossless compression in H.264 works in a completely different way than any lossy method, so it is not supported by decoder chips.
doesn't help here but nvidia supports it since maxwell.
her an image of mpv actually doing that:
https://i.postimg.cc/8DLDkRH8/x265lossless.png
355 mb for low motion 4 sec just perfection.
btw the same file encoded from the lossless h265 10 bit file in other lossless codex default preset:
8 bit h264 --crf 0 131 mb not fair 8 bit
10 bit h264 from 2017 i can't find newer binaries 264 mb needs --qp 0
btw. h265 has no p frames:
"keyint=1:lossless=1"
i tried it without keyint=1 but it was not lossless.
https://trac.ffmpeg.org/wiki/Encode/H.265#Losslessencoding
making is very questionable level indeed.
btw. nvidia can also decode and encode 4:4:4 lossless too.
nevcairiel
19th April 2024, 06:58
doesn't help here but nvidia supports it since maxwell.
her an image of mpv actually doing that:
https://i.postimg.cc/8DLDkRH8/x265lossless.png
Thats HEVC.
Microsoft is actually in the process of extending the DXVA specification for RExt HEVC profiles, which will likely be available in the next major Windows update and hopefully graphics drivers also supporting it by then (and since its not actually tied to Windows functions, maybe also works on older Windows with newer drivers then).
But for H264, there is no further development on that front that i'm aware of.
huhn
19th April 2024, 09:52
true here it is for h264 which is quite amazing:
https://i.postimg.cc/NfZ99FDf/h264.png
i still have a 960 around somewhere to show that this is very old tech.
h264 high 4:4:4 predictive L5.1
this profile allows up to 14 bit only 8 bit is supported AFAIK. i have a 10 bit file around now it does not work.
flossy_cake
30th April 2024, 13:00
Hello I am having an issue where LAV is failing to open .avs files if the file name contains UTF-8 characters in languages such as Japanese or Russian, for example テスト.avs or тест.avs. Characters like German ü do not seem to have a problem - prüfen.avs works just fine.
Avisynth supports scripts containing those characters as long as the .avs file is encoded as UTF-8 without BOM (which I have confirmed in Notepad++: Encoding -> Encode in UTF-8).
Everything works fine until the .avs FILE NAME contains foreign characters, at which point LAV fails to open it and MPC-HC falls back to default DirectShow Avisynth filter (generic Microsoft "AVI/wav file source").
To reproduce the issue here is a test clip テスト.ts (https://drive.google.com/uc?export=download&id=1tTHpVIkX1yH6kqge0p7fcBfimQ7cH51Z) and .avs file テスト.avs (https://drive.google.com/uc?export=download&id=1qjki6V6bPD2qP422Q2P8T28ko4uZcWRZ). In MPC-HC you'll want to make sure to tick Options → Internal Filters → Source filters → Avisynth which should tell it to open .avs files with LAV as the DirectShow filter.
On my system if I open テスト.avs it plays but DirectShow fails to choose LAV as the source filter. Then if I rename it to test.avs or prüfen.avs it uses LAV as expected.
:thanks:
LigH
30th April 2024, 13:05
German umlauts are covered by the 8 bit codepage 1252 which is common for most languages with latin characters in Windows. A complete Unicode support may require a consistent use of Wide Character functions (16 bits per character).
flossy_cake
30th April 2024, 13:31
German umlauts are covered by the 8 bit codepage 1252 which is common for most languages with latin characters in Windows. A complete Unicode support may require a consistent use of Wide Character functions (16 bits per character).
I thought that would not be an issue for LAV as it has no trouble opening テスト.ts or тест.ts. The issue is only with .avs files, and removing LAV from the DirectShow graph restores compatibility, therefore I figured it's a LAV issue specifically relating to .avs files.
Blight
30th April 2024, 13:33
Is it possible to specify a "referrer" and "user-agent" when opening URL streams using LAV Source Filter?
There are streaming sites that will not work if these fields are not specified when opening the stream and the "IFileSourceFilter" doesn't seem to support any additional parameters other than the filename/URL.
nevcairiel
30th April 2024, 16:44
Hello I am having an issue where LAV is failing to open .avs files if the file name contains UTF-8 characters in languages such as Japanese or Russian, for example テスト.avs or тест.avs. Characters like German ü do not seem to have a problem - prüfen.avs works just fine.
Avisynth supports scripts containing those characters as long as the .avs file is encoded as UTF-8 without BOM (which I have confirmed in Notepad++: Encoding -> Encode in UTF-8).
Everything works fine until the .avs FILE NAME contains foreign characters, at which point LAV fails to open it and MPC-HC falls back to default DirectShow Avisynth filter (generic Microsoft "AVI/wav file source").
To reproduce the issue here is a test clip テスト.ts (https://drive.google.com/uc?export=download&id=1tTHpVIkX1yH6kqge0p7fcBfimQ7cH51Z) and .avs file テスト.avs (https://drive.google.com/uc?export=download&id=1qjki6V6bPD2qP422Q2P8T28ko4uZcWRZ). In MPC-HC you'll want to make sure to tick Options → Internal Filters → Source filters → Avisynth which should tell it to open .avs files with LAV as the DirectShow filter.
On my system if I open テスト.avs it plays but DirectShow fails to choose LAV as the source filter. Then if I rename it to test.avs or prüfen.avs it uses LAV as expected.
:thanks:
This should be working fine if you use AviSynth+ in any recent version (from the last 3 years or so, from what I can tell). Older versions and classic AviSynth do not have the ability to pass unicode filenames to it.
flossy_cake
30th April 2024, 17:47
This should be working fine if you use AviSynth+ in any recent version (from the last 3 years or so, from what I can tell). Older versions and classic AviSynth do not have the ability to pass unicode filenames to it.
I am using the latest public release on Github, and I can see the release notes for much older versions mention adding support for those characters, so I agree it should not be an issue. Yet somehow it is an issue, therefore I would be interested to hear if you were able to recreate the issue with the 2 test files I uploaded to gdrive.
The fact that it works fine when using the default generic Microsoft DirectShow source filter but not LAV, would seem to indicate an issue with LAV?
nevcairiel
30th April 2024, 20:16
I am using the latest public release on Github, and I can see the release notes for much older versions mention adding support for those characters, so I agree it should not be an issue. Yet somehow it is an issue, therefore I would be interested to hear if you were able to recreate the issue with the 2 test files I uploaded to gdrive.
The fact that it works fine when using the default generic Microsoft DirectShow source filter but not LAV, would seem to indicate an issue with LAV?
Works fine for me. Installed AviSynth+ 3.7.3 and the latest LSMASHSource, and it just opens.
You may have some outdated AviSynth somewhere, or a script error - contrary to their DirectShow filter, script errors won't generate an image with the error text, but just fail to open.
flossy_cake
30th April 2024, 21:15
Works fine for me. Installed AviSynth+ 3.7.3 and the latest LSMASHSource, and it just opens.
It opens for me too, but not with LAV. Are you sure it's opening with LAV on your system - in MPC-HC if you copy filters to clipboard does it say LAV Splitter and LAV Video Decoder are active or is it just using "AVI/WAV File Source"?
If I replace the LWLibavVideoSource with LWLibavAudioSource then I get failed to render pin errors. Then if I rename the file it works fine. The script is just a single line: LWLibavVideoSource("テスト.ts") so it can't be a script error.
nevcairiel
30th April 2024, 21:17
If i say it works, it works. The error must be on your system.
flossy_cake
30th April 2024, 21:39
If i say it works, it works.
The error must be on your system.
Yes it would seem that way, although it is possible to have a bug that only occurs on certain systems, and "it works on my system so there is no issue" is kind of a recipe for disaster imo :o
The reason I'm looking at LAV as the culprit is by process of elimination:
1. The bug cannot be inside Avisynth because Avisynth can open the script as long as I don't use LAV Splitter/Decoder.
2. The fault is probably not with MPC-HC because it can open the script as long as it doesn't use LAV Splitter/Decoder.
Then if I rename the file the issue goes away, so from this we can deduce it is an issue with incorrect character encoding that SEEMS to have something to do with LAV Splitter/Decoder.
nevcairiel
30th April 2024, 21:44
3. Your AviSynth setup is out of date, or specifically, the version installed globally in the system for LAV to find is out of date.
4. Your LAV is out of date, Unicode support for AVS scripts would've been added in 0.77
There is always more reasons. Anyway the code is clear. If you run AviSynth+ in a new enough version, Unicode filenames work fine. If you run an old version, they don't work.
You could for example run this script and see what version it claims to be:
### 'Version' filter with background/template clip
function Version(clip bg, bool "showbg")
{
showbg = Default(showbg, false)
bg = (showbg) ? bg : BlankClip(bg, color=$404040)
v=Version
m=v.ConvertToRGB32.ColorKeyMask($404040, 0).ShowAlpha
Overlay(bg, v, mask=m.Blur(0.2),
\ x=(bg.Width/2-v.Width/2),
\ y=(bg.Height/2-v.Height/2))
return Last
}
Version(BlankClip(width=600, height=336, pixel_type="RGB32"))
https://i.imgur.com/7O7zxmM.png
https://i.imgur.com/pO8Fz5e.png
flossy_cake
30th April 2024, 21:59
Well, updating LAV from 0.75 to 0.79 solved it. (edit: beat me to it)
I didn't want to update it as it was all working perfectly and I try to avoid "if it aint broke fix it until it is"
I couldn't find anything in the release notes between 0.75 and 0.79 about it, just this older one: 0.10 - 2010/10/26 "Fix loading of files with unicode characters in their names".
Blight
1st May 2024, 11:06
Nev:
Any chance of adding an interface so I can assign a user-agent and referrer strings or possibly just a formatting option in the URL specified?
For example "https://www.somesite.org/stream|user-agent|referrer" ?
@Nevcairiel
I would like to see duration on this VideoOnDemand example:
http://omomomo.com/stream/test1.m3u8
Please add such opportunity if possible.
@Nevcairiel
I see stuttering, using LAVSplitter, after first 30-60 seconds of this stream on this video example:
https://strm.yandex.ru/kal/fashion_tv/manifest.mpd
Any feedback would be appreciated.
@Nevcairiel
Currently, it is possible to select a specified track only for DASH-streams. Please add such opportunity for HLS-streams to enable a better quality stream manually, because at this moment LAVSplitter choose track with highest bitrate[112kbps] but not with highest quality[64kbps]:
Example:
https://hls-01-radiorecord.hostingradio.ru/record-russianhits/playlist.m3u8
this example have three tracks:
1.1) Lowest audio quality(HE-AACv2 [32kbps]):
https://hls-01-radiorecord.hostingradio.ru/record-russianhits/32/playlist.m3u8
1.2) Medium audio quality(AAC-LC [112kbps]):
https://hls-01-radiorecord.hostingradio.ru/record-russianhits/112/playlist.m3u8
1.3) Highest audio quality(HE-AACv1 [64kbps]):
https://hls-01-radiorecord.hostingradio.ru/record-russianhits/64/playlist.m3u8
@Nevcairiel
I'm noticed that LAVSplitter can't starting to play this HLS-stream example:
https://strm.yandex.ru/kal/fashion_tv/fashion_tv0.m3u8
p.s. Through VLC media player stream can be played and on Windows 7 and on Windows 10.
Any feedback would be appreciated.
And if you right-click on the LAV Splitter tray icon during loading of above link, it will crash.
And if you right-click on the LAV Splitter tray icon during loading of above link, it will crash.
Hello clsid,
Good catch! I got crashing on two different PCs :( Thanks for the feedback ;)
AngelGraves13
9th May 2024, 19:04
Will you be adding DirectX 12 copy-back mode support?
MPC-BE just added it, so I'm guessing it's not far behind for LAV.
From MPC-BE 1.7.0 notes
"Added support for D3D12 copy back mode"
nevcairiel
9th May 2024, 19:09
For Copy-Back in particular it doesn't seem to have major advantages. Why would you want to use it?
The only reason to support it would be if a video renderer use D3D12 and wants interoperability - eg. in Native mode.
max79
14th May 2024, 14:47
@Nevcairiel
This SPEEX-audio file is played with distortion. Link for downloading:
https://dl.dropbox.com/scl/fi/596hxuba227ph8975q5s9/SR41.spx?rlkey=5vfv3nzs798cpeyaiuy8i89tc
I'm noticed that I have no such issue when playing it on my PC through VLC.
Any feedback would be appreciated.
AngelGraves13
14th May 2024, 23:42
For Copy-Back in particular it doesn't seem to have major advantages. Why would you want to use it?
The only reason to support it would be if a video renderer use D3D12 and wants interoperability - eg. in Native mode.
There must be a benefit otherwise why would someone go to the trouble of programming it?
I'd be more interested in a DX12 "native" mode, to be completely honest.
maybe ask them.
there is even a lavfilter version with dx12 and a mpcVR that is DX12 if any of these are native is beyond me.
richardpl
15th May 2024, 17:43
@Nevcairiel
This SPEEX-audio file is played with distortion. Link for downloading:
https://dl.dropbox.com/scl/fi/596hxuba227ph8975q5s9/SR41.spx?rlkey=5vfv3nzs798cpeyaiuy8i89tc
I'm noticed that I have no such issue when playing it on my PC through VLC.
Any feedback would be appreciated.
FFmpeg is dead, use Librempeg where this have been fixed ages ago.
nevcairiel
16th May 2024, 00:22
There must be a benefit otherwise why would someone go to the trouble of programming it?
I'd be more interested in a DX12 "native" mode, to be completely honest.
I named a reason why someone might want it. There is just no demand for that in LAV.
Video decoding is ultimately just an API to access the video decoding hardware. There is no huge difference what you use - so what it comes down to is what something else uses that wants decoding. If that uses D3D12, then you use a D3D12 decoder. That's all.
Noone has made an actual D3D12 video renderer, or approached me about supporting it for that. This is not a user-relevant feature, but would only benefit another video renderer that wants to run in D3D12.
As for a video renderer - if all you do is use simple shaders and using D3D Video Processing, there is no benefit in D3D12 anyway, you only get a lot extra complexity for no benefit. Only once you start using much more complex shaders, compute shaders in particular, would there be any benefit, as D3D12 gives you access to the newer shader models.
Brazil2
16th May 2024, 09:02
FFmpeg is dead, use Librempeg where this have been fixed ages ago.
Where are Librempeg binaries downloads for Windows ?
Aleksoid1978
16th May 2024, 09:29
@Nevcairiel
This SPEEX-audio file is played with distortion. Link for downloading:
https://dl.dropbox.com/scl/fi/596hxuba227ph8975q5s9/SR41.spx?rlkey=5vfv3nzs798cpeyaiuy8i89tc
I'm noticed that I have no such issue when playing it on my PC through VLC.
Any feedback would be appreciated.
Perfect play with ffmpeg + https://github.com/xiph/speex.
richardpl
16th May 2024, 11:28
Where are Librempeg binaries downloads for Windows ?
Compile it!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.