View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
ThurstonX
10th October 2015, 22:58
I know this is a tad off-topic, but since I keep reading about upmixing, and specifically 2.0 --> 5.1, I figured I'd chime in. I've got some old encodes that have pretty bad 2.0 audio, at least it sounds bad when using CS II or other types of virtual surround my old Kenwood AVR offers. It mostly seems Center-loaded, and dialog can get buried in the mix, esp. noisy environments like a train or outdoor crowd scenes. I hadn't used AC3filter in quite some time (I had v. 1.6 in a folder somewhere!), but did some reading on the app's page, and realized it could probably do what I want it to: create a 6-channel AC3 file that can go out my M-Audio card's S/P-DIF (coax), and which the Kenwood could then deocde.
et voila! Even my wife approves ;-)
All I did was install AC3filter, add it as an external filter in MPC-HC, move it to the top (I have LAV set externally), and Prefer it. Well, and setting the filter to use SPDIF and do encoding at 640.
Hope that helps.
cengizhan
11th October 2015, 17:08
Reasoning?
Audio delay without hotkey is an oxymoron.
To put in perspective:
My player does player related hotkey stuff.
Renderer (madVR) does renderer related hotkey stuff.
i can't believe people are demanding ridiculous and stupid things. :scared:
and when they are refused they become angry. why should a decoder have a hotkey? :angry:
ask from player's develeoper.
ibius
13th October 2015, 00:08
Hi Nev,
I've had some issues with LAV splitter giving me wrong/shorter duration on a couple of HDTV caps in mkv containers, where video stops at end credits and audio continues. I'm using latest MPC-HCx64 with nightly LAV build. I did try MPC-BE and MPC MKV splitter does give accurate duration, as does MediaInfo for example. MPC MKV splitter has an option to let it calculate duration based on video data, which is off by default, with it enabled it reports the same duration LAV does. Is this intended behavior? Could you change it or add an option to calculate duration based on video or audio data? That way we will get correct duration and be able to seek further.
One more thing, would you consider adding support for audio delay file name tag, I think it would be worth it, to rather add a tag than having to remux or manually switch it on and off.
Anyway, thank you for the great work, much appreciated.
GTPVHD
13th October 2015, 18:10
https://www.microsoft.com/en-us/download/details.aspx?id=49188
This document contains a specification for support of VP8 and VP9 video decoding (according to the available VP8 and VP9 source code and public documents) within the Microsoft Windows DirectX Video Acceleration (DXVA) API/DDI context. This specification includes support of the VP8 coding format and VP9 Profile 0. The document describes high-level design concepts and specific VP8 and VP9 extensions to DXVA interfaces and data structures of VP8 and VP9 video decoding. This document specifies only off-host Variable Length Decoding (VLD) profiles for VP8 and VP9 video decoding.
nev, do you think you can add VP8/VP9 decoding support for hardware that supports VLD with this?
huhn
13th October 2015, 19:04
nev, do you think you can add VP8/VP9 decoding support for hardware that supports VLD with this?
http://forum.doom9.org/showthread.php?p=1742587#post1742587
he is pretty fast.
tzr916
13th October 2015, 19:05
Zoom Player 11 now has Library feature that has thumbnails for video files. I am having issues with WTV file thumbnails. These are Windows Media Center mpeg2 videos. Playback is not a problem, just the thumbnails in the ZP Library. Out of 121 video files, only 3 are showing normal thumbnail. All the rest are garbled zig zag patterned colored lines. According to the developer of Zoom Player, this is due to " the sample grabbing filter (the Microsoft component used to grab images from a video) is reporting the wrong resolution for these videos, possibly because LAV is somehow confusing the sample grabber or because the video stream aspect ratio changes is somehow confusing the sample grabber."
Here you can see all the bad thumbnails and one good thumbnail:
http://s25.postimg.org/lewwutp17/ZP_Library.jpg (http://postimg.org/image/lewwutp17/)
CLICK for short sample WTV video (https://drive.google.com/file/d/0B82GqdDf8HSyWlhRVTlxV0ZvSWM/view?usp=sharing)
nevcairiel
13th October 2015, 21:26
This is a problem in the sample grabber, it needs to deal with dynamic resolution changes.
nevcairiel
13th October 2015, 21:33
I've had some issues with LAV splitter giving me wrong/shorter duration on a couple of HDTV caps in mkv containers, where video stops at end credits and audio continues. I'm using latest MPC-HCx64 with nightly LAV build. I did try MPC-BE and MPC MKV splitter does give accurate duration, as does MediaInfo for example. MPC MKV splitter has an option to let it calculate duration based on video data, which is off by default, with it enabled it reports the same duration LAV does. Is this intended behavior? Could you change it or add an option to calculate duration based on video or audio data? That way we will get correct duration and be able to seek further.
Its not intended as such, but just how it is for now. Its a known limitation and will be addressed in the future. A sample file might help.
One more thing, would you consider adding support for audio delay file name tag, I think it would be worth it, to rather add a tag than having to remux or manually switch it on and off.
There are no plans for this, sorry.
tzr916
13th October 2015, 21:49
This is a problem in the sample grabber, it needs to deal with dynamic resolution changes.
I have no idea what this means or if it can ever be resolved?
nevcairiel
13th October 2015, 21:53
I have no idea what this means or if it can ever be resolved?
All it means is that its not something LAV has to fix. Dynamic format changes are quite common, and in the case of WTV just a part of reality - the WTV headers contain one frame size, the video is actually in another. LAV Splitter reads the WTV headers and trusts them, of course.
Zoom Player could use its own Sample Grabber and not the rather limited on that comes with Windows.
Stephen R. Savage
13th October 2015, 23:28
nevcairiel,
Have you been able to look into the issue I reported earlier (http://forum.doom9.org/showpost.php?p=1741844&postcount=19772)? Is there a bug tracker where I should report these issues?
Regards
nevcairiel
14th October 2015, 09:36
nevcairiel,
Have you been able to look into the issue I reported earlier (http://forum.doom9.org/showpost.php?p=1741844&postcount=19772)? Is there a bug tracker where I should report these issues?
Regards
Something weird is going on with that sample. I'll check.
Edit:
Should hopefully be fixed in the next version.
Note that ASS in AVI is a giant hack and you should really consider using MKV instead.
madshi
14th October 2015, 09:46
Have you been able to look into the issue I reported earlier (http://forum.doom9.org/showpost.php?p=1741844&postcount=19772)? Is there a bug tracker where I should report these issues?
Works fine here, after dropping the avi file into mkvtoolnix and simply remuxing it to mkv. Playing the avi: No subs. Playing the mkv: Subs work fine with both ISR and XySubFilter. Which means it's probably the avi splitter dropping the ball here.
ibius
14th October 2015, 13:05
Its not intended as such, but just how it is for now. Its a known limitation and will be addressed in the future. A sample file might help.
Here you go: Sample (http://wikisend.com/download/837208/Deja.Vu.2006.1080i.Open.Matte.HDTV.deint=film.DD5.1.h264-002.mkv)
thx
hubblec4
14th October 2015, 19:47
hi nevcairiel
sorry for delay, but i have no time for uploading the whole dvd.
I get a new DVD - Homeland season 3 disk 1. Riped to disk with anydvd(no special settings) and the same behavior like Aliens DVD.
No buttons on the screen visible.
With Arcsoft TMT5 play fine.
clsid
14th October 2015, 20:16
You can upload the DVD without the big VOB files. It does not matter that you can't play it anymore. Nevcairiel can use dummy files if needed.
nevcairiel
14th October 2015, 20:39
The menu should still be functional without the big VOBs, if its not its a weird DVD, and not sure I can do anything about it.
hubblec4
14th October 2015, 20:53
Homeland and Aliens DVD's without big vobs
Homleland
Homeland S3D1 (http://forum.videohelp.com/attachments/34046-1444852209/Homeland%20S3D1.7z)
Aliens (http://forum.videohelp.com/attachments/34047-1444852648/Aliens.7z)
CruNcher
15th October 2015, 12:58
@nevcariel
Is there a ffmpeg build existing with nvdec (cuvid) support ?
your cuda decoder in lav decoder is already 0 copy right ?
http://www.qtav.org/blog/cuda_0_copy.html
Neeto
15th October 2015, 13:08
@nevcariel
Any chance of getting a 3.1 down mix in the mixer? The 4.0 down mix seems to be for a quad system, not a 3.1 system or am I missing something?
LigH
15th October 2015, 13:19
Somewhere before (possibly in madVR?) I read that CUVID is obsolete because it won't support 10 bit depth etc.
CruNcher
15th October 2015, 13:26
NVCUVID was more the name for the Shader decoder part that surely is obsolete with the SIP Block NVCUVENC became NVENC but not sure.
I never understood that they renamed the Encoder part but left the Decoder part named NVCUVID and not NVDEC only guess is because of the so close to the CUDA part of the Decoder.
Under Windows 10 i would guess Microsoft want's the monopoly with DXVA2 also because of secure path considerations in the trusted zone of it and easier managing you dont make Secure Boot mandatory for nothing ;)
So i guess IHVs own HW APIs under Windows 10 will come to an end.
nevcairiel
15th October 2015, 13:48
Is there a ffmpeg build existing with nvdec (cuvid) support ?
I don't distribute ffmpeg builds outside of the libraries I use for LAV, so clearly this is the wrong place to ask anything like that.
your cuda decoder in lav decoder is already 0 copy right ?
If you want zero copy, use DXVA2-Native, its the only way to do that with DirectShow.
Under Windows 10 i would guess Microsoft want's the monopoly with DXVA2, something platform independent is surely nothing they want ;)
You have no idea what you are talking about.
Having a standardized interface for accelerated decoding that works with all vendors is just pure awesome. Make it work on DXVA2, and it works for NVIDIA, AMD and Intel. Talk to any Linux developer where they have to implement one API for every GPU vendor, its absolute pain.
On top of that, DXVA2 is actually documented quite well - not something you can say for about all the Linux things.
A "cross platform" interface would only ever go so far anyway, on Windows you want D3D, on Linux you obviously can't use D3D, so you end up with something different anyway.
CruNcher
15th October 2015, 14:06
Of course nevcariel that's convenient Sauron thought the same way ;)
https://www.youtube.com/watch?v=Zp7xHW-JcKk
With Low Level APIs this could change and Vulkan runs on Windows as well it doesn't need D3D except for the presentation ;)
huhn
15th October 2015, 14:17
Somewhere before (possibly in madVR?) I read that CUVID is obsolete because it won't support 10 bit depth etc.
there are more reasons. CUVID forces the GPU in the highest powerstate. that's pretty bad when one point of hardware decoding is lower power consumption...
it's the same decoder as DXVA and DXVA native is just faster.
CruNcher
15th October 2015, 14:23
Then try to lower the power output yourself on Video Playback and be surprised ;)
huhn
15th October 2015, 14:32
or i just use DXVA and have nothing to do...
CruNcher
15th October 2015, 14:39
if you think its always efficient
http://forum.doom9.org/showthread.php?p=1741284#post1741284
huhn
15th October 2015, 14:52
what should i see there? the GM204 doesn't even have a fixed function HEVC decoder.
nevcairiel
15th October 2015, 14:57
if you think its always efficient
http://forum.doom9.org/showthread.php?p=1741284#post1741284
Small spikes like that have no impact on the video playback. The renderer will buffer a couple video frames and present them using VSYNC, that way small "glitches" just vanish.
If a renderer would need a 100% smooth video stream, 90% of all video would look terribly stuttery.
If you think boosting your GPU to P0 for video playback helps smoothness, then by all means, there are easier ways to do that than force usage of CUVID. :)
In any case, CUVID is dead, and I might even remove it from LAV at some point. At the very least I'll likely disable it on Windows 10, because NVIDIA broke half of its functionality anyway and the remaining parts can easily bug out - not to mention lack of 10-bit support.
Thats not Microsoft promoting DXVA2, thats NVIDIA not fixing their API. NVIDIA has superb DXVA2 support though, full 10-bit and everything.
PS:
CUVID just used DXVA2 on the driver side anyway, it was just another API to plug CUDA interoperability on top of the DXVA video decoder.
CruNcher
15th October 2015, 15:25
I can fully understand that decision though these frequency shift "glitches" can be not only small but they can become freaking huge with DXVA Native
13 ms
http://i2.sendpic.org/t/tF/tFMrd5svoVs2YvYYMywlTFuEmqc.jpg (http://sendpic.org/view/2/i/cM7wa5rHLxKu1keialLykdLNcZM.png)
0.4 ms
http://i2.sendpic.org/t/5C/5CG2jFLjvfIQPPeaHY05ZPwKrA9.jpg (http://sendpic.org/view/2/i/iDjCfODzL52NJU5cXlLOuX9K7Wg.png)
nevcairiel
15th October 2015, 15:27
You are testing a hybrid decoder though, due to their high CPU usage they behave a bit more unusual than actual hardware decoders.
huhn
15th October 2015, 15:43
the issue could be the renderer too. hard to judge from a simple screen without knowing the exact renderer. it's an EVR renderer that's all i know.
clsid
15th October 2015, 16:06
Is using the CUDA API enough to force P0? Or must you actually also do something with it besides initialization? If not, it could optionally be used by madVR and EVR-CP as a means to provide more stable playback.
CruNcher
15th October 2015, 16:09
You are testing a hybrid decoder though, due to their high CPU usage they behave a bit more unusual than actual hardware decoders.
Ah come on that CPU usage is pretty much a joke compared to the complexity and Firefox is running in the background also, sure OpenHEVC isnt far from it and you shouldn't forget you aren't using 0 copy ;)
http://i2.sendpic.org/t/su/su6mFFM2Wzg6d3R0hTlPBtvK9gm.jpg (http://sendpic.org/view/2/i/vgjrDIZ0btoDVMALqdeQetLPciq.png)
Though HEVC is not AVC and it is much better Shader optimizeable Nvdia took that chance to try it and doesn't keep the Performance Line user completely in the Dust with CPU Decoding and the results aren't that bad @ all for a Hybrid using parts of the VP6 AVC SIP Block sure the GM206 smokes it with it's complete 10 bit SIP Block of VP7 :)
This is a typical Nvidia Design Strategy only the Cards get the full SIP Block where it's economical for them @ the Time so all the Maxwell Mobiles will have the VP7 SIP Block like X1 (Nvidia Shield Android TV Console) has it and the GM206 as a Low Power HTPC Product.
And this time Intel Adapted to this Strategy as well only AMD didn't they pushed once again everything into their Chip economical or not ;)
4K HEVC Results Beauty 30 FPS (Realtime Playback)
Bit rate : 12.3 Mbps
Maximum bit rate : 17.4 Mbps
Lav Decoder (OpenHEVC 8bit) = AVG 40% CPU (Sandy Bridge 4C)
Nvidia VP6 HEVC Hybdrid Decoder 8 bit = max 17% CPU (generic copy)
And yes im fully aware of the Power/GPU/CPU Balance (P0 State Voltage increase) but that's not part of the testing for now (most user of these Gamer Cards don' t care about power @ all) ;)
NikosD
15th October 2015, 17:40
Though HEVC is not AVC and it is much better Shader optimizeable Nvdia took that chance to try it and doesn't keep the Performance Line user completely in the Dust with CPU Decoding and the results aren't that bad @ all for a Hybrid using parts of the VP6 AVC SIP Block sure the GM206 smokes it with it's complete 10 bit SIP Block of VP7 :)
This is a typical Nvidia Design Strategy only the Cards get the full SIP Block where it's economical for them @ the Time so all the Maxwell Mobiles will have the VP7 SIP Block like X1 (Nvidia Shield Android TV Console) has it and the GM206 as a Low Power HTPC Product.
And this time Intel Adapted to this Strategy as well only AMD didn't they pushed once again everything into their Chip economical or not ;)
Not sure about Nvidia, but pretty sure about Intel that for hybrid decoding of HEVC 8bit, doesn't use any of the QuickSync fixed-function blocks.
Because during hybrid HEVC decoding on Haswell, the usage of QuickSync HW decoding block is dead zero 0%.
CruNcher
15th October 2015, 17:54
Not the case for Nvidia 1 Part of the VPU Engine is active Node 6,Engine 6 not much though Node 3,Engine 3 is completely silent, this doesn't get exposed via NVAPI indeed hmm maybe though Node 6,Engine 6 is the cuda copy part
http://i1.sendpic.org/t/gI/gIwZEvl6yvxqYpICv1iWfXsSrb2.jpg (http://sendpic.org/view/1/i/qXmpGcDgLfkI1Lp1QCTQszqoB3e.png)
Ok indeed it seems to be even completely shader based no SIP Block sharing as i assumed first.
http://i1.sendpic.org/t/t4/t4BCcWjTHWo8ILIvvcGppV6o6do.jpg (http://sendpic.org/view/1/i/X5mqHrUylpC39c9jzokK8NMAvj.png)
As nevcariel said now it makes perfect sense why DXVA fails with those frequency fluctuations keeping it stable ;)
But what is Node 6 it's not the MCU
http://i2.sendpic.org/t/b7/b7h3acGXGohQZFSBbXM7gJiIPBc.jpg (http://sendpic.org/view/2/i/jm3GujHEE0dAN5B7L3xmrhbeOqX.png)
huhn
15th October 2015, 18:14
Is using the CUDA API enough to force P0? Or must you actually also do something with it besides initialization? If not, it could optionally be used by madVR and EVR-CP as a means to provide more stable playback.
CUVID forces P0 i don't know why.
there are other ways to get P0.
@CruNcher
have you made sure the issue isn't with the EVR renderer from MPC-BE?
and why is the resizer NN?
CruNcher
15th October 2015, 18:38
DSR does the overall scaling currently
http://i2.sendpic.org/t/ey/ey34G4nGYzsYwoOzBsszEgib91R.jpg (http://sendpic.org/view/2/i/1d7snQ8C4oVhlxLhWV9VjNt6DuO.png)
huhn
15th October 2015, 18:39
no it doesn't.
CruNcher
15th October 2015, 19:23
no it doesn't.
Im pretty sure i see no impact no matter which scaler i chose on anything.
http://i1.sendpic.org/t/uI/uIbYrzepbChyHtOzcAQOzCYFu2O.jpg (http://sendpic.org/view/1/i/dPuROpUrHV6sMURVUVw8CQRurXI.png)
http://i1.sendpic.org/t/5E/5EFQ6CrUk0iivT5QJ9q0maXSaYa.jpg (http://sendpic.org/view/1/i/oJYO6JSmSUAl3p0LGX9wHWMO8YV.png)
http://i2.sendpic.org/t/81/81val3mvRXxpuJjXJGitJDnEV93.jpg (http://sendpic.org/view/2/i/obXcXhqEBRRWxxvaLN7zBStntXD.png)
http://i1.sendpic.org/t/j7/j7DqnA7mZrtL9FDwIU19KWtm5k6.jpg (http://sendpic.org/view/1/i/tjlMO49wRKBOXtDqpeS1vJ88SGx.png)
http://i2.sendpic.org/t/31/31SFQ8FFJwfuOlCbUU0grFJKXnx.jpg (http://sendpic.org/view/2/i/k8SUj5EQW7v7LIm9fYX5IZcWDIi.png)
So either they are all broken or Nvidias DSR overides them all
And when you think in Nvidias Logic (if we have a superior scaling algorithm why should we keep everyone else running and causing troubleshoot problems) ;)
it isn't really surprising ;)
One of the 8 bit Samples where everything brakes apart currently 46.4 Mbps ;)
http://i2.sendpic.org/t/ed/edlEIpf24AQny3MlB08BEqm67W5.jpg (http://sendpic.org/view/2/i/vWQkraxioH4YKBwOsuHE5Bi4HeL.png)
Though some of the parts play fine but most 30 ms or more (watching out for Driver improvements) ;)
OpenHEVC handles this stream much much better on the 4 Cores
http://i2.sendpic.org/t/bz/bzKnHuh0S0xoZePTm7DZdTGeSHR.jpg (http://sendpic.org/view/2/i/kLp35yvICoGKdUPmTzp9aAgqi7F.png)
I guess 40% OpenHEVC equals roughly what Nvidias Shader Decoder can playback currently 80% is 2x more complex guess the Decoder will die practically everywhere OpenHEVC drives 80% CPU results or dies itself.
Mangix
16th October 2015, 02:30
Talk to any Linux developer where they have to implement one API for every GPU vendor, its absolute pain.
Everyone uses VDPAU nowadays. Everything else seems to have died.
nevcairiel
16th October 2015, 08:26
Everyone uses VDPAU nowadays. Everything else seems to have died.
Thats not true. VAAPI is still very much alive, and Intel doesn't support anything else.
huhn
16th October 2015, 08:54
@CruNcher
that's your screen.
http://sendpic.org/view/2/i/1d7snQ8C4oVhlxLhWV9VjNt6DuO.png
can you stop trolling please?
foxyshadis
16th October 2015, 10:25
Thats not true. VAAPI is still very much alive, and Intel doesn't support anything else.
The nice thing about VDPAU, though, is that it can translate transparently to VAAPI, whereas the reverse definitely isn't true.
nevcairiel
16th October 2015, 10:35
The nice thing about VDPAU, though, is that it can translate transparently to VAAPI, whereas the reverse definitely isn't true.
From what I'm told that doesn't work that well..
CruNcher
16th October 2015, 11:16
@CruNcher
that's your screen.
http://sendpic.org/view/2/i/1d7snQ8C4oVhlxLhWV9VjNt6DuO.png
can you stop trolling please?
And what do you want to say with that the source is highly compressed the output result is fast and it looks the same nothing artificialized you could still run a sharpener over it if you need it but the overhead is still lower in any case.
Or do you think this looks bad also as its native downscaled,upscaled
http://i2.sendpic.org/t/ed/edlEIpf24AQny3MlB08BEqm67W5.jpg (http://sendpic.org/view/2/i/vWQkraxioH4YKBwOsuHE5Bi4HeL.png)
http://i2.sendpic.org/t/ez/ez0kjYthGP5AKGkK4C3c9Gpc0AN.jpg (http://sendpic.org/view/2/i/1wvva6E5yBdAp9EIKN710o2ltC1.png)
huhn
16th October 2015, 14:35
you post a UHD video at UHD can you plz stop kidding...
P.J
16th October 2015, 15:18
And what do you want to say with that the source is highly compressed the output result is fast and it looks the same nothing artificialized you could still run a sharpener over it if you need it but the overhead is still lower in any case.
Or do you think this looks bad also as its native downscaled,upscaled
http://i2.sendpic.org/t/ed/edlEIpf24AQny3MlB08BEqm67W5.jpg (http://sendpic.org/view/2/i/vWQkraxioH4YKBwOsuHE5Bi4HeL.png)
http://i2.sendpic.org/t/ez/ez0kjYthGP5AKGkK4C3c9Gpc0AN.jpg (http://sendpic.org/view/2/i/1wvva6E5yBdAp9EIKN710o2ltC1.png)
+10MB for a screenshot?
CruNcher
16th October 2015, 16:17
Its the entire Framebuffer
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.