View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
VictorLS
26th January 2021, 22:38
FFmpeg have decoder for Dolby-E.
Thanks - I hope you can prove that because MediaInfo in Sample Eurovision 2019 Tel Aviv.ts (https://yadi.sk/i/j1zj1sqy2myOfw) sees 4 audio tracks - third and fourth of them are DolbyE:
Audio #3
ID : 4144 (0x1030)-1
Menu ID : 1 (0x1)
Format : Dolby E
Format settings : Little
Muxing mode : SMPTE ST 302 / SMPTE ST 337
Codec ID : 6
Duration : 31 s 680 ms
Bit rate mode : Constant
Channel(s) : 6 channels
Channel layout : L C Ls X R LFE Rs X
Sampling rate : 48.0 kHz
Frame rate : 25.000 FPS (1920 SPF)
Bit depth : 20 bits
Delay relative to video : 39 ms
Title : ESC 2019
Audio #4
ID : 4144 (0x1030)-2
Menu ID : 1 (0x1)
Format : Dolby E
Format settings : Little
Muxing mode : SMPTE ST 302 / SMPTE ST 337
Codec ID : 6
Duration : 31 s 680 ms
Bit rate mode : Constant
Channel(s) : 2 channels
Channel layout : X X X L X X X R
Sampling rate : 48.0 kHz
Frame rate : 25.000 FPS (1920 SPF)
Bit depth : 20 bits
Delay relative to video : 39 ms
Title : Program 2
but ffmpeg lastest (less than half day since it was compiled so must include DolbyE parser) version n4.3.1-29-g89daac5fe2 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 9.3-win32 (GCC) 20200320 from https://github.com/BtbN/FFmpeg-Builds/releases shows (as much older versions of ffmpeg and LAV Splitter too) only three audio track - third (and last) of them is:
Stream #0:3[0x1030]: Audio: s302m (BSSD / 0x44535342), stereo, s32 (20 bit), 2304 kb/s so where's DolbyE stream with 6 audio channels (namely fourth audio stream)? Or MediaInfo shows wrong information and audio streams 3 and 4 are not DolbyE at all?
So main question is:
[s302m @ 0000000000486980] S302 non PCM mode with data type 28 not supported
Last message repeated 13 times
[mpegts @ 00000000005aa680] decoding for stream 3 failed
[mpegts @ 00000000005aa680] Could not find codec parameters for stream 3 (Audio: s302m (BSSD / 0x44535342), stereo, s32 (20 bit), 2304 kb/s): unspecified sample rate
PS. I'm not power user of ffmpeg so show correct and working command line to extract only DolbyE stream from Sample Eurovision 2019 Tel Aviv.ts, please.
richardpl
26th January 2021, 23:18
Here is decoder:
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/dolby_e.c;hb=HEAD
Note that DolbyE is muxed in various strange ways in different containers.
I'm not providing advanced ffmpeg usage for free, sorry.
jmone
26th January 2021, 23:43
jmone
That's better - thanks but I've asked about ffmpeg -benchmark... test with FX6_Sample.mp4 and (if hardware decoding not work with 50fps but due test with HEVC UHD HDR 10Bit 444 50fps.mov I'm sure Ampere can - may be Turing can't) FX6_Sample_25fps.mp4 - it was at http://forum.doom9.org/showthread.php?p=1934308#post1934308 ;)
ffmpeg: Yes HW acceleration (decode) works on both FX6_Sample_25fps.mp4 & HEVC UHD 10 Bit 4:4:4 50fps sample when adding "-hwaccel cuda"
I've added the info from the log to the previous one - https://behome.dyndns.info/index.php/s/yZwPLBD8zPoyRsY
VictorLS
27th January 2021, 05:24
richardpl
I see
jmone
Many thanks but add FX6_Sample.mp4 (which is 50fps as HEVC UHD HDR 10Bit 444 50fps.mov too) in same way, please.
jmone
27th January 2021, 06:06
Many thanks but add FX6_Sample.mp4 (which is 50fps as HEVC UHD HDR 10Bit 444 50fps.mov too) in same way, please.
Done - same thing - HW Accel works. Log file updated.
VictorLS
27th January 2021, 19:06
jmone
Thanks again - now I have two h265 4:4:4 4K test files: FX6_Sample_25fps.mp4 and FX6_Sample.mp4 for nVIDIA's Turing and Ampere videocards to test hardware acceleration with nVIDIA CUVID (now it's calling NVDEC) in LAV Video Decoder if nevcairiel will forget "CUVID is deprecated" (clsid, btw can you explain why shaders in your MPC-HC with MPC-VR worked in both pre-resize and post-resize while author of MPC-VR says shaders must work only in post-resize and that is so in MPC-BE and SmartDVB?)
huhn
27th January 2021, 19:42
you know they just repacked CUVID and named it NVDEC. but CUIVD which is still the same is deprecated...
i'm sure he forgot.
clsid
27th January 2021, 19:57
CUVID is not currently being developed further.
can you explain why shaders in your MPC-HC with MPC-VR worked in both pre-resize and post-resize while author of MPC-VR says shaders must work only in post-resize and that is so in MPC-BE and SmartDVB?
The answer is written literally as a note on the Shaders page in MPC-HC settings. Pre-resize is done as post-resize when using MPCVR.
jmone
27th January 2021, 21:22
NVDEC is not going anywhere from nvidia's perspective (or all the apps that use it). Who knows if they ever add it 4:4:4 to D3D11 however.
It's up to nev regarding what to do with NVDEC support in LAV, and while "CUVID is not currently being developed further" is certianly his latest post, it was not that long ago that:
I've been thinking about replacing CUVID with NVDEC in LAV, with built-in deinterlacing and either copy-back like today or interop with D3D11, so that it could be efficient like D3D11 native, just with deinterlacing, and potential 12-bit and maybe 4:4:4 support (the latter would likely need renderer support first)
I for one would certainly support this.
jmone
27th January 2021, 21:40
I for one would certainly support this.
I know that HW acceleration for UHD HDR HEVC 10-BIT 4:4:4 support is a pretty niche requirement, but it looks like it would be the best format for rendering out my "master" FX6 footage ... so I'm happy to "put my money where my mouth is", that is....
...if Nevcairiel is open to a bounty for this to be supported in LAV, I'll pledge US$250.
VictorLS
27th January 2021, 22:58
CUVID is not currently being developed further
By nVIDIA or by nevcairiel himself?
The answer is written literally as a note on the Shaders page in MPC-HC settings. Pre-resize is done as post-resize when using MPCVR.
Thanks.
clsid
28th January 2021, 01:08
The implementation in LAV.
jmone
28th January 2021, 04:53
Oh well. The other idea of upgrading my HTPC from a i5-7600k to a i7-7000 to get more cores did not help for using SW decoding on 500mbit AVC-I UHD 10-Bit 4:2:2 PQ @ 50fps. Still can't keep the Render Queues full with all 8 threads running at 4ghz (and they all peak over 90%). My OC I9-9900KF running at 4.9ghz can do it (all 16 threads are at about 50%), but it turns it into a space heater. Also, the idea of pushing 500Mbit content over the LAN smells like it is asking for trouble anyway. I could also use a 150mbit AVC LGOP UHD 10-Bit 4:2:2 PQ Profile but that is even more taxing than all I .... and my I9-9900-KF will still drop the odd frame.
So I really am going to need 4:4:4 HEVC HW acceleration or much more powerful (maybe AMD) HTPCs if I want to keep anything better than 4:2:0 for playback.
VictorLS
28th January 2021, 05:47
jmone
Hardware acceleration is great (but not universal) thing - even my weakest possible nVIDIA GTX750v2 on GM206 1 GB videomemory easily plays without drop and video&audio synced my powerful processor test file Men.in.Black.1997.2160p.WEB-DL.mkv (2,3 GB) https://yadi.sk/i/I8FFU8PdzNRpt - you can try play it with and without hardware acceleration with every your processors.
jmone
28th January 2021, 07:54
No Need. My existing CPU/GPU combinations (with madVR tuning) has no issues with commercially available content that I buy (up to and including the two UHD HDR HFR HEVC titles - Billy Lynn, and Gemini Man - both of which are 4:2:0). What we are now exploring is taking UHD HDR HFR decoding from 4:2:0 to 4:2:2 or 4:4:4.
- 4:2:2 = There is no GPU HW acceleration option for 4:2:2 in any codec on any consumer GPU. It can be done in SW, but needs one of the latest gen powerful CPU to be done in real time, and even then it consumes a lot of power (and that is for AVC all I).
- 4:4:4 = This can be done by GPU acceleration for HEVC (not in AVC or AV1 etc) and has been supported for the last two nvidia GPU generations. It can not be done in SW even with a modern powerful CPU (well at least not even close with my i9-9900KF for HEVC 4:4:4 HDR HFR UHD samples).
VictorLS
28th January 2021, 09:24
jmone
I agree with all you've written in last post but very interesting to get results of MenInBlack (it's not commercially) test (with average CPU load) namely on your three processors without hardware acceleration. I guess "OC I9-9900KF running at 4.9ghz" can fluent play with ~40% load of each physical/logical core, may be i7-7000 with ~80% load but i5-7600k with 100% will can't fluent and video/audio synced play.
jmone
28th January 2021, 10:07
Victor, I'm not going to download a pirated copy and you should remove the link. I am happy to test on any of the over 1,000 movies (of which 250 are UHD BDs) I have purchased ... & I don't really see the point of this in the LAV thread.
jmone
28th January 2021, 10:40
Victor, Thank you for removing the link.
For your interest, here is a screen shot of play Gemini Man (BD UHD 59.94fps HDR 4:2:0) using just SW decoding on my i9-9900KF. I had to increase my queue sizes in madVR to stop the occasional dropped frame when the CPU spiked to 100%. I have no idea why anyone would want to use SW decoding when you could use HW acceleration. The only difference was I generated a lot of heat and fan noise.
https://behome.dyndns.info/index.php/s/xPjsaw3nXQG4Ws5
VictorLS
28th January 2021, 10:42
Victor, I'm not going to download a pirated copy
I see now and respect your point of view like "for all in our lives must be paid" and you'd be right if Men.in.Black.1997.2160p.WEB-DL.mkv is full movie - but it's just 1min33s (so about 200 Mbit/s) fragment for testing purpose only ;)
VictorLS
28th January 2021, 10:54
Victor, Thank you for removing the link.
I'll not going to remove link (see above)
I have no idea why anyone would want to use SW decoding when you could use HW acceleration
My videocard can but there's many people with old but powerful enough processors with old integrated videocard can't accelerate h265 at all ;)
For your interest, here is a screen shot of play Gemini Man (BD UHD 59.94fps HDR 4:2:0) using just SW decoding on my i9-9900KF. I had to increase my queue sizes in madVR
Thanks for test and screenshot. Which value of "queue sizes" was and present in madVR now?
jmone
28th January 2021, 11:03
... Men.in.Black.1997.2160p.WEB-DL.mkv (2,3 GB) ...
Must be my mistake from reading the file size.
File information
Name:Men.in.Black.1997.2160p.WEB-DL.mkv
Owner:victorls
Size:2.31 GB
Modified:01/18/2017 2:07 am
Image date:11/18/2016 9:14 am
Views:201
Downloaded:446 times
Edit - I can confirm this link is just a sample.
jmone
28th January 2021, 11:11
...Testing CPU Decoding performance on various GPU does make sense.... but I don't think it is a LAV topic. FWIW, a 23.976fps UHD HDR BD consumes just 30-35% on my i9-9900KF but it still runs at 4.9ghz.
I'll not be posting other results unless it is directly related to LAV in this thread.
VictorLS
28th January 2021, 12:01
...Testing CPU Decoding performance on various GPU does make sense.... but I don't think it is a LAV topic. FWIW, a 23.976fps UHD HDR BD consumes just 30-35% on my i9-9900KF but it still runs at 4.9ghz.
So my presumption near right ;)
It's a pity you haven't answered about "queue sizes" in madVR but it's interesting if you revert it to defaut (what namely?) value.
Btw I don't know on what TV/monitor do you watching at but did you something to watch 23.976fps films absolutely fluently from RTX3090 or/and from video (internal?) i5-7600k/i7-7000 in your HTPC? I use 23,976*2=47,952Hz output from videocard (23,976 isn't supported by my 24" PVA monitor) and have few number of stutters video which easily corrected with backward 5 seconds in KMPlayer - I know ReClock but don't like use it.
I'll not be posting other results unless it is directly related to LAV in this thread.
It's a pity again but you're right on my own.
VictorLS
28th January 2021, 18:10
Which value of "queue sizes" was and present in madVR now?
My general setting of madVR (I'm sure it's default settings)
https://i.postimg.cc/5QV7vhFt/mad-VR-general-settings.png (https://postimg.cc/5QV7vhFt)
what's yours to achieve ideal fluent video?
I guess you can't upload ~minute not recoded sample from Gemini Man (BD UHD 59.94fps HDR 4:2:0) where CPU load is near to maximum but if you can upload the sample, please.
jmone
28th January 2021, 20:40
Victor - here is the madVR thread for these questions - https://forum.doom9.org/showthread.php?t=146228
VictorLS
28th January 2021, 21:04
Victor - here is the madVR thread for these questions - https://forum.doom9.org/showthread.php?t=146228
I know but there wasn't there your increased queue sizes of madVR for Gemini Man (BD UHD 59.94fps HDR 4:2:0) in that thread that's why I asked here several times ;)
I've just watched Gemini Man VP9 4K (notHDR - my GTX750v2 can't hardware acceleration of VP9.2 HDR) from https://www.youtube.com/watch?v=vX2vsvdq8nw - very impressive quality...
jmone
29th January 2021, 00:57
I've replied in the madVR thread.
vanden
7th February 2021, 11:43
Hello,
I have a BUG with Windows 10 Enterprise 1903 1909 2004 20H2 ...
All other version (from 1809) works normally.
HP DL580G5 PC (4 x Xeon X7460) 32Go Ram and GFX 650 Ti.
Testing an UltraHD Blu-ray with Windows 10 Enterprise 1809:
MPC LAV 0.74.1.75 + MadVR + madVRhdrMeasure122:
http://vandenk.free.fr/1809-mpc.jpg
PotPlayer LAV 0.74.1.92 + MadVR + madVRhdrMeasure122:
http://vandenk.free.fr/1809-pot.jpg
Test with Windows 10 Windows 10 Enterprise 20H2:
MPC LAV 0.74.1.75 + MadVR:
http://vandenk.free.fr/20h2-mpc.jpg
PotPlayer LAV 0.74.1.92 + MadVR madVRhdrMeasure122:
http://vandenk.free.fr/20h2-pot.jpg
I repeated the MPC test with madVRhdrMeasure122: same result, it's weird the "decoder queue" remains full but the others are empty ...
Ditto with Windows 10 Enterprise 1903 1909 2004…
Is there a way to change the CPU management for Windows 10 Enterprise 1903 1909 2004 20H2 ?
I know the problem is not LAV but maybe someone has a solution ?
VictorLS
7th February 2021, 16:19
vanden
One game player I know with some Core i5+GTX1600 had problem (I don't know what namely) when he was playing games in Win10x64 1909 - he tried many things but problem was solved just when he's installed old Win10x64 (namely 1809 if I don't mistake).
el Filou
7th February 2021, 18:03
If you right-click on a process in Task Manager you can Set affinity.
This is really strange, it looks like it's using only sockets 3 & 4 with the 3rd one heavily loaded.problem was solved just when he's installed old Win10x64 (namely 1809 if I don't mistake).That's not a long-term solution obviously, 1809 is out of support in 3 months.
huhn
7th February 2021, 20:07
this looks like an upload issue.
try bilinear scaling instead of DXVA for a quick test.
vanden
7th February 2021, 20:42
If you right-click on a process in Task Manager you can Set affinity.
This is really strange, it looks like it's using only sockets 3 & 4 with the 3rd one heavily loaded.That's not a long-term solution obviously, 1809 is out of support in 3 months.
I have already checked this problem on Windows 10 1903 1909 2004 20H2 ... They are all ticked:
http://vandenk.free.fr/20h2-1-2.jpg
I also tested in LAV "Threads for Multi-Threading" @ 24 and also @ 32 ... it's not better.
I only use the CPU to decode 3840x2160 H265 10 bit
clsid
7th February 2021, 21:52
Don't use maximum CPU queue size in madVR. That only creates problems and solves absolutely nothing. Just use a more sane value like 32.
You may fix (part of) your performance regression by disabling the Spectre/Meltdown mitigations for your Intel CPUs.
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 3 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
vanden
8th February 2021, 00:14
Don't use maximum CPU queue size in madVR. That only creates problems and solves absolutely nothing. Just use a more sane value like 32.
You may fix (part of) your performance regression by disabling the Spectre/Meltdown mitigations for your Intel CPUs.
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 3 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
Thank you,
But unfortunately it doesn't work, I put 32 in MadVR and apply on the registry :
http://vandenk.free.fr/Registre.jpg
After reboot always the same (Windows 10 20H2) :
http://vandenk.free.fr/32-20h2.jpg
It still works fine in Windows 10 1809 :
http://vandenk.free.fr/32-1809.jpg
There really is a problem with CPUs management ...
VictorLS
8th February 2021, 17:36
try bilinear scaling instead of DXVA for a quick test
vanden, for a quick test I propose to set ordinary EVR (and MPC-VR http://forum.doom9.org/showthread.php?p=1931091#post1931091 ) instead of madVR in MPC-HC
vanden
8th February 2021, 23:30
thank you,
I am not testing MPC-VR, because it does not work well in Win10 1809 ... "Frames skipped" in DX11 and DX9, with hdr or not and whatever the algorithm to resize them :
http://vandenk.free.fr/1809-MPC-VR.jpg
I tested EVR in bilinear algorithm:
http://vandenk.free.fr/Evr.jpg
On 1809 it works well :
http://vandenk.free.fr/1809-EVR-Bill-FSdirec3d.jpg
On 20H2 it works as well :
http://vandenk.free.fr/20h2-EVR-Bill-FSdirec3d.jpg
CPU management is different but it plays the same videos !
I tested some video that does not play in Windows 10 1809 (too much CPU) and it hangs in the same place with Windows 10 20H2 !
On the other hand no solution for MadVR (Without HDR and in bilinear) : it does not work ...
clsid
9th February 2021, 02:18
You keep talking about CPU utilization. That doesn't seem to be the problem. madVR uses your GPU for almost everything it does. And even with EVR your screenshot shows significantly higher GPU usage on 20H2 vs 1809. In fact so high already that it is logical that you have issues with madvr.
So you need to figure out why GPU usage is so much higher. Turn off unnecessary Windows features such as the Game Bar, and also stuff like NVIDIA Shadowplay.
And be aware that your GPU is quite old to begin with, so not very powerful. You should consider getting something more modern. It is not really good enough for 4k play with madvr.
huhn
9th February 2021, 05:03
my idea about madVR without anything DXVA2 related comes from from the rendertiesm for DXVA and that it seem the CPU get's stressed by the upload. if it isn't uploaded to DXVA madVR may behaviours differently.
EVT "always" uses DXVA2.
so i need a screen to see what changes to get an idea.
BTW. can you add a folder to the madVR installation called "showrendersteps" before you make the screen?
still far fetched but the best i can come up with.
VictorLS
9th February 2021, 08:38
thank you
You're welcome but you were inattentive when I've written
ordinary EVR
I meant NOT Enhanced Video Renderer (custom presenter) as on your screenshot but just Enhanced Video Renderer - many (not only mine) experiments prove ordinary EVR is lightest known renderer (even in WinXP it works well enough - almost as lightest in WinXP VMR7windowed) but it can't process or passthrough HDR to display but I've proposed just for experiment (also with files not played fluently on other renderers) to see CPU(GPU) load.
Btw your experiment with EVR-CP well too.
I am not testing MPC-VR, because it does not work well in Win10 1809 ... "Frames skipped" in DX11 and DX9, with hdr or not and whatever the algorithm to resize them :
http://vandenk.free.fr/1809-MPC-VR.jpg
It's strange - even my weakest present but can Variable Length Decoding (VLD) H265 4K 10bit 4:2:0 videocard nVIDIA GTX750v2 1 GB (~100$ before first Pascal out) with MPC-VR in Win7x64 (I plan install Win10 20H2 on my new 512GB Crucial MX500 SSD in some weeks) works almost same (I mean low resources consumption watched in OpenHardwareMonitor's gadget) well as ordinary EVR.
Aleksoid1978
9th February 2021, 08:55
thank you,
I am not testing MPC-VR, because it does not work well in Win10 1809 ... "Frames skipped" in DX11 and DX9, with hdr or not and whatever the algorithm to resize them :
http://vandenk.free.fr/1809-MPC-VR.jpg
I tested EVR in bilinear algorithm:
http://vandenk.free.fr/Evr.jpg
On 1809 it works well :
http://vandenk.free.fr/1809-EVR-Bill-FSdirec3d.jpg
On 20H2 it works as well :
http://vandenk.free.fr/20h2-EVR-Bill-FSdirec3d.jpg
CPU management is different but it plays the same videos !
I tested some video that does not play in Windows 10 1809 (too much CPU) and it hangs in the same place with Windows 10 20H2 !
On the other hand no solution for MadVR (Without HDR and in bilinear) : it does not work ...
In EVR/EVR-CP used NV12, MPC-VR use P010 + shaders for color conversion, it's heavier format.
el Filou
9th February 2021, 15:48
How much VRAM does that 650 Ti have? IIRC there were models with 1 or 2 GB. Even 2 GB is short for madVR with 4K.
clsid's right, there's some problem with the GPU, maybe some driver setting or too old driver.
If using HDR passthrough and a light chroma upsampling algo and short render/present queues, it probably should still be OK with madVR even with 4K IMO.
clsid
9th February 2021, 18:08
Another difference in the screenshot is refreshrate: 71Hz vs 85Hz
Lower the refreshrate so the GPU has to do less work. 71Hz is also smoother for video playback.
madvr settings to adjust:
gpu queue size = 4
frames to present in advance = 1
nvidia settings:
Disable GSync
Enable VSync
Power management mode = Adaptive (or Normal in latest drivers)
Siso
9th February 2021, 20:23
Regarding the v-sync in nvidia control panel, is it required to be enabled for pascal cards too?
el Filou
9th February 2021, 20:57
One time I forced VSync by mistake in NVIDIA Control Panel on my 1050 and madVR rendering times skyrocketed and it started to stutter like crazy so I don't think you can use the same settings that are recommended for Turing & Ampere with older cards.
Siso
9th February 2021, 21:00
One time I forced VSync by mistake in NVIDIA Control Panel on my 1050 and madVR rendering times skyrocketed and it started to stutter like crazy so I don't think you can use the same settings that are recommended for Turing & Ampere with older cards.
I see, and you have the same card as mine. :D
Asmodian
10th February 2021, 08:33
Personally, I wouldn't enable v-sync on Turing or Ampere either. Is there a situation where it helps?
Disabling G-sync is a good idea though, at least for the player.
Siso
10th February 2021, 10:39
I tried enabling and disabling v-sync on my machine, and it didn't make a difference. :D
mzso
17th February 2021, 20:15
Hello!
Which HW acceleration option is supposed to be the fastest? Is it in the order of the drop-down list? I would expect native DXVA in front of copy-back.
Is there a way to conveniently compare the performance of decoding options? Particularly HW vs SW.
chros
17th February 2021, 21:05
d3d11-native is the fastest (https://forum.doom9.org/showthread.php?t=176642).
mzso
18th February 2021, 16:54
d3d11-native is the fastest (https://forum.doom9.org/showthread.php?t=176642).
Thanks.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.