View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
clsid
2nd September 2018, 18:04
You can set a source filter as preferred with this registry key:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Media Type\Extensions\.ts]
"Source Filter"="{B98D13E7-55DB-4385-A33D-09FD1BA26338}"
Value in above example is for LAV Splitter Source.
mzso
2nd September 2018, 18:05
You can set a source filter as preferred with this registry key:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Media Type\Extensions\.ts]
"Source Filter"="{B98D13E7-55DB-4385-A33D-09FD1BA26338}"
Value in above example is for LAV Splitter Source.
Well, I set it as preferred internally in MPC, but didn't help.
clsid
2nd September 2018, 18:21
That usually doesn't work as expected for source filters because the above overrides the merit system.
mzso
2nd September 2018, 18:32
That usually doesn't work as expected for source filters because the above overrides the merit system.
Well, the internal LAV filter is loaded instead of what I have set so I'm not so sure this is the case.
Anyways, making the change to the registry key doesn't seem to change anything.
clsid
2nd September 2018, 18:55
Can you upload the SmartDVB filter somewhere?
mkver
2nd September 2018, 19:00
I have now downloaded and tested SmartDVB64 myself:
1. If I open the file via Open Media File, all of your files play well regardless of whether I use LAV or Microsoft's splitter/decoder. Even the MS splitter+LAV decoder is good.
2. If I use LAV's decoder and play via "Play Transport Stream DVB file", SmartDVB uses its own source filter and I get stutters with your two sports video, but not with the National Geographic documentary.
3. If I remux the bicycle race file so that each of the fields is in its own PES packet (with own timestamps), the additional stutters that one saw in 2. are gone. Here (https://www.dropbox.com/s/if2fk4i5r2oepqj/tdf2.ts?dl=0) is the file. Note: The procedure I used to create said file unfortunately also increased the pts to dts offset a bit, but I don't think that this is important.
4. I also tested LAV 0.69 (that's before LAV decoder decided to not parse when connected to LAV filters) and it doesn't differ from more recent versions.
The differing behaviour of 2. and 3. confirms my suspicion that it is a result of there being two fields with only one timestamp.
I don't know why the National Geographic file seems to work; it could be because ffmpeg is able to guess the pts of the second field. Or it could be that we don't see the stutters because the video content is actually progressive. Or it could be because the National Geographic file uses only two reorder frames, whereas the bicycle race file uses three. I don't know. Hopefully SmartDVB's developers can find out more.
mzso
2nd September 2018, 19:32
I have now downloaded and tested SmartDVB64 myself:
1. If I open the file via Open Media File, all of your files play well regardless of whether I use LAV or Microsoft's splitter/decoder. Even the MS splitter+LAV decoder is good.
2. If I use LAV's decoder and play via "Play Transport Stream DVB file", SmartDVB uses its own source filter and I get stutters with your two sports video, but not with the National Geographic documentary.
3. If I remux the bicycle race file so that each of the fields is in its own PES packet (with own timestamps), the additional stutters that one saw in 2. are gone. Here (https://www.dropbox.com/s/if2fk4i5r2oepqj/tdf2.ts?dl=0) is the file. Note: The procedure I used to create said file unfortunately also increased the pts to dts offset a bit, but I don't think that this is important.
4. I also tested LAV 0.69 (that's before LAV decoder decided to not parse when connected to LAV filters) and it doesn't differ from more recent versions.
The differing behaviour of 2. and 3. confirms my suspicion that it is a result of there being two fields with only one timestamp.
I don't know why the National Geographic file seems to work; it could be because ffmpeg is able to guess the pts of the second field. Or it could be that we don't see the stutters because the video content is actually progressive. Or it could be because the National Geographic file uses only two reorder frames, whereas the bicycle race file uses three. I don't know. Hopefully SmartDVB's developers can find out more.
Hi!
Thanks for the info. Indeed the Open Media File doesn't use the same filter chain. When viewing tv channels LAV cannot be used.
The big question is, why does the issue only present itself when I use LAV for deinterlacing. When using a different decoder, or turn off deinterlacing (and use madVR, EVR deinterlacing) the issue doesn't present itself. It might be a LAV bug yet.
mzso
2nd September 2018, 19:35
Can you upload the SmartDVB filter somewhere?
Here's the filters folder (Most recent version):
https://drive.google.com/open?id=1gFZrQQ6Ezy4Fqn4yXua8Zc2_2oslNLgE
VictorLS
2nd September 2018, 22:09
About https://forum.doom9.org/showpost.php?p=1846579&postcount=22960 and from https://forum.doom9.org/showpost.php?p=1847019&postcount=22982 to https://forum.doom9.org/showpost.php?p=1847554&postcount=23011
I've spent evening to get positive result of playing Zee TV20180716-203544.ts in Win7x64 with MPC-HC and app SmartDVB https://www.videohelp.com/download/AviSynth_260.exe and https://www.videohelp.com/download/ffdshow_rev4533_20140929_clsid.exe and yadif17.zip in the bottom of https://avisynth.org.ru/yadif/yadif.html
Unpack yadif.dll at root of disk C. In LAV Video Decoder set Deinterlacing mode Disabled (Progressive)
add in SmartDVB's Connection, Video Process (or in External filters of MPC-HC) ffdshow raw video filter
with my Avisynth script there:
LoadCPlugin("C:\yadif.dll")
ffdShow_source()
AssumeFieldBased()
Weave()
Yadif(mode=3,opt=3,order=-1)
PS. For ТНТ HD20180722-203510.ts I had to use None hardware acceleration instead of NVIDIA CUVID to get sync audio and video.
PPS. Bad thing is not automatic switching between ordinary and half vertical sized files - that's why I wanted to LAV Video Decoder could process such streams.
Plutotype
7th September 2018, 07:50
Hi folks,
Just wondering, is it possible to support HDR10plus content or its the same situation as with Dolby Vision on a LAV/MADVR based HTPC? I mean passing through the dynamic HDR metadata to HDMI and display.
Thanks
mclingo
7th September 2018, 10:20
Not sure it makes sense to put any work into this right now, HDR is still in flux, probably better to wait a couple of years to see which versions win out before spending time coding for this.
Megalith
10th September 2018, 22:28
Is there any real point to hardware acceleration if you already have a powerful CPU and GPU?
I've been dealing with an issue in which my CPU/motherboard will make "chirping" noises during playback of 4K video. Turning off video acceleration and stressing the CPU seems to make it go away.
LigH
10th September 2018, 22:38
Hardware accelerated decoding (which mainly means, letting the GPU help at least partially in the decoding) is less important if your CPU alone is powerful enough for software-only decoding, but it can make a difference if your CPU alone is a bit late in cases of complex and high-resolution video. If your GPU supports (at least partial) decoding of this specific video format.
Chirping noise is already a known issue. You could search for it.
nevcairiel
12th September 2018, 15:18
LAV Filters 0.72.0-12 and newer have experimental support for AV1 decoding using libaom - software only, of course.
https://files.1f0.de/lavf/nightly/LAVFilters-0.72.0-12.exe
It is planned to replace the libaom decoder with a ffmpeg built-in decoder once that becomes available, hopefully later this year.
clsid
12th September 2018, 16:28
Awesome.
nevcairiel
12th September 2018, 16:30
That build above is fully automated from latest Git, so my "nightly" build managed just fine with the included build scripts. Must be something weird on your end. -lpthread should actually be coming automatically through the aom.pc file anyway.
RealSnoopyDog
13th September 2018, 00:22
This one also sounds interesting:
Add preliminary support for passing Closed Caption data to a renderer
mzso
13th September 2018, 14:27
LAV Filters 0.72.0-12 and newer have experimental support for AV1 decoding using libaom - software only, of course.
https://files.1f0.de/lavf/nightly/LAVFilters-0.72.0-12.exe
It is planned to replace the libaom decoder with a ffmpeg built-in decoder once that becomes available, hopefully later this year.
It get a crash when trying to play mkv's produced by youtube-dl/ffmpeg. Maybe it's not standardized yet, but crashing is a little harsh.
The extension is automatically chosen. Not sure why, maybe ffmpeg can't mux AV1 into webm yet? Which is odd since it can mux it into mkv.
(And it never could mux the opus audio into mp4, so that's bypassed.)
nevcairiel
13th September 2018, 18:41
I just tried that, and no crashes.
youtube-dl -f 399+bestaudio https://www.youtube.com/watch?v=k2qgadSvNyU
Output file works fine for me.
mzso
13th September 2018, 20:03
I just tried that, and no crashes.
youtube-dl -f 399+bestaudio https://www.youtube.com/watch?v=k2qgadSvNyU
Output file works fine for me.
Doesn't seem as straightforward as it first did. It doesn't always crash, bat apparently always if I try to play after a fresh start of the player.
I only get this message:
https://abload.de/img/av1-crash6edkd.png
So I have no clue how to verify if the crash in fact happens within LAV.
clsid
14th September 2018, 13:46
The closed caption change causes MPC-HC to freeze when opening a DVD.
clsid
16th September 2018, 19:19
This FFmpeg commit causes crashes:
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=662558f985f50834eebe82d6b6854c66f33ab320
Sample file can be found here:
https://github.com/clsid2/mpc-hc/issues/21
mkver
16th September 2018, 20:55
There is already a discussion about this on the mailing list (https://ffmpeg.org/pipermail/ffmpeg-devel/2018-September/234187.html).
lvqcl
16th September 2018, 21:05
And even firefox is (was?) affected: https://bugzilla.mozilla.org/show_bug.cgi?id=1486080
nevcairiel
16th September 2018, 22:33
Should be resolved for the next nightly.
Prinz
17th September 2018, 01:07
I have a question about the Advanced Track Selection, i set to:
Audio: eng,ger
Subtitle: eng:eng|f;ger:ger|f;*:off
After using a Header Editor to fix the incorrect und marked audio track to eng and making sure the forced sub track is correctly set, the subtitle was not selected.
After some time i discovered that the file ad Tags in them and this is probably the reason didn't work since the tag says also und as audio language.
<Targets>
<TrackUID>1</TrackUID>
<TargetTypeValue>50</TargetTypeValue>
<TargetType>MOVIE</TargetType>
</Targets>
<Simple>
<Name>CREATION_TIME</Name>
<String>2018-09-05 17:15:26</String>
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
<Simple>
<Name>LANGUAGE</Name>
<String>und</String>
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
Is this the way it suppose to work? Prioritize the Tags over the set language in the header.
clsid
17th September 2018, 18:49
I think I found a bug in FFmpeg.
In libavformat/mov.c function mov_seek_stream
timestamp -= (sc->min_corrected_pts + sc->dts_shift);Seems wrong to me. Because for index entries min_corrected_pts is already subtracted in function mov_fix_index. dts_shift is also already added to min_corrected_pts.
I have a MP4 where seeking to keyframe was slow because of wrong timestamp value. Removing the above line fixes that.
nevcairiel
17th September 2018, 20:16
mov_fix_index is not used by LAV, and that line isn't new in the latest build. So that doesn't seem right to me. Please provide a file that seeks slower then it used to.
clsid
17th September 2018, 20:37
It isn't a recent bug, but already before 0.72. Will PM a link.
Megalith
21st September 2018, 01:59
Anyone ever run into an issue in which a bitstreamed track turned into a high-frequency, garbled mess of noise? I am getting that in my rip of "Den of Thieves," in exactly the same position, every time. I'm going to assume it's an issue with the DTS-HD MA track, as none of my other movies have the same problem, but it does play back fine if I have LAV decode it to PCM, and no error messages popped up during muxing...
el Filou
22nd September 2018, 11:44
Does that also happen when you play the original M2TS directly ?
If yes then it may be a compatibility issue of your AVR's decoder with that particular track.
vosya
23rd September 2018, 08:14
Should be resolved for the next nightly.
Did I understand correctly that this was related to: "The closed caption change causes MPC-HC to freeze when opening a DVD."? Because LAVFilters-0.72.0-13 the problem of hanging playing dvd did not solve for me.
lvqcl
23rd September 2018, 13:55
No, it was related to "This FFmpeg commit causes crashes" message.
Use MPC-HC 1.8.2 with its internal LAV Filters, it should fix the problem.
vosya
24th September 2018, 10:00
Use MPC-HC 1.8.2 with its internal LAV Filters, it should fix the problem.
I am absolutely satisfied with the PotPlayer, using the external LAVFilters-0.72.0-3.
rack04
25th September 2018, 00:20
MPC-BE freezes when trying to play DVD mounted as ISO using LAVFilters-0.72.0-12 and LAVFilters-0.72.0-13. Works fine with LAVFilters-0.72.0-3. I'm using MPC-BE.1.5.2.3968.x64 and madVR v0.92.16.
rack04
25th September 2018, 04:10
MPC-BE freezes when trying to play DVD mounted as ISO using LAVFilters-0.72.0-12 and LAVFilters-0.72.0-13. Works fine with LAVFilters-0.72.0-3. I'm using MPC-BE.1.5.2.3968.x64 and madVR v0.92.16.
Fixed in LAVFilters-0.72.0-15.
rolandha
26th September 2018, 16:40
I tried to build LAVfilter on Windows with Visual Studio 2015, using the instructions provided. Unfortunately this was not possible as they are incomplete.
In your script you are using Vswhere. Any documentation or reference about that is missing. Vswhere can be downloaded from
https://github.com/Microsoft/vswhere and need to be placed in a specific folder "C:\Program Files (x86)\Microsoft Visual Studio\Installer" as the script uses an absolute path.
nevcairiel
26th September 2018, 17:58
In your script you are using Vswhere. Any documentation or reference about that is missing. Vswhere can be downloaded from
https://github.com/Microsoft/vswhere and need to be placed in a specific folder "C:\Program Files (x86)\Microsoft Visual Studio\Installer" as the script uses an absolute path.
vswhere is part of VS2017, which is really the requirement now.
But using that script is not needed anyway, its just convenience. You can just run the shell scripts and then compile the solution yourself.
mytbyte
2nd October 2018, 13:23
Anyone have trouble with both LAV 0.72 and LAV 0.72-15 Nightly and 4K content? it detects my my GTX 960 in D3D11 drop down menu but CPU does all the decoding (HW decoding for 4K is checked). It goes for both D3D11 and DXVA2 Native, but 1080 content does activate hw decoding. MPC-HC's internal LAV decoder 0.70-2.1-git does hw accelerate 4K.
P.S. the problem seems to be limited to 4K HFR (60 fps) content. I am using MadVR but even EVR doesn't run it at 60 fps and it's choppy
mclingo
2nd October 2018, 13:33
no issues here on AMD RX 580 on either version. Driver 18.9.3.
Do you have it set to NATIVE or have you chosen your card from the drop down with D3D11, it should be set to NATIVE as far as i'm aware.
clsid
2nd October 2018, 14:44
Can you also export the metadata "comment" value from FFmpeg (as description) for embedded cover art? Then I can use that in MPC-HC to choose the best cover.
sneaker_ger
2nd October 2018, 14:52
Anyone have trouble with both LAV 0.72 and LAV 0.72-15 Nightly and 4K content? it detects my my GTX 960 in D3D11 drop down menu but CPU does all the decoding (HW decoding for 4K is checked). It goes for both D3D11 and DXVA2 Native, but 1080 content does activate hw decoding. MPC-HC's internal LAV decoder 0.70-2.1-git does hw accelerate 4K.
P.S. the problem seems to be limited to 4K HFR (60 fps) content. I am using MadVR but even EVR doesn't run it at 60 fps and it's choppy
What does LAV Video state as "Active Decoder" during playback? Is EVR+DXVA2 native fluid? Codec is HEVC 10 bit main10 profile 4:2:0 or something else (copy&paste MediaInfo here)?
mytbyte
2nd October 2018, 15:56
@mclingo:
It's set to Automatic (Native)
@sneaker_ger: it states "avcodec". Codec is as you describe. My other very lowly computer (core2Quad) is very happy to play it smoothly via GT 1030, drivers are the latest Nvidia 411.70, though not sure about the LAV version, can't get to that comp right now)
mclingo
2nd October 2018, 16:01
thats unusual then, unless you've done what i've done once or twice, installed LAV and a player and then not set LAVs as external filters in the player so you are essentially still using the internal player LAV settings.
mytbyte
3rd October 2018, 13:13
Lo and behold, I just reverted LAV filters to 0.71 and now it's as it should be (DXVA2 and DXVA11 accel taking place for all 4K content, the problem was not just HFR as I first thought)...so there is something wrong with 0.72, at least on my system.
nevcairiel
3rd October 2018, 17:37
Nothing in hardware decoding really changed since 0.71. It makes no sense to me how it would work on one system and not another, and on one resolution and not another. Smells like something on your system to me.
mytbyte
3rd October 2018, 18:20
Nothing in hardware decoding really changed since 0.71. It makes no sense to me how it would work on one system and not another, and on one resolution and not another. Smells like something on your system to me.
Could be my system (can't imagine what) but why does it work then with the previous version? I changed nothing else, just removed the 0.72 and installed 0.71.
huhn
4th October 2018, 06:42
can you be a more precise so i can try to reproduce the problem with a sample file or something like that?
mytbyte
4th October 2018, 10:22
can you be a more precise so i can try to reproduce the problem with a sample file or something like that?
I'm using Win 10 updated to 1809, MPC-HC 1.7.13 and latest Nvidia drivers 411.70 (Please note that the same happened before Win update and with older Nvidia drivers 398.xx). There is no hardware decoding in 0.72 with either D3D11 or DXVA2 setting (there is no DXVA2 or D3D11 indication in OSD (Ctrl-J).
However the LAV version that comes internal with MPC-HC does work albeit it doesn't support D3D11 option yet, but with DXVA2 works, as does LAV 0.71.
Sample files can be any 4K content, but specifically B.l.y L.nn which is HFR and is obviously too much for the CPU decoding (AMD FX-8320 slightly o.c. to 3.8 Ghz) even with EVR (50-56 fps wen it needs to be 60).
:thanks:
clsid
4th October 2018, 14:21
Try MPC-HC 1.8.2
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.