View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
Jacinto
15th October 2012, 19:25
Hi, can lav filters play order chapters?
RealSnoopyDog
15th October 2012, 21:03
Does anyone know a tool where i can cut out a piece from a full HD .ts file? There is a glitch in it and all versions of LAV video > 0.51.3-28 crash when i play it back. Versions <= 0.51.3-28 succeed.
bejita7
15th October 2012, 21:07
Hi, can lav filters play order chapters?
No, and I hope it will be added to lav splitter soon...
CiNcH
15th October 2012, 21:10
Does anyone know a tool where i can cut out a piece from a full HD .ts file?
Why don't you use TSPlayer from the DVBViewer members section?
Aleksoid1978
15th October 2012, 22:32
Does anyone know a tool where i can cut out a piece from a full HD .ts file? There is a glitch in it and all versions of LAV video > 0.51.3-28 crash when i play it back. Versions <= 0.51.3-28 succeed.
http://www.videohelp.com/tools/tsMuxeR
Aleksoid1978
16th October 2012, 07:19
Hi nevcairiel - in this file http://aleksoid.tosei.ru/Test/Sample/mpg/Kylie.Minogue.-.Where.The.Wild.Roses.Grow.(Ultimate.Kylie).mpg
LAV Splitter do not detect subtitle track;
nevcairiel
16th October 2012, 09:32
Can't be fixed properly. mpg files don't have any information which streams are in the file, so if you have subtitles that don't show any subtitles in the first minute or so, it won't be detected. The only solution would be to try to scan even further into the file, which causes a lot slower startup. mpeg-ps is not a good format for anything.
madshi
16th October 2012, 10:20
Not a big thing, but I just tried forcing LAV to output AYUV and I failed. I've selected AYUV only and removed all other checkboxes. Ok, the video file is 4:2:0. But LAV sends it as NV12, although NV12 is unchecked. Is that as intended? Maybe LAV refuses to upsample chroma? That would be alright with me. But then I think the settings dialog should behave accordingly. Meaning that it should not allow both NV12 and YV12 to be deselected at the same time. Or if it does allow that, LAV should refuse the connection, if no other matching color format can be found. Basically this could be fixed in various different ways. But I think the current logic to allow deactivation of NV12, but then still sending NV12, is confusing.
nevcairiel
16th October 2012, 10:27
The way its setup right now is that for every pixel format it has a list of preferred formats which it tries, for 4:2:0 thats NV12, YV12, YUY2, UYVY, RGB32, RGB24 (in that order), if none are enabled, it currently falls back to the default format, which is NV12.
I suppose i can change this fallback behavior to try to pick the first format which is actually enabled, instead of directly going to NV12.
Additionally, i could also add the 8-bit 4:4:4 formats to the preferred list for 4:2:0 and 4:2:2, after RGB (because 4:4:4 is badly supported on most renderers)
madshi
16th October 2012, 11:01
Personally, I like the ffdshow logic in this case, which is like this:
(1) Don't allow to deselect every pixel format. At least one must stay enabled. It simply makes no sense to disable every pixel format.
(2) Don't ever use a pixel format which was unchecked. The user probably has it disabled for a reason.
Maybe this is too difficult to realize, though, because it would require you to support any possible chroma, color and bitdepth conversions in any direction and combination. Maybe an alternative solution would be to change the pixel format settings logic. E.g. you could add a combobox for every possible input pixel format, and each combobox would only contain those output formats you support for that specific input pixel format. This way it would be 100% clear what happens. But that would be a lot of comboboxes, so maybe not a good idea. Another solution would be to always keep one of the "preferred formats" checked. If the user removes the last checkbox of the "preferred formats", automatically check NV12 again. Something like that.
Just my 2 cents, though.
nevcairiel
16th October 2012, 11:14
Maybe this is too difficult to realize, though, because it would require you to support any possible chroma, color and bitdepth conversions in any direction and combination.
It can already do that, i made it a point to not crash or fail if for some reason i get tricked into outputting some odd format.
Some conversions might just be slow or bad quality (because they use swscale instead of my hand-written code) - and YCgCo might fail (but it already fails if you output it directly to EVR)
I can certainly make it choose an active format if everything else is turned off, either by just using whatever format is enabled and first in the list, or i change my priority lists to include *all* formats, so every input format has a mapping to every output format - that way we can actually get proper prioritization (ie 4:2:2 8-bit would choose 4:2:2 10-bit over 4:2:0 10-bit if everything 8-bit is off).
I don't like hiding too much trickery in the options panel, but maybe one small trick to auto-select NV12 if the user disables everything else might work.
(2) Don't ever use a pixel format which was unchecked. The user probably has it disabled for a reason.
I kinda disagree with that. Most users have no clue what they are doing.
madshi
16th October 2012, 11:34
It can already do that, i made it a point to not crash or fail if for some reason i get tricked into outputting some odd format.
Some conversions might just be slow or bad quality (because they use swscale instead of my hand-written code) - and YCgCo might fail (but it already fails if you output it directly to EVR)
I can certainly make it choose an active format if everything else is turned off, either by just using whatever format is enabled and first in the list, or i change my priority lists to include *all* formats, so every input format has a mapping to every output format - that way we can actually get proper prioritization (ie 4:2:2 8-bit would choose 4:2:2 10-bit over 4:2:0 10-bit if everything 8-bit is off).
"or i change my priority lists to include *all* formats" sounds pretty good to me!
I don't like hiding too much trickery in the options panel, but maybe one small trick to auto-select NV12 if the user disables everything else might work.
Either that, or maybe you could make the last checked checkbox read-only, so that the user simply can't uncheck everything.
Most users have no clue what they are doing.
I won't argue with that. But then, I don't find it a good solution to program a settings dialog like "ok, you've configured me like this, but you probably don't know what you're doing, so I'll just go ahead and ignore what you configured". With a logic like that, why having a settings dialog in the first place? :p
alexirion
16th October 2012, 21:12
Hello,
I'm using lav 0.51.2. Audio bitstreaming of DTS-HD MasterAudio and DolbyTRUE-HD is working via the ATI 5570 HDMI output, connected to the Cambridge Audio Azur 650R receiver.
However, when I play a Bluray with DTS-HD High Resolution I don't have sound from the receiver (it does not show an input signal). When I then once switch to a DTS-HD Master Audio track and go back to the DTS-HD High Resolution stream, the receiver shows DTS-HD Master Audio as input and I have sound, but sound is quiter than usual and the rearspeaker channels are wrongly mixed - so this is not an option for the true movie experience.
I can play the exact same Blueray with PowerDVD 10 and bitstreaming of DTS-HD MasterAudio is working there, the receiver shows the right input format. So from the hardware and driver side everything looks good.
Now, it would be great if it would also be possible to bitstream DTS-HD-HR with lav audio. Can someone help me, please?
Otherwise, I can play the DTS-HD HR file using lav and dtsdecoder.dll, when I disable bitstreaming in the lav audio settings, but there I can not distinguish between DTS-HD MA and DTS-HD-HR with the bitstreaming settings. It would be very good, if this would be possible !! Then I would still have bitstreaming for MA and only disclaim it for HR.
Kind regards,
--Alex
nevcairiel
17th October 2012, 08:19
Decoding of DTS-HD MA is perfectly lossless with the dtsdecoderdll.dll, so if you have issues with DTS-HD bitstreaming and you already have access to the DLL, i suggest you simply use it.
Some devices seem to have issues with DTS-HD HRA bitstreaming, but since it works just fine on my receiver, i cannot really test anything.
Joniii
17th October 2012, 08:24
About the YCbCr and RBG.
I've always set it like this:
BD is 8-bit YCbCr 4:2:0, television processing chips usually do internal processing in YCbCr 4:2:2, so 4:2:2 would be the preferred output mode in CCC to avoid television from doing any extra subsampling\upsampling before finally displaying on RGB.
I've newer touched the ffdshow or LAV color space setting, so I don't really know how that works on the PC. When having 4:2:0 BD, CCC output set as YCbCr 4:2:2 and using Windows EVR, what should I select from from LAV setting, should I select output format as 4:2:0 or 4:2:2?
I dont really understand how this works on the PC, I mean what conversions are done to BD YCbCr 4:2:0 before the GPU sends it as YCbCr 4:2:2?
madshi
17th October 2012, 08:56
Usually everything will be converted to RGB first. Then, if you've set YCbCr 4:2:2 output, NVidia will convert RGB back to YCbCr 4:2:2 before sending the data to the TV. So all you've done is doing the RGB -> YCbCr conversion on your GPU instead of letting the TV do it. I think letting the TV do it is better because then there's no doubt about which decoding matrix should be used. If you send YCbCr to your TV, the TV will have to "guess" whether it should use BT.601 or BT.709 for conversion to RGB. And your GPU will also "guess" which matrix to use for converting RGB to YCbCr. If those 2 guesses don't match exactly, colors will get screwed up. Furthermore, if your GPU sends 8bit YCbCr to your TV, and if it's not untouched YCbCr but converted from RGB, you might get banding problems as a result.
Some people say that when using Overlay, some GPUs may output YCbCr 4:2:2 without first going to RGB, but I have my doubts whether this is really true. Maybe it's true for some GPUs, but even then, that would only work if you used Overlay instead of EVR.
Joniii
17th October 2012, 09:13
Thanks, that makes sense.
So this is how it would be best set?
(BD) YCbCr 4:2:0 -> (LAV) YCbCr 4:2:0 untouched -> (EVR) RGB? -> (Catalyst) RGB Limited(or full?) 4:4:4.
madshi
17th October 2012, 09:32
The proof is in the pudding, trust your eyes. Every display is different. So it shouldn't harm trying different combinations to check what is best. If you ask me, of course you should use madVR instead of EVR... :)
nussman
17th October 2012, 11:12
Shouldn't we all use Display's with 4:4:4 RGB support for the best quality? http://www.avsforum.com/t/1381724/official-4-4-4-chroma-subsampling-thread
Most TV's seems to convert to YCbCr 4:2:0 or YCbCr 4:2:2 first. This is not necessary for HTPC's because all is done in RGB?
Joniii
17th October 2012, 11:36
The proof is in the pudding, trust your eyes. Every display is different. So it shouldn't harm trying different combinations to check what is best. If you ask me, of course you should use madVR instead of EVR... :)
Yeah, but I can only dream about madVR now. I'm stuck with WMC if I wan't to keep my LiveTV, Blu-ray, Music and Picture library :/
I've never seen much difference in different formats, but some annoying perfectionist in me will not be satisfied before I understand the whole chain on PC.
So, Blu-ray YCbCr 4:2:0 is not upsampled in LAV video if its so selected in the settings, but after that where does the conversion to RGB occur and is it Limited or Full? And after that it goes directly to GPU without any software touching it again (except CCC if output format differs from RGB)?
madshi
17th October 2012, 11:46
It also depends on the media player (e.g. does it use a custom mixer?). But usually when using EVR and setting LAV to output 4:2:0, EVR is responsible for all conversions. Which means that ultimately the GPU does the conversions. Whether the conversions are done to video or PC levels RGB depends on various GPU driver settings. IIRC both AMD and NVidia have extra settings for YCbCr -> RGB video conversion, in addition to the GPU output PixelFormat setting. And both of those settings influence each other. So you'll have to check with a test pattern to make sure. madVR bypasses some of the GPU stuff, so for madVR only the GPU PixelFormat setting counts, not the other settings.
nevcairiel
17th October 2012, 11:48
With progressive content and EVR i would usually advice to let LAV convert to RGB, however with interlaced content you lose the ability to use EVRs deinterlacing. This might not be a problem with NVIDIA, because you can activate CUVID deinterlacing in LAV, but that only covers one GPU vendor.
madshi
17th October 2012, 11:54
With progressive content and EVR i would usually advice to let LAV convert to RGB, however with interlaced content you lose the ability to use EVRs deinterlacing.
Would it make sense for EVR users to have this configuration available automatically somehow? I think currently they'd have to switch between RGB and NV12 output all the time, depending on whether the source is interlaced or progressive, correct? Not sure how to make such a setting available without confusing anyone, though.
nevcairiel
17th October 2012, 11:55
Would it make sense for EVR users to have this configuration available automatically somehow? I think currently they'd have to switch between RGB and NV12 output all the time, depending on whether the source is interlaced or progressive, correct? Not sure how to make such a setting available without confusing anyone, though.
Since EVR doesn't let you switch the pixel format after initial connection, i don't see how (at least with a certain degree of reliability)
Joniii
17th October 2012, 12:23
I think I understand it now, thank you Madshi and Nev. :)
Nev, why does LAV video sometimes display active codec as avcodec and sometimes as dxva2cp? If I have Media Center on full screen and start a playback, then check LAV Video setting it says avcodec. If I have Media Center windowed and start playback then it reports dxva2cp.
nevcairiel
17th October 2012, 12:30
DXVA2-CB doesnt work if you start it when WMC is already in exclusive mode. You can't access the D3D device anymore then.
mindbomb
17th October 2012, 15:08
With progressive content and EVR i would usually advice to let LAV convert to RGB, however with interlaced content you lose the ability to use EVRs deinterlacing. This might not be a problem with NVIDIA, because you can activate CUVID deinterlacing in LAV, but that only covers one GPU vendor.
well, theres also yadif for the other vendors, right?
Pat357
17th October 2012, 19:12
I can play the exact same Blueray with PowerDVD 10 and bitstreaming of DTS-HD MasterAudio is working there, the receiver shows the right input format. So from the hardware and driver side everything looks good.
It would be very good, if this would be possible !! Then I would still have bitstreaming for MA and only disclaim it for HR.
Does DTS-HR bitstreaming work with PowerDVD10 or any other software ?
Sebastiii
17th October 2012, 19:35
I have the same issue with DTS-HR and only PDVD make it work. Arcsoft TMT didn't work.
Pat357
18th October 2012, 09:56
I have the same issue with DTS-HR and only PDVD make it work. Arcsoft TMT didn't work.
Not sure what you mean; you've had only problems with *bitstreaming* DTS-HR using ArcSoft ? Does PDVD work with bitstreaming DTS-HR ?
Then don't use bitstreaming; let LAV-Audio decode the DTS HR/MA (and other formats).
Letting LAV decode anything should always work, because your receiver will always get HQ PCM.
Voila, another problem solved ! ;)
nevcairiel
18th October 2012, 10:30
For people wondering when the next version will be released, the current plan is to add an option to be able to disable DVD Video support in LAV Video (in case its unstable and people want an easy way to get rid of it), and then after some final testing release the final version on the weekend. So stay tuned.
Joniii
18th October 2012, 15:32
Why does LAV Video Decoder use YV12 on WMP & WMC and NV12 on MPC-HC? I have all output formats unchecked except NV12 and YV12.
nevcairiel
18th October 2012, 15:37
Why does LAV Video Decoder use YV12 on WMP & WMC and NV12 on MPC-HC?
It uses what the renderer requests to be used. LAV prefers NV12, but if the renderer wants YV12, so be it.
I have all output formats unchecked except NV12 and YV12.
Why would you do that?
Joniii
18th October 2012, 15:49
It uses what the renderer requests to be used. LAV prefers NV12, but if the renderer wants YV12, so be it.
Thanks for the info.
Why would you do that?
Just testing, I unchecked everything else to see which format is used on WMC as default.
cyberbeing
18th October 2012, 16:56
In your latest Git revisions, if you have v210/v410 enabled as both input and output format, an endless loop of LAV Video->LAV Video->LAV Video->and so on... is created when "Render Media File" is used in GraphEdit/GraphStudio.
Joniii
18th October 2012, 17:16
DXVA2-CB doesnt work if you start it when WMC is already in exclusive mode. You can't access the D3D device anymore then.
How did they make DXVA work on ffdshow in exclusive mode?
RGB output doesn't seem to work, I get constant display driver stopped working errors. That's with Windows 8 RTM from Technet and Catalyst 12.8.
Sebastiii
18th October 2012, 17:55
Not sure what you mean; you've had only problems with *bitstreaming* DTS-HR using ArcSoft ? Does PDVD work with bitstreaming DTS-HR ?
Then don't use bitstreaming; let LAV-Audio decode the DTS HR/MA (and other formats).
Letting LAV decode anything should always work, because your receiver will always get HQ PCM.
Voila, another problem solved ! ;)
Yeah, i use LAV Audio to decode with arcsoft.dll :)
That i would like to explain is when i try to use *bitstreaming* DTS-HR works only with PowerDVD (all other format works with LAV Audio / Arcsoft / PowerDVD) so it's seems that my HARMAN need some special INIT that PowerDVD is only the one to do it.
Thanks :)
sweatherly
18th October 2012, 20:21
If I set the option in LAV Splitter to 'demux sub-streams separately' and un-tick 'TrueHD' in the 'formats' tab of LAV Audio shouldn't the AC3 core track be heard when I play the file?
I do not get hear an audio in this case but expected 2 streams to be presented from the splitter, and the decoder to support the decoding of the AC3 track but not understand the HD track.
If this is not expected to work, any chance of a feature request to allow the selection of how to present tracks with that have substreams (e.g. as-is, present HD track only, present core track only - much like the MPEGSplitter from MPC-HC has)?
egur
18th October 2012, 22:29
How did they make DXVA work on ffdshow in exclusive mode?
RGB output doesn't seem to work, I get constant display driver stopped working errors. That's with Windows 8 RTM from Technet and Catalyst 12.8.
A HW acceleration device can be created if the decoder asks EVR for specific interface. It's a little more complicated than that, but it's possible.
The main issue is that when the video decoder is connected to the splitter, it's not connected yet to the renderer and thus fails to create the HW device. If the decoder filter postpones this operation until its fully connected it can succeed.
Maybe this feature is not high on the todo list as it complicates the filter design.
Dodgexander
18th October 2012, 23:07
I am using MPC to play back .wtv files recorded in windows media center. The files contain mpeg2 pal video and 192kbps 48khz stereo. I have disabled the stream buffer source and enabled .wtv in lav splitter. The lav splitter is being used, but for some reason occasionally there is an audio stutter via spdif, in some programmes more heard more often than others. Its kind of a flickering sound. I haven't heard this until recently, so I wondered if it could be induced by something that has changed in a recent update.
My hardware is a Xonar HDAV and I have reclock as the renderer. The Same occurs without reclock in the chain.
Any suggestions?
DragonQ
19th October 2012, 00:07
Could it be a discontinuity in the recording? I would advise running recordings through TS-Doctor but WTV is a proprietary format so you'd need to convert them to TS first.
nevcairiel
19th October 2012, 06:58
In your latest Git revisions, if you have v210/v410 enabled as both input and output format, an endless loop of LAV Video->LAV Video->LAV Video->and so on... is created when "Render Media File" is used in GraphEdit/GraphStudio.
This is why i didn't want to deal with uncompressed formats really, but somehow i got talked into supporting v210 because someone wanted to get the ability to dither it to 8-bit.
I guess i'll add a check to protect against multiple loading in the same graph branch..
How did they make DXVA work on ffdshow in exclusive mode?
ffdshow only supports whats called "Native DXVA", which works a bit different than the "Copy Back" mode.
LAV also supports native mode, and it will also work in WMC.
The disadvantage of native mode is that you cannot use VSFilter (or any other post-processor)
Even if Copy-Back would be made to access the D3D device the same way Native does, it would only work if the decoder is directly connected to the renderer, so still no post-processor.
aufkrawall
19th October 2012, 12:34
Nev, most likely CUDA 5 didn't change anything regarding decoding of WMV3? :(
nevcairiel
19th October 2012, 12:36
Those new CUDA versions have no influence on the decoder. If something changes, you will automatically get it through the driver. They haven't changed the CUVID API function since CUDA 2 or so.
In any case, WMV3 is a cheap format, hardware decoding is rather irrelevant, so i have zero interest in spending any time on it.
aufkrawall
19th October 2012, 15:22
Those new CUDA versions have no influence on the decoder. If something changes, you will automatically get it through the driver. They haven't changed the CUVID API function since CUDA 2 or so.
Interesting, thanks.
In any case, WMV3 is a cheap format, hardware decoding is rather irrelevant, so i have zero interest in spending any time on it.
Are you sure that it's cheap?
Got a 1080p30 vid with ~35mbit and it has quite some load on CPU/VPU.
SassBot
19th October 2012, 15:39
Then convert it to a hardware accelerated codec and shave off the wasted space.
mindbomb
19th October 2012, 18:24
Quick question:
Why is the intel decoder named quicksync, after the api, but the nvidia decoder isn't named cuda?
nevcairiel
19th October 2012, 18:25
Because the decoding api is called CUVID? :P
mindbomb
19th October 2012, 18:37
so intel doesnt have a different name for its decoding api?
LoopinFool
19th October 2012, 20:56
so intel doesnt have a different name for its decoding api?
Quick Sync Video is Intel's name for its video encoding/decoding API.
CUVID is nVidia's name for its video decoder API, which is built on top of CUDA. CUVID is a more accurate name for the API being used.
DirectShow is built on top of the Windows API, but it's better to call it DirectShow because that's more specific. Same for CUVID.
- LoopinFool
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.