View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
DragonQ
20th October 2012, 22:16
Since CUVID causes the GPU to enter its full performance mode, its certainly possible for CPU decoding to use less power. :o
OK, what should I look for to see if DXVA2 Native is being used then? Surely nVidia Inspector would show different GPU usage or something?
Also, if the media type was screwed up why would CUVID work but not DXVA2 Native? Something to do with its looser restrictions?
Superb
20th October 2012, 23:55
You could use DirectShowSpy to see if LAV is running and in what mode...
http://alax.info/blog/777
SamuriHL
20th October 2012, 23:59
No one has any ideas on my build issue? Frack. I reinstalled VS 2010 and I get the same issue. (On the plus side, it fixed my MPC-HC build issue...I really f'd up my build env). I'm using a clean copy of MSYS, as well, but, it doesn't matter if I use the one Nev provided. I've got no avconfig.h file. That's generated isn't it?
mindbomb
21st October 2012, 00:08
that fixed the issue of the crashing, but now when you click on subtitles, the seekbar resets, and you don't get to the subtitle menu until the seekbar gets to the end. (like it has to wait until it stops playing 30 seconds of a still image)
Here's the menu and stuff (i split it up into 2 parts):
http://www.mediafire.com/?slillwi87x3yby2
http://www.mediafire.com/?qu4kjt1edzj525a
Hi nev, I still have this problem. You said you couldn't reproduce it before, but I think that is because I didn't give enough details about what I was using.
I'm using madvr and dslibdvdnav, and when I click on the subtitles option on the main menu, it seems to play this interstitial 30 second still video before going into that menu.
Pat357
21st October 2012, 00:24
OK, what should I look for to see if DXVA2 Native is being used then?
I don't use this MP "player", but if it's based on DShow, can't you use something like "FilterGraphSpy" or "DirectShowSpy" together with GraphStudioNext ?
It should show you the complete filtergraph, including all in- & outputs from each filter.
noee
21st October 2012, 00:35
No one has any ideas on my build issue? Frack. I reinstalled VS 2010 and I get the same issue. (On the plus side, it fixed my MPC-HC build issue...I really f'd up my build env). I'm using a clean copy of MSYS, as well, but, it doesn't matter if I use the one Nev provided. I've got no avconfig.h file. That's generated isn't it?
I take it you've done a complete "fresh pull" for lav and all subprojects? Have you done the mod to your mingw that Nev posted a while back (don't think that should cause your issue, however)?
SamuriHL
21st October 2012, 00:43
I take it you've done a complete "fresh pull" for lav and all subprojects? Have you done the mod to your mingw that Nev posted a while back (don't think that should cause your issue, however)?
Yes, definitely. I've been building fine but hadn't built in a couple weeks and now it won't work. I've been using Nev's msys package but I get the same error no matter what I use. Completely wiped my lav filters dir and recloned it. Nada.
suanm
21st October 2012, 02:48
why not download "Zips: 32-bit & 64-bit" package ? This is so weird
SamuriHL
21st October 2012, 02:52
I have a custom build I do. The zips don't help me.
suanm
21st October 2012, 03:04
I have just now downloaded Zips package(zips:32-bit & 64-bit) from original address.lol
nevcairiel
21st October 2012, 07:58
Hi nev, I still have this problem. You said you couldn't reproduce it before, but I think that is because I didn't give enough details about what I was using.
I'm using madvr and dslibdvdnav, and when I click on the subtitles option on the main menu, it seems to play this interstitial 30 second still video before going into that menu.
I only tried the MS DVD Navigator, and i do not get such an issue. I do not support the alpha-quality dslibdvdnav at this time.
OK, what should I look for to see if DXVA2 Native is being used then? Surely nVidia Inspector would show different GPU usage or something?
Also, if the media type was screwed up why would CUVID work but not DXVA2 Native? Something to do with its looser restrictions?
I know that GPU-Z has a display for the video decoder usage which can show this. Not sure about nvidia inspector. Using DirectShowSpy might also work
And yes, DXVA Native has some special checks because once you decide to use Native DXVA, you cannot fallback to sofware decoding anymore. But with CUVID (or DXVA-CB even), i can fallback from CUVID to software decoding at any point in time.
Yes, definitely. I've been building fine but hadn't built in a couple weeks and now it won't work. I've been using Nev's msys package but I get the same error no matter what I use. Completely wiped my lav filters dir and recloned it. Nada.
Like i mentioned a few posts ago, i replaced the ffmpeg build scripts, so if you accessed those, you might need to adapt to these changes.
Joniii
21st October 2012, 09:18
Thanks for 0.52!
In FFDShow DXVA there is an option "post processing - surface overlay" to support subtitles and DXVA.
Subtitel works fine with LAV Splitter and FFDShow DXVA.
Is this not possible for LAV-Video?
Dunno if you saw some posts couple of pages back but it's possible to get get subtitles with LAV Video in DXVA with xy-vsfilter.
Warlock
21st October 2012, 12:42
This new version, already has the support ordered chapters?
wanezhiling
21st October 2012, 13:53
Where did you see any info about ordered chapters in the changelog?
SamuriHL
21st October 2012, 14:47
Like i mentioned a few posts ago, i replaced the ffmpeg build scripts, so if you accessed those, you might need to adapt to these changes.
Crap. Totally missed that. I'll take a look. Thanks!!
mindbomb
21st October 2012, 15:28
I only tried the MS DVD Navigator, and i do not get such an issue. I do not support the alpha-quality dslibdvdnav at this time.
Alright, fair enough.
Though earlier builds of lav video don't have this problem.
SamuriHL
21st October 2012, 18:24
I see the issue now, Nev. Sorry about that. I didn't notice you had changed the name of the sh script to build the ffmpeg library. And like an idiot I didn't see the file not found error at the top of my build script. OOPS. Thanks!!
owlsroost
21st October 2012, 21:33
Thanks, I'll try this later (might not get a chance for a few days though). There's no actual way of knowing what mode LAV is using in MediaPortal but I recorded a drop in power usage when switching from CUVID to DXVA2 Native so surely it was using it? I'm pretty sure GPU usage changes when switching from None to DXVA2 Native too, but I can check this again.
There is a known problem with the version of the TV .ts file splitter (TsReader.ax) in MP 1.2.3 - it doesn't provide complete/correct mediatype info for H.264.
This is fixed in MP 1.3.0, but you can also use this version of TsReader.ax to fix the problem in MP 1.2.3 - http://forum.team-mediaportal.com/attachments/tsreader_nostopmod63b-zip.113164/
I've just tested LAV 0.52 with MP + latest TsReader.ax and it's working fine for me in DXVA2 Native mode with both nVidia and Intel GPUs, using a selection of MPEG2/H.264 test recordings and live TV I have available.
DragonQ
21st October 2012, 23:42
Ah, that'll be why DXVA2 Native mode works for me then - I've always been using newer test versions of TsReader.ax because the default one in 1.2.3 is so crap.
Anyway, I've just done some tests and it seems that 0.52 does work fine with DXVA2 Native - must've been a one-off when the graphs went mental. Numbers from Task Manager and GPU-Z when watching an HD channel are here:
0.51.3 (DXVA2)
GPU: 64%
Memory controller load: 35%
Video engine load: 47%
CPU: 5-10%
0.51.3 (CPU)
GPU: 53%
Memory controller load: 30%
Video engine load: 0%
CPU: 40%
- stuttering ocassionally when MP does other stuff
0.52 (DXVA2)
GPU: 40%
Memory controller load: 37%
Video engine load: 60%
CPU: 5-10%
0.52 (CPU)
GPU: 50%
Memory controller load: 30%
Video engine load: 0%
CPU: 30%
- stuttering ocassionally when MP does other stuff
nevcairiel
22nd October 2012, 06:59
That explains why i had issues getting it to work, such information would've been useful for someone that doesnt use MP usually. :p I figured out that its crap on my own, but that there is a replacement available.... :)
Anyway, glad it works properly for you now.
FreeFall
22nd October 2012, 08:26
nevcairiel,
Thanks for all your hard work with LAV Filters. Some feedback on DVD playback, after a while subtitles are not cleared from the screen they just keep displaying over the top of each other.
Win7 Pro GTX 580 (306.97) mpc-hc 1.6.5 6094 x86 CUVID + EVR
Sample.
http://www.mediafire.com/?a2b5hq1244f2ue8
extract and open folder in mpc-hc, change language to Japanese with English subs and play the first episode.
Thanks.
FreeFall
malmsteen81
22nd October 2012, 08:57
hi nevcairiel, sorry for stupid question but lav video filter works with 3d bluray? if yes i must use evr render, right?
thanks
Andrea
owlsroost
22nd October 2012, 09:06
That explains why i had issues getting it to work, such information would've been useful for someone that doesnt use MP usually. :p I figured out that its crap on my own, but that there is a replacement available.... :)
Anyway, glad it works properly for you now.
Apologies for not responding to DragonQ's posts earlier, but I didn't see them until late on Sunday evening. Thanks for all the work on LAV :)
DragonQ
22nd October 2012, 10:04
That explains why i had issues getting it to work, such information would've been useful for someone that doesnt use MP usually. :p I figured out that its crap on my own, but that there is a replacement available.... :)
Anyway, glad it works properly for you now.
I've got quite a few mods for MP, it didn't occur to me that that one would've made a difference.
Good spot by owlsroost. ;)
madshi
22nd October 2012, 11:08
Would it be possible/difficult to add support for "splitting" bitmap formats, like PNG, TIFF, JPG, BMP etc? Currently the only way to show PNG images on my PC with a media player seems to be AviSynth. The problem with AviSynth is that it doesn't support more than 8bit. PNG (optionally) supports 16bit per component. So does TIFF. So it would be great if LAV could split high bitdepth PNG files. PNG also supports aspect ratio and primaries/gamut information. Not sure how common this is, though. And I also don't know if ffmpeg/libav supports any of this. FWIW, here are a couple of 16bit sample images:
http://www.spearsandmunsil.com/images/SM_Montage_Frame_00800_Original_4k.tif
http://www.yafaray.org/sites/default/files/issues/patternfile16bit.png
http://files.chromecode.com/temp/gradient-16-bit.png
http://media.photobucket.com/image/recent/RedMistHavoc/The%2520Sims%25203/marsnorthpole_2048.png
nevcairiel
22nd October 2012, 11:13
In theory it should already be capable of splitting those, the question is if it can properly communicate the image to LAV Video (PNG/TIFF aren't the usual video formats), and then how it deals with still-images in general, i'll give it a try later today, see what happens.
madshi
22nd October 2012, 11:43
Sounds good, thanks. FWIW, if I drop a PNG/TIFF file in MPC-HC, MPC-HC says "cannot render". Do you happen to know whether libav/ffmpeg supports 16bit per channel for PNG/TIFF? Without high bitdepth support I would say it's not worth spending any time on this.
nevcairiel
22nd October 2012, 12:03
It should support high-bitdepth, yes.
madshi
22nd October 2012, 12:08
Cool.
Cide
22nd October 2012, 15:02
How would I reset the lav video and audio settings to default? After running the uninstall bats and then deleting / re-installing, it still holds on to my previous settings.
nevcairiel
22nd October 2012, 15:08
Use the installer instead of the zips, it deletes the settings on uninstall, and also has an option to reset the settings on a re-install.
Cide
22nd October 2012, 15:16
Use the installer instead of the zips, it deletes the settings on uninstall, and also has an option to reset the settings on a re-install.
Thanks! That was easy.
nevcairiel
22nd October 2012, 16:37
FWIW, if I drop a PNG/TIFF file in MPC-HC, MPC-HC says "cannot render".
I see whats going on. It doesn't manage to figure out by itself what to demux raw images with, so i need to tell it explicitly to use the "image2" demuxer. I guess i can just hardcode that on a common set of extensions .. png, tif, tiff, jpg, jpeg, gif, bmp, i dunno what else, will dig a bit.
madshi
22nd October 2012, 16:42
Sounds good. And "decoding" to raw 3x8bit or 3x16bit RGB will then work automatically?
nevcairiel
22nd October 2012, 16:44
The problem here is that 16-bit RGBA output is not supported at the moment, is there a DirectShow type for that?
PS:
madVR also doesn't seem to like showing a single still frame, while EVR shows it just fine.
madshi
22nd October 2012, 16:51
AviSynth pretends a single image were actually a video with a runtime of a few seconds. But I guess showing just one image should work, too. However, isn't playback automatically stopped by the media player after the runtime is through? With stopped playback I think madVR simply shows a black screen...
Currently madVR supports the following for 16bit-per-component RGB:
{&MEDIATYPE_Video, &MEDIASUBTYPE_RGB48LE},
{&MEDIATYPE_Video, &MEDIASUBTYPE_RGB48BE},
{&MEDIATYPE_Video, &MEDIASUBTYPE_b48r},
{&MEDIATYPE_Video, &MEDIASUBTYPE_RGBA64LE},
{&MEDIATYPE_Video, &MEDIASUBTYPE_RGBA64BE},
{&MEDIATYPE_Video, &MEDIASUBTYPE_b64a}
DEFINE_GUID2(MEDIASUBTYPE_RGB48LE, '0BGR', 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
DEFINE_GUID2(MEDIASUBTYPE_RGB48BE, 'BGR0', 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
DEFINE_GUID2(MEDIASUBTYPE_b48r, 'r84b', 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
DEFINE_GUID2(MEDIASUBTYPE_RGBA64LE, '@ABR', 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
DEFINE_GUID2(MEDIASUBTYPE_RGBA64BE, 'ABR@', 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
DEFINE_GUID2(MEDIASUBTYPE_b64a, 'a46b', 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
nevcairiel
22nd October 2012, 17:00
EndOfStream in MPC-HC results in paused mode, not stopped. When i set it to repeat playback forever, i manage to get an image. I guess i could also make it send the same frame more then once for those image sources..
Is there an handy explanation somewhere how the pixels are organized in these RGB formats? I guess it may just be straight forward =p
madshi
22nd October 2012, 17:18
They're all totally straight forward. The only thing you'll have to experiment with is the order of the 3 or 4 channels. And for the Big Endian variants of course you have to swap the 2 bytes for each word. b48r and b64a are also Big Endian.
Superb
22nd October 2012, 17:19
Nev, I wonder... why did you take the approach of blending the dvd sub pictures in the video decoder instead of letting the video renderer do it?
I mean, EVR allows this.
madVR doesn't, but then again it also doesn't work w/ the MS dvd navigator (doesn't support Macrovision), so maybe it should play a lesser role in the decision.
If the video renderer blends the subpictures, then you can use Native DXVA2 decoding and still have dvd navigation, can't you? Wouldn't it also allow Quicksync decoding w/ dvd natigation?
nevcairiel
22nd October 2012, 18:05
Nev, I wonder... why did you take the approach of blending the dvd sub pictures in the video decoder instead of letting the video renderer do it?
Because the way EVR does this is rather crappy and very limited. It may work for simple subtitles like DVD subs, but anything more complex (or with any more colors), and you're more or less screwed.
This is not just for DVD subs, but a generic subtitle rendering framework, which will be extended in the future. It may also get other methods of blending the subs onto the frame, eventually.
rack04
22nd October 2012, 21:06
Is there a way to determine if LAV Filters is actually using DXVA? I'm trying to experiment with the different video decoders to see which one performs better (i.e. less dropped frames with madVR) with a i5-2540M Sandy Bridge and Intel HD Graphics 3000. Unfortunately I am running Windows XP so I don't have access to QuickSync.
nevcairiel
22nd October 2012, 21:17
DXVA in LAV also does not work on XP, you should seriously consider upgrading.
LoopinFool
22nd October 2012, 21:28
Minor issues with deinterlacing:
Force YADIF Deinterlacing. Render a RAW file in the YUY2 colorspace. Both the input and output colorspaces are YUY2 and no deinterlacing happens. I suspect a performance optimization to simply pass the data to the output in that case, but not checking if YADIF needs to happen.
Strange side note: I disabled YUY2 output to make the decode filter convert to UYVY. With the EVR, that enabled YADIF, but with the default Video Renderer, it did not. It was converting to UYVY in both cases. Weird.
I don't know how Field Order: Auto is implemented, but I fed it an interlaced 720x576 25fps WMV clip. It did not select the proper top-field-first mode by default. Both the PAL frame height and frame rate are good clues in this case.
- LoopinFool
rack04
22nd October 2012, 21:29
DXVA in LAV also does not work on XP, you should seriously consider upgrading.
It's a company laptop and for some reason they refuse to move to Windows 7.
pankov
22nd October 2012, 22:25
... Currently the only way to show PNG images on my PC with a media player seems to be AviSynth.
madshi,
you can use DCoder's Image source
http://www.dsp-worx.de/index.php?n=13
(also available through Zoom Player's Install center)
In Zoom Player there is a simple switch called
"User internal JPEG / BMP / PNG image decoder ....."
that controls how ZP will render the images.
rack04
23rd October 2012, 01:52
Forgive me, but I'm going to attempt to describe a bug that I have experienced in the hopes of narrowing down the culprit.
When I playback this (http://playlist.yahoo.com/makeplaylist.dll?sid=132987236&sdm=web&pt=rd) file I get choppy playback (i.e. dropped frames shown by madVR) when using "NVIDIA CUVID" video decoder. The video plays back without dropped frames using "None" and "DXVA (copy-back)" video decoders.
I am using the following software:
Windows 7 Ultimate X64 SP1
Geforce 306.97
LAV Filters 0.52.0
madVR 0.84.3
Reclock 1.8.7.9
MPC-HC 1.6.5.6093
The problem might be my 8800GT is too slow because the video plays without dropped frames with "NVIDIA CUVID" video decoder if I reset madVR to default settings (i.e. not using Jinc upsizing). Although it's strange because I don't get dropped frames with Jinc enabled with "None" and "DXVA (copy-back)" video decoders.
Joniii
23rd October 2012, 08:28
LAV filters works fine on WMC LiveTV and recorded TV except REW/FWD. Would it be possible to get those working on LAV Video?
madshi
23rd October 2012, 08:33
madshi,
you can use DCoder's Image source
http://www.dsp-worx.de/index.php?n=13
(also available through Zoom Player's Install center)
In Zoom Player there is a simple switch called
"User internal JPEG / BMP / PNG image decoder ....."
that controls how ZP will render the images.
Does it support high bitdepth? I kinda doubt that...
pankov
23rd October 2012, 09:02
I'm not sure but sadly I don't know how to test it. The images that you posted earlier do open but I can't tell if they are down converted to 8bit
madshi
23rd October 2012, 09:14
Well, the source filter is from 2005, by that time madVR didn't exist, nor any other renderer which would accept anything other than 8bit. So I very highly doubt this 2005 source filter is capable of outputting any other than 8bit RGB. It would be near to a miracle, to be honest. Well, you can easily check: What does the Media Type information in MPC-HC report for the madVR input pin?
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.