View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
thebigmunch
29th January 2012, 13:56
If you run LAV output side by side with MadVR it certainly looks alot different but that might be because we can't seem to work out between the 3 of us how to change Colour,Contrast and Brightness of MadVR to closer match that of the LAV output.Like someone somewhat explained before, LAV Filters and MadVR are two different things. One is a splitter and decoder package, while the other is a video renderer. You can't really compare them side-by-side. What video renderer are you using where you're saying LAV Filters?
Reino
29th January 2012, 14:21
Hello nevcairiel,
I think it'd be a good idea to force RGB output for FRAPS video, if possible. This is required, the official FRAPS decoder does it too. Without it the video doesn't look right...
...I'm going to suggest this also for ffdshow.You're not the first one: FFDShow feature request - Output colorspace as-is (http://sourceforge.net/tracker/?func=detail&aid=3458249&group_id=173941&atid=867363).
nevcairiel
29th January 2012, 14:40
LAV will always try to output the color space of the video untouched, however, that is not always easy.
For some formats, like Fraps, its impossible to know what the "right" format is before we decoded the first frame.
However, before decoding it, we have to tell the renderer what we're sending, which if unknown is the default NV12 (because it covers like 90% of all important video).
Now, when the first frame was decoded, we know that its actually RGB, and we try to tell the renderer that we actually would like to send RGB.
Here is where the problems start. EVR does not allow changing its input format after the initial connection has been made, so its just not possible to switch from NV12 to RGB on-the-fly.
This problem does *not* exist with any other renderer. VMR is fine, Overlay Renderer is fine, Haali is fine, madVR is fine, just EVR (any variant) fails.
Thats why Fraps has this issue, and thats another reason why forcing RGB output for everything when using EVR is a good idea.
If people tell me that RGB Fraps is far more common then YUV420 Fraps, then i might add a special rule for Fraps to default to RGB instead of NV12, but this has to be done on a per-codec basis.
rica
29th January 2012, 15:19
@nevcairiel,
LavSplitter gives false information; it gives 48k/16 info while the original audio is 96k/24.
Here is a sample:
http://www.mediafire.com/?2jygu42sokq5c52
(Tom Petty and the Heartbreakers, Blu-Ray Audio.)
STaRGaZeR
29th January 2012, 15:19
If people tell me that RGB Fraps is far more common then YUV420 Fraps, then i might add a special rule for Fraps to default to RGB instead of NV12, but this has to be done on a per-codec basis.
It's not IMO, but defaulting to RGB is a good idea with this codec regardless. Levels issues and other stuff.
BTW did you decide what to do when playing yuv444 content with AYUV output disabled, instead of converting to 420?
Reino
29th January 2012, 15:22
Afaik is Fraps always RGB. At least I've never heard of YV12 Fraps files.
Excuse me if this sounds ignorant (I have no experience with coding splitters or decoders), but wouldn't it be much easier then for the splitter to detect the file's colourspace, so the decoder doesn't have to decode the first frame?
Of course this still doesn't explain why FFDShow's own FFV1(RGB) format and HFYU(RGB) are always converted to YV12, but this is also the wrong topic to discuss that.
aufkrawall
29th January 2012, 15:30
The official FRAPS Decoder always converts to RGB, both for YV12/RGB.
Otherwise everything is messed up due to PC range.
If possible there should be hardcoded that when the source's codec is FPS1, always RGB should be outputted.
nevcairiel
29th January 2012, 15:33
Afaik is Fraps always RGB. At least I've never heard of YV12 Fraps files
Fraps has 6 versions
0: YUV 4:2:0
1: RGB
2: YUV 4:2:0
3: RGB
4: YUV 4:2:0
5: RGB
There are differences how the data is encoded, but thats the color spaces used.
The bad thing is, FPS1 is the FourCC for all variants.
Excuse me if this sounds ignorant (I have no experience with coding splitters or decoders), but wouldn't it be much easier then for the splitter to detect the file's colourspace, so the decoder doesn't have to decode the first frame?
Sure, the splitter knows the correct format (at least LAV Splitter does), but there is no "standard" way to communicate that to the decoder. I've been thinking about adding a LAV specific way to communicate this, so the problem can at least be controlled when using LAV Splitter + LAV Video.
BTW did you decide what to do when playing yuv444 content with AYUV output disabled, instead of converting to 420?
It should go to RGB right now, and not to 4:2:0, which is imho the most sensible solution.
hissatsu
29th January 2012, 15:34
Hi,
I have tested on Terminator Salvation (on MediaPortal with LAV Splitter ofc).
I didn't have your issue, i have keep running 2 switching on m2ts (quite simple on that BD, one is @ 53 seconds and the second @ 1 minute 56 secs.)
Running on NVidia with CUDA.
I will try to do the same test with my Avatar seamless BD and on MPC-HC.
Thanks
*EDIT* : On Avatar, it's ok too (on MePo)
Well, thanks for checking. I'd really like being able to use a version of LAV Filters newer than .39 without have a black screen pop up every while. I guess no one else is experiencing this issue?
nevcairiel
29th January 2012, 15:41
@nevcairiel,
LavSplitter gives false information; it gives 48k/16 info while the original audio is 96k/24.
Here is a sample:
http://www.mediafire.com/?2jygu42sokq5c52
(Tom Petty and the Heartbreakers, Blu-Ray Audio.)
Thats DTS-HD, its normal for it to only show the DTS core information. Its not important, a DTS decoder does not need that information.
Its only a cosmetic issue, which however won't be fixed until ffmpeg gets DTS-HD support one day.
rica
29th January 2012, 16:01
OK, thanks!
msoltyspl
29th January 2012, 16:25
Two issues I noticed while remuxing things:
1) I noticed that LAV tends to "flatten" chapter editions in matroska - when there's more than 1 available, for example:
edition1
+chapt1
+chapt2
+chapt3
+chapt4
edition2
+chapt2x
+chapt3x
Now if say - chapt2x comes between edition1's chapters 2:3 and chapt3x between 3:4 - then when LAV splitter is active, it will present:
+chapt1
+chapt2
+chapt2x
+chapt3
+chapt3x
+chapt4
2) Another thing noticed - it looks like EditionFlagOrdered is generally ignored (the behavior is as if EditionFlagOrdered=0 - so no "playlist"-like behavior, though only haali does it, and not without certain quirks either).
I can imagine both things would be far away on a todo list, though at some point perhaps.
Pat357
29th January 2012, 17:24
Not correct depends on the Hardware (Driver), on SB its not the case (EVR Custom)
Not sure whar you mean...Will you still get HW deinterlacing when outputting RGB to EVR-CP on SB than ?
STaRGaZeR
29th January 2012, 17:27
It should go to RGB right now, and not to 4:2:0, which is imho the most sensible solution.
Ugh, I fail. I wanted to say yuv422 if you disable all 422 formats. You said you were going to consider it, and since it's still prefering 420 over 444 or RGB, I'm asking again :p
mindbomb
29th January 2012, 17:50
Not sure whar you mean...Will you still get HW deinterlacing when outputting RGB to EVR-CP on SB than ?
actually, i think the same thing may be happening on my amd e350.
I'm not sure what is happening tbh, im noticing the fps is doubled, so there must be at least a bob going on.
renq
29th January 2012, 19:15
http://forum.doom9.org/showthread.php?p=1554567#post1554567 ;)
Pat357
29th January 2012, 19:18
Can anyone tell me the difference between P210/v210 ?
These are both 10bit and both 4:2:2....
How is the conversion done from one to the other ?
Is this a 100 lossless process ? (think it is, but want to be sure)
Similar for P410 / v410 ?
nevcairiel
29th January 2012, 19:21
Of course its a lossless process. v210 is just for some post-processing filters that don't understand P210. If there is a choice, always use P210, output of that is most likely faster. :)
v210 is a highly packed format, while P210 wastes a few bits to make it easier to work with.
nevcairiel
29th January 2012, 19:31
Ugh, I fail. I wanted to say yuv422 if you disable all 422 formats. You said you were going to consider it, and since it's still prefering 420 over 444 or RGB, I'm asking again :p
Oh i forgot about that.
I still am not sure why anyone would turn that off, but okay.
I'll make it prefer 4:4:4 and then RGB, i suppose? Even though 4:4:4 YUV is so badly supported by renderers ... i wish EVR would just deny connection.
STaRGaZeR
29th January 2012, 19:39
444 then RGB is what I'd ideally do, but with the AYUV situation... vote for RGB over AYUV. Or RGB only, mind you.
nevcairiel
29th January 2012, 20:12
I today implemented YV24 output, which i could use as the primary 4:4:4 output and disable AYUV by default - avoiding the problem entirely (EVR doesnt connect to YV24)
Sadly, madVR seems to have a bug with YV24, causing it to show wrong colors, so i didn't enable it yet for anything. But if its fixed, i may do the switch.
On the other hand, if someone turns off 4:2:2 but keeps AYUV active, its their own damn fault imho. :)
CruNcher
29th January 2012, 21:28
@Nev
im pretty sure you shouldn't fix this but could you if it is needed make a workaround for this based on CoreAVC connecting im not sure tough what would happen if they fix it in the next version and lav splitters workaround tries it to for the current (detecting version before connection seems impossible, or really isn't something a splitter should do) ;)
https://forum.doom9.org/showpost.php?p=1554111&postcount=6977
oddball
29th January 2012, 22:12
Hi again. I've lost my advanced sub settings (I should have saved it someplace). I can't get subs to work how I want. I want only forced subs for English audio. Full subs for Non-English audio and Full subs for anything undertermined like where someone has muxed with both audio and subs set to Und.
CruNcher
29th January 2012, 22:34
@Nev
another stall
http://www.mediafire.com/?5shk3hmbudh8r0j
nevcairiel
29th January 2012, 22:47
@Nev
another stall
http://www.mediafire.com/?5shk3hmbudh8r0j
That file has a broken audio track which causes it (a file with video but only broken audio is problematic)
I changed it now to completely ignore any broken streams, hope this doesn't cause any valid streams to stop playing, but that is a risk i'll just have to take.
CruNcher
29th January 2012, 22:58
That file has a broken audio track which causes it (a file with video but only broken audio is problematic)
I changed it now to completely ignore any broken streams, hope this doesn't cause any valid streams to stop playing, but that is a risk i'll just have to take.
We'll see :)
and now the other way ;) (no audio lav audio until you seek, if you don't seek it stalls @ 1:05)
http://www.mediafire.com/?e2djjxeylkmrsbf
ryrynz
29th January 2012, 23:08
I actually found the reason why ffdshow seems faster, and "fixed" that, still doesn't explain why 0.22 is faster then 0.24, i'll investigate a bit before i post.
Using your build that fixed the default MT settings and it's boosted the performance of QuickSync 0.24 by quite a lot! It's now within 15% of my 0.22 benches.
CruNcher
29th January 2012, 23:27
Though still @ playback Mpeg-2 DXVA2 copy Back is more efficient then the Intel Quicksync Decoder (still no quality compare) :)
and except that 1 stream crash (works with Quicksync) http://www.mediafire.com/?y2dbekgemoeo28m i couldn't find anything problematic all the streams work i wonder what for Mpeg-2 streams don't work for you Nev or show failures @ decoding (would you share those please) :)
Aspeh
30th January 2012, 00:19
Like someone somewhat explained before, LAV Filters and MadVR are two different things. One is a splitter and decoder package, while the other is a video renderer. You can't really compare them side-by-side. What video renderer are you using where you're saying LAV Filters?
just the bare minimum
MPC-HC , Lav Filters and MadVR
Just tried Crystalplayer that someone mentioned loads of pages back and that looks awsome with LAV filters and super sampling enabled as you have full control of brightness and contrast without using video overlays but it doesn't work with MadVR to test as there are no options to set external render.
CruNcher
30th January 2012, 00:33
lav filters -mpc-hc -evr custom bicubic -chroma upsampling -sharpen complex 2 (or experimental sharpen shader in the mpc-hc experimental thread, lower gpu usage)
lav filters (rgb32) dxva2 copy back, quicksync,cuvid -mpc-hc -evr custom bicubic -sharpen complex 2 (or experimental sharpen shader in the mpc-hc thread, lower gpu usage)
internal filters - potplayer evr custom - sharpen complex 2 -chroma upsampling- (or experimental sharpen shader in the mpc-hc thread,lower gpu usage)
On SB
lav filters, dxva 2 copy back (mpeg-2), intel quicksync rest or dxva native capable decoders (everything) -> Mpc-HC - EVR (default) internal Lanczos4 and Chroma upsampling (its really efficient and 0 cost, fixed function) (deinterlacing is not bad needs further comparisons, quality/resource its no catch and clearly intel the winner (fixed function), compared to the massive cpu usage of yadif on 30i->60p) - internal driver sharpen (automatic though most of the times to harsh, fixed function it compensates the quantization blur efficiently)
internal filters (full dxva) -> Potplayer EVR default internal Lanczos4 and Chroma upsampling - internal driver sharpening - (automatic though most of the times to harsh)
sneaker_ger
30th January 2012, 01:12
Hi again. I've lost my advanced sub settings (I should have saved it someplace). I can't get subs to work how I want. I want only forced subs for English audio. Full subs for Non-English audio and Full subs for anything undertermined like where someone has muxed with both audio and subs set to Und.
eng:eng|f;eng:off;*:eng;und:und
or maybe
eng:eng|f;eng:off;*:eng;*:*
Pat357
30th January 2012, 01:31
I today implemented YV24 output, which i could use as the primary 4:4:4 output and disable AYUV by default - avoiding the problem entirely (EVR doesnt connect to YV24)
What is the problem with EVR/AYUV?
I just looked at a 10s intro converted to AYUV, but I did not notice a problem. I could judge the colors though, as I don't know how this intro it should look.
Sadly, madVR seems to have a bug with YV24, causing it to show wrong colors, so i didn't enable it yet for anything. But if its fixed, i may do the switch.
Not sure if it has to do with something I noticed a while ago : with Y24 output, when the colors were OK in FFplay/Mplayer2, I had to swap the U en V to get the right colors in MadVR.
Because I didn't gave anything else that could understand YV24, I was not sure which was wrong and which was right.
On the other hand, if someone turns off 4:2:2 but keeps AYUV active, its their own damn fault imho. :)[/QUOTE]
Why would it be so bad ??
Anyway, I prefer YV24 over AYUV because Avisynth supports only YV24.
If outputting in RGB32 does the HW adaptive deinterlacing still work in EVR on NVidia/AMD/Intel ? What about Madvr, does it still receive the necessary flags to deinterlace and do IVTC ?
mindbomb
30th January 2012, 02:32
I have noticed something very strange regarding dvd playback.
For dvd playback, I use microsoft dtv-dvd video decoder, since the dvd navigator doesnt connect to lav video. I am using lav splitter, lav audio, and madvr as well.
But here is what I don't understand. I will get a macrovision error normally. However, when I add ffdshow audio processor, DVDs play fine.
What is happening?
CruNcher
30th January 2012, 02:54
@Nev
last frame gets lost (display) with yadiff enabled ?
http://www.mediafire.com/?mbuq1zevy5lv59u
[ReX]
30th January 2012, 05:29
I started watching a very old XviD file and I noticed choppy playback. I tested with ffdshow, Koepi's XviD and MPC-HC intenal XviD decoder and they played it with no problems.
Here's a sample (http://www.mediafire.com/?cujlmub3fh443v0) I cut from it.
nevcairiel
30th January 2012, 08:04
@Nev
last frame gets lost (display) with yadiff enabled ?
http://www.mediafire.com/?mbuq1zevy5lv59u
I was wondering when someone would notice. :)
Its a known issue, the yadif filter lacks a function to flush remaining frames, or i just don't know how. :p
what for Mpeg-2 streams don't work for you Nev or show failures @ decoding (would you share those please) :)
http://www.mediafire.com/download.php?79f42499cc12964
Shows random corruption during decoding, seems to happen with all GPUs.
CUVID is fine, as is the MS DXVA decoder.
nevcairiel
30th January 2012, 08:21
What is the problem with EVR/AYUV?
I just looked at a 10s intro converted to AYUV, but I did not notice a problem. I could judge the colors though, as I don't know how this intro it should look.
All formats EVR supports depend on hardware support, and hardware support for AYUV is spotty at best.
On many GPUs it'll either be inredibly slow because some sort of software emulation gets activated, or it'll just show a black screen.
In MPC-HC in particular, AYUV just breaks completely if you have some of the more "advanced" EVR-CP settings activated.
madshi
30th January 2012, 08:38
just the bare minimum
MPC-HC , Lav Filters and MadVR
Just tried Crystalplayer that someone mentioned loads of pages back and that looks awsome with LAV filters and super sampling enabled as you have full control of brightness and contrast without using video overlays but it doesn't work with MadVR to test as there are no options to set external render.
First of all comparing LAV Filters <-> madVR is like comparing a harddisk with a graphics card. LAV Filters is a splitter/decoder. madVR is a renderer. That are 2 totally different things. If you use LAV Filters, only, you get no visible image on screen at all. For that you will need a renderer. If you don't use madVR as the renderer, some other renderer will be used instead. So the comparison you're doing is not LAV Filters <-> madVR. Instead it's madVR <-> some other renderer. LAV Filters got nothing to do with that.
With any renderer, the first thing you should do is to setup the black/white level correctly. Which GPU are you using? When using AMD, set the pixel format to "RGB Full" (or whatever it is named) in the AMD control panel. When using NVidia, make sure you use a custom resolution. Doing this will switch the GPU to full range RGB output. Then in madVR you can switch between video and PC levels. Make sure you use the correct one.
Setting up contrast (or rather the grayscale) should be done at your display, not the video renderer. Also switch your display to the correct colorspace (BT.709), then there's no need to twiddle around with color controls in the renderer. Finally, if your display is bad and shows grossly wrong colors, you can use madVR + yCMS to calibrate your display. But for that you'd need to have your own meter.
This is more a madVR topic than an LAV Filters topic, though, so this discussion should be moved to the madVR thread.
If you want to compare LAV Filters to something else, you need to compare it to another splitter/decoder. If you want to do that, make sure you use the same video renderer. If you switch all splitter, decoder and renderer at the same time, your testing is mostly useless. You gotta compare one thing at a time.
Aspeh
30th January 2012, 09:19
@madshi
Thanks for taking the time to type that out and explain.
It pretty much confirms what i was thinking that i'm out of my depth with this subject and will just leave things on default until i have learnt abit more on the subject as it all seems like a foreign language at the moment. :)
Pat357
30th January 2012, 12:16
Though still @ playback Mpeg-2 DXVA2 copy Back is more efficient then the Intel Quicksync Decoder (still no quality compare) :)
and except that 1 stream crash (works with Quicksync) http://www.mediafire.com/?y2dbekgemoeo28m i couldn't find anything problematic all the streams work i wonder what for Mpeg-2 streams don't work for you Nev or show failures @ decoding (would you share those please) :)
That might be true for Intel SB, but I still have too much "green screens" on my Nvidia GTX 570 (VP4 decoder) with dvxa cb.
nevcairiel
30th January 2012, 12:27
I think its somewhat amusing how people don't care to report issues but then seem to complain in parts of other posts that things don't work. :)
So, if you think you have a bug in the DXVA2 decoder, please report it properly, including a sample, which OS, which GPU and which driver version.
CruNcher
30th January 2012, 13:55
@Nev
that Mediafire link is dead ?
nevcairiel
30th January 2012, 13:59
@Nev
that Mediafire link is dead ?
No file for you, then. :)
I didn't upload it, someone else did.
AmshTemp
30th January 2012, 14:49
@nevcairiel:
Can you make the installer check for the proccessor brand and arch beforce installing IntelQuickSyncDecoder.dll file?
Having an AMD proccessor and Windows 32 bit, I assume IntelQuickSyncDecoder.dll shouldn't get installed at all
nevcairiel
30th January 2012, 14:56
@nevcairiel:
Can you make the installer check for the proccessor brand and arch beforce installing IntelQuickSyncDecoder.dll file?
Having an AMD proccessor and Windows 32 bit, I assume IntelQuickSyncDecoder.dll shouldn't get installed at all
Maybe i could, but a 100-200kb DLL won't hurt you, so i won't.
Its not worth the effort, there is nothing to gain.
CruNcher
30th January 2012, 15:10
@Nev
coming back to this
https://forum.doom9.org/showpost.php?p=1554600&postcount=8624
im not sure anymore if this is actually CoreCodecs fault :(
i have more of these cases and i tested them with AV Splitter and it doesn't show this specific behavior for every of them i really wonder what he does different compared to all the other splitter so that CoreAVC + Lav Audio handles it correct ?
Though therefore his way of doing it seems to get unsync with Lav Video + Lav Audio a little
nevcairiel
30th January 2012, 15:11
im not sure anymore if this is actually CoreCodecs fault :(
One decoder fails, all others work, its their fault.
Taking CoreCodecs communication policys into account, i really don't care to support them either way.
nevcairiel
30th January 2012, 15:16
So, here i was thinking about an audio mixer, mostly how to make it properly configurable, and i hit somewhat of a wall.
I'm thinking about 2 modes, a simple and a advanced mode.
The simple mode would just offer downmixing to 5.1 or stereo, with the appropriate controls (front/back balance, center level)
This really isn't a big problem, and should work out just fine.
The advanced mode should offer a full matrix to toy with.
Here is where the problems come in. To make such a full matrix truly useful, don't you need one matrix per input channel configuration?
I'm thinking, i would want a separate matrix for 7.1, which i want to downmix to 5.1, and i want a separate matrix for stereo, which i want to upmix to 5.1, and of course i want a 5.1 matrix, which shouldn't touch the audio at all. Not to mention all the configurations in between (although i could ponder ignoring them, and converting everything to a "standard" layout before putting it through the matrix)
Looking at ffdshow for example, it doesn't allow this except if you start using profiles. So is this something people really would use? Or would one matrix thats somehow applied to everything just be fine?
Maybe i'm missing something, and ffdshow somehow stores different matrices, but doesn't really explain that on the configuration dialog?
AmshTemp
30th January 2012, 15:31
Fair enough, but what about *64-bit* IntelQuickSyncDecoder.dll installed in my *32-bit* Windows ?
nevcairiel
30th January 2012, 15:32
Fair enough, but what about *64-bit* IntelQuickSyncDecoder.dll installed in my *32-bit* Windows ?
Thats a bug i forgot to fix. :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.