View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
MokrySedeS
9th August 2013, 23:49
I was messing around with advanced subtitle selection mode in lav splitter and I'm not sure if it's a bug or if I'm misunderstanding something.
I tried this formula: pol:pol|f *:pol
According to README this part: "*:pol", means "If audio is not Polish, load Polish subtitles".
Now, what happens is that Polish subtitles (not forced) are loaded even when audio is also Polish.
Am I missing something?
Volfield
10th August 2013, 05:42
pol:pol|f = if audio is polish load polish subs forced
*:pol = if any audio load polish subs
I think i works that way
MokrySedeS
10th August 2013, 06:15
Thanks Volfield. Looks like I was tired :o
In the morning it became obvious that I need "pol:off" in the middle, like this:
pol:pol|f pol:off *:pol
So, of course, there's no bug :D
EDIT:
Another issue - README mentions an "h" flag for selecting sdh subtitles.
How do I make it work with mkv? AFAIK there's no way to set a track as sdh other than simply write it in a track name.
Casshern
10th August 2013, 15:13
I found two problems with the lav-filters. First the splitter cannot find any audiotracks on the "New World" (Hong Kong Bluray) main m2ts file - the old MPC Splitter works! Also on some Criterion BDs (e.g. Things to Come) the PCM mono audio track is not played back properly (stuttering) - with ffdaudio (instead of lav-audio) it works. I will try to provide samples later via PM, but it might take a while. Apart from these minor issues, everything works pretty solid.
nevcairiel
10th August 2013, 16:33
Another issue - README mentions an "h" flag for selecting sdh subtitles.
How do I make it work with mkv? AFAIK there's no way to set a track as sdh other than simply write it in a track name.
You can't. It can only work on formats which have such an attribute, like DVB recordings.
Carpo
11th August 2013, 20:36
I broke my cherry!!!! Finally got Lav to compile!!! :) - now to see if it works - hehehehe - and then dare i try the dev branch :p
ƒreeman
12th August 2013, 11:51
In lav audio, should I use internal dca codec or should I use dtsdecoder by arcsoft..?
Which of them 'll be better and what's the difference?
Anyway, this is the file i'm tryin to play..
http://i41.tinypic.com/vqh3cg.png http://i41.tinypic.com/rid79i.png
So, what's this 32bit Float in dca codec and 24bit Integer in dts codec..?? Which is good..?
NikosD
12th August 2013, 12:55
@nevcairiel
As the developer of NVCUVID MPEG-4 ASP decoder do you have any clue why that decoder is EXTREMELY slow on my signature system ?
To be more exact, EVERY NVCUVID decoder is extremely slow on my system, not only MPEG4-ASP.
It's slower than DXVA copy-back which is already a lot slower than DXVA native.
My RAM is slow DDR2-533MHz and PCI-E is v1.1 x4 speed (very slow).
Does the CUVID MPEG4-ASP use any copy-back mechanism ?
In what mode exactly does it use DXVA ?
One last thing.
For the other decoding formats, DXVA native is extremely fast.
How difficult is for you to implement a DXVA native decoder for MPEG4-ASP ?
NVIDIA should have the resources (examples, documentation etc) to make it easier for a developer.
nevcairiel
12th August 2013, 12:57
The GT610 is a very slow card, it has a very low memory bandwidth, so any decode operations that copy the image from the GPU back to memory like CUVID or DXVA2-CB will simply be slow.
Having slow RAM and slow PCIe does not help.
There are no plans for MPEG4-ASP DXVA support. It would not be very hard, but i simply have zero interest in it. Use software decoding, those files are usually very easy to decode.
NikosD
12th August 2013, 13:10
Not all of them.
DIVX HD (1080p24 or 30) is pushing my system a lot, because software decoder IS NOT MULTITHREADED.
DXVA native could be useful for older machines with slow cards/cpus.
Or at least a decent MT CPU decoder.
The time management and priorities are yours, but in case you are really bored sometime, take a second thought.
wanezhiling
12th August 2013, 17:33
http://pan.baidu.com/share/link?shareid=283883871&uk=3558042035
Hi nev, after seek: http://i.imgur.com/Cl3oRm8.png
Happens with avcodec and dxva, works fine with wmv9 dmo decoder, mpc-be(sw/dxva) works fine too.
Gleb Egorych
12th August 2013, 18:00
The GT610 is a very slow card, it has a very low memory bandwidth, so any decode operations that copy the image from the GPU back to memory like CUVID or DXVA2-CB will simply be slow.
nevcairiel, which minimal nvidia card would you recommend for HTPC with LAV filters?
nevcairiel
12th August 2013, 18:06
Right now, probably a GT 640 (the 630 is a Fermi rebrand), preferably with GDDR5 for better memory bandwidth, but DDR3 may work.
I don't usually shop at the low-end, so maybe you can go lower for some workloads, not much experience myself.
The x10 and x20 are generally too slow, and the x30 are probably the first to be OKish, if they are not rebranded from the previous generation (like the 630)
nevcairiel
12th August 2013, 18:25
http://pan.baidu.com/share/link?shareid=283883871&uk=3558042035
Hi nev, after seek: http://i.imgur.com/Cl3oRm8.png
Happens with avcodec and dxva, works fine with wmv9 dmo decoder, mpc-be(sw/dxva) works fine too.
Fixed
wanezhiling
12th August 2013, 18:40
:thanks:
NikosD
12th August 2013, 19:12
If you like DXVA native, even GT610 can do everything that DXVA does.
Even 1080i of every difficulty I have tried.
If you don't like EVR, go directly to a GT640.
Gleb Egorych
12th August 2013, 19:21
nevcairiel, thanks. Kepler 630 also exists but with DDR3 only. Kepler+GDDR5 is only in 640+ and no passive cards.
e-t172
12th August 2013, 21:19
In lav audio, should I use internal dca codec or should I use dtsdecoder by arcsoft..?
Which of them 'll be better and what's the difference?
There is no difference for "basic" DTS audio streams. However, for DTS-HD MA audio streams (such as the ones you can find on Blu-rays), the ArcSoft decoder will have the best quality since it is able to decode the full lossless stream, while the dca (ffmpeg) decoder is only able to decode the DTS (lossy) core.
In your screenshot your input is basic DTS (otherwise it would show "dts-hd ma" when using the ArcSoft decoder), so there is no difference.
So, what's this 32bit Float in dca codec and 24bit Integer in dts codec..?? Which is good..?
The output sample format in itself doesn't matter. It is not humanly possible to ear the difference between 32bit float and 24bit int. The difference in output sample formats between the two decoders basically boil down to boring implementation details.
6233638
13th August 2013, 03:34
Right now, probably a GT 640 (the 630 is a Fermi rebrand), preferably with GDDR5 for better memory bandwidth, but DDR3 may work.
I don't usually shop at the low-end, so maybe you can go lower for some workloads, not much experience myself.
The x10 and x20 are generally too slow, and the x30 are probably the first to be OKish, if they are not rebranded from the previous generation (like the 630)I have a GT610 that I bought as a temporary card when my GTX570 died. I may be mistaken, but I think I managed to get hardware accelerated decoding working with madVR. I certainly managed to get madVR playback working, as I would have returned the card if that were not the case - but I may have resorted to software decoding, or DXVA Native.
That said, I agree that buying a GDDR5 card would be a much better choice. I only picked the GT610 because it was the cheapest card I could get locally with an HDMI output (the next option being double the price) and because I needed something that day.
NikosD
13th August 2013, 09:18
I did some tests today with figures and monitoring of all GPU sensors.
For every decoder I tried with EVR renderer (H.264, VC-1, MPEG-2,MPEG-4 ASP, WMV3) the performance of NVCUVID was about 32 fps, with very little VPU utilization - meaning that there is definitely a bottleneck in the card.
But all the sensors (GPU Load, Video Bus Load, Memory Controller etc) were low - definitely not bottlenecks - and the GPU clocks were at the maximum.
It seems that low RAM and PCI-E speed don't affect so much the video performance.
So the bottleneck is mainly inside the architecture of the card.
Doing the same thing with DXVA-CB and all of the above decoders, the performance was almost 40% higher - 44 fps - with increased but still low VPU utilization
I saw a major CPU utilization too that helps the copy-back mechanism, not seen before with NVCUVID.
NVCUVID doesn't look good with this card, there are optimizations missing ( internal structure of NVCUVID and lack of information probably for the developers - black box)
DXVA-CB is far better (why ?) but still only 40% of DXVA native.
DXVA native works like a charm.
chano22000
13th August 2013, 10:28
For Nvidia fans, there is a confidential but interesting GTX650 board from Zotac (http://www.zotacusa.com/fr/geforce-gtx-650-lp-zt-61008-10m.html). I purchased it some months ago to replace the embedded GT 9300 GPU from my older Intel E5200 based HTPC.
The board is Fermi based (the HW decoding unit and especially the deinterlacer is quality wise on par with Radeon according to HQV 2.0 test by Anandtech), low profile (the only LP Fermi board to my knowledge as there is probably no LP reference design by Nvidia which is not the case for AMD with the similar Radeon 7750), has GDDR5 memory, very low power consumption (PCI-E powered, no PSU connection needed, no requirement to upgrade PSU), remains silent for HTPC use (fan is near idle (16% speed) when using LAV HW decoding and madVR), has enough shaders (384) to support madVR highest qualiity settings and smooth motion.
Kind regards.
6233638
13th August 2013, 17:50
NVCUVID doesn't look good with this card, there are optimizations missing ( internal structure of NVCUVID and lack of information probably for the developers - black box)
DXVA-CB is far better (why ?) but still only 40% of DXVA native.
DXVA native works like a charm.CUVID is slower on all Nvidia GPUs. It's nothing specific to your card.
DXVA2 Copy-Back has been the preferred method of hardware acceleration for some time. (and DXVA2 Native if you need the speed)
Pat357
13th August 2013, 17:55
Not all of them.
DIVX HD (1080p24 or 30) is pushing my system a lot, because software decoder IS NOT MULTITHREADED.
DXVA native could be useful for older machines with slow cards/cpus.
Or at least a decent MT CPU decoder.
I'm not sure about the LAV-implementation, but IIRC the MPEG4-ASP decoder used in FFMPEG (FFplay) is multi-threaded.
What CPU do you have ?
Codecs:
D....... = Decoding supported
.E...... = Encoding supported
..V..... = Video codec
..A..... = Audio codec
..S..... = Subtitle codec
...S.... = Supports draw_horiz_band
....D... = Supports direct rendering method 1
.....T.. = Supports weird frame truncation
......F. = Supports frame-based multi-threaded decoding
......S. = Supports slice-based multi-threaded decoding
......B. = Supports both frame-based and slice-based multi-threaded decoding
.......F = Supports frame-based multi-threaded encoding
.......S = Supports slice-based multi-threaded encoding
.......B = Supports both frame-based and slice-based multi-threaded encoding
--------
DEVSDTBB mpeg4 MPEG-4 part 2
nevcairiel
13th August 2013, 18:25
MT for MPEG-4 is disabled in LAV because many MPEG-4 bitstreams are not fully compatible with MT decoding, especially those that use packed B frames in AVI.
sebas_led
13th August 2013, 19:18
MT for MPEG-4 is disabled in LAV because many MPEG-4 bitstreams are not fully compatible with MT decoding, especially those that use packed B frames in AVI.
Hi Nev:
Can an application decode two MPEG-4 files at the same time (using LAV filters)?
nevcairiel
13th August 2013, 19:20
Of course, as long as your system is fast enough, you can decode multiple files at the same time.
sebas_led
13th August 2013, 19:31
Thanks! :)
DragonQ
14th August 2013, 10:38
CUVID is slower on all Nvidia GPUs. It's nothing specific to your card.
DXVA2 Copy-Back has been the preferred method of hardware acceleration for some time. (and DXVA2 Native if you need the speed)
CUVID is the only way to get hardware deinterlacing before post-processing though.
Mangix
14th August 2013, 23:13
CUVID is slower on all Nvidia GPUs. It's nothing specific to your card.
DXVA2 Copy-Back has been the preferred method of hardware acceleration for some time. (and DXVA2 Native if you need the speed)
CUVID forces higher clocks while DXVA2(native or CB) does not. Lower clocks can sometimes cause issues.
Vasilich
15th August 2013, 06:58
Lower clocks can sometimes cause issues.what kind of issues can it cause?
Soukyuu
15th August 2013, 21:36
Sometimes your GPU will downclock because it's not getting enough load, but the downclocked state doesn't have enough power so the video stutters. So far I had it with some older games where I had to force my clock to max to be able to run them well, I guess that could happen with video as well.
Pat357
16th August 2013, 15:20
Sometimes your GPU will downclock because it's not getting enough load, but the downclocked state doesn't have enough power so the video stutters. So far I had it with some older games where I had to force my clock to max to be able to run them well, I guess that could happen with video as well.
It can happen indeed with video too : I have this problem when playing 1080p24 with LAV and MadVR, my GTX-680 clocks down to the lowest power state and I can see frame drops in MadVR OSD.
I solved this by creating an extra profile in NVidia CPL for all my players by setting the power/performance option on "prefer max performance".
Anima123
17th August 2013, 00:09
When I was trying to play an avi file with h.264 video, there's problem for mpc-hc to render the pin of the video in the graph to the video decoder of nav filters.
LAV Splitter Source (internal)::Video
Media Type 0:
--------------------------
Video: MPEG4 Video (H264) 736x414 29.97fps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {31435641-0000-0010-8000-00AA00389B71}
formattype: FORMAT_MPEG2_VIDEO {E06D80E3-DB46-11CF-B4D1-00805F6CBBEA}
bFixedSizeSamples: 0
bTemporalCompression: 1
lSampleSize: 1
cbFormat: 701
VIDEOINFOHEADER:
rcSource: (0,0)-(736,414)
rcTarget: (0,0)-(736,414)
dwBitRate: 0
dwBitErrorRate: 0
AvgTimePerFrame: 333667
VIDEOINFOHEADER2:
dwInterlaceFlags: 0x00000000
dwCopyProtectFlags: 0x00000000
dwPictAspectRatioX: 16
dwPictAspectRatioY: 9
dwControlFlags: 0x00000000
dwReserved2: 0x00000000
MPEG2VIDEOINFO:
dwStartTimeCode: 0
cbSequenceHeader: 569
dwProfile: 0x00000064
dwLevel: 0x00000033
dwFlags: 0x00000004
BITMAPINFOHEADER:
biSize: 40
biWidth: 736
biHeight: 414
biPlanes: 1
biBitCount: 24
biCompression: AVC1
biSizeImage: 914112
biXPelsPerMeter: 0
biYPelsPerMeter: 0
biClrUsed: 0
biClrImportant: 0
Any idea if the nav filter can handle these files in the future?
moffy
19th August 2013, 01:50
Hello,
I have just successfully compiled the latest LAVFilters. Thanks for all the advice and links to the development tools, for a while I would have torn my hair out, if I had any.
I am a bit confused about how the subtitles work? From the source code it looks like you only decode and render DVD subtitles. If so is there any plan of adding PGS subtitles?Or is there some subtlty as to how the subtitles are handled that I am missing?
Thankyou for your responses.
Mercury_22
19th August 2013, 15:42
Can somebody (Nev, Nvidia owners :)) please help me : I'm about to get a card (for an old PC) and I was wondering if there is any difference between an gtx 650 and an gtx 650 Ti when it comes to LAV (CUVID, DXVA) (and 3D blu-ray with TMT) ?
P.S. Again I'm interested only from LAV's (and 3D Blu-ray) standpoint, not for gaming or anything else :)
Rimsky
19th August 2013, 16:16
mkv container has option for cropping image
but all splitters/decoders ignore it
Can you realized that for lav splitter + lav video?
truexfan81
20th August 2013, 06:47
Can somebody (Nev, Nvidia owners :)) please help me : I'm about to get a card (for an old PC) and I was wondering if there is any difference between an gtx 650 and an gtx 650 Ti when it comes to LAV (CUVID, DXVA) (and 3D blu-ray with TMT) ?
P.S. Again I'm interested only from LAV's (and 3D Blu-ray) standpoint, not for gaming or anything else :)
Mercury_22 from what i saw on the specs the ti is only slightly different, i went with the gtx650, it works fine with LAV, i use dxva native and madvr.
specs as follows:
gtx650:
Base Clock (MHz) 1058
Memory Clock 5.0 Gbps
gtx650 ti:
Base Clock (MHz) 928 MHz
Memory Clock 5.4 Gbps
so the only difference i see is they traded some base clock speed for memory speed.
hopefully that helps
Mercury_22
20th August 2013, 08:27
Mercury_22 from what i saw on the specs the ti is only slightly different, i went with the gtx650, it works fine with LAV, i use dxva native and madvr.
specs as follows:
gtx650:
Base Clock (MHz) 1058
Memory Clock 5.0 Gbps
gtx650 ti:
Base Clock (MHz) 928 MHz
Memory Clock 5.4 Gbps
so the only difference i see is they traded some base clock speed for memory speed.
hopefully that helps
Thanks for your reply !
If I understand correctly you have a gtx 650 so if it's not too much can you comment /test on this Well, 29.97@59.94fps deinterlaced 1440*1080 and the 650Ti will stutter with J3AR.
truexfan81
20th August 2013, 09:15
Thanks for your reply !
If I understand correctly you have a gtx 650 so if it's not too much can you comment /test on this
with my gtx650 yes i can confirm what he said. i personally use lanczos3AR, i really can't see much of a difference between that and jinc. however i can tell you that madshi recommends a minimum of a gtx660 to be able to run everything with jinc3AR.
Mercury_22
20th August 2013, 09:24
with my gtx650 yes i can confirm what he said. i personally use lanczos3AR, i really can't see much of a difference between that and jinc. however i can tell you that madshi recommends a minimum of a gtx660 to be able to run everything with jinc3AR.
Thanks for your help !
nevcairiel
20th August 2013, 21:04
@truexfan81:
The big difference between the 650 and 650 Ti is the number of stream processors ("CUDA cores"), 384 on the 650 vs 768 on the 650Ti. This results in quite a difference in 3D/Shader performance. The clock differences are only marginal and can be ignored.
@Mercury_22:
For LAV alone there is no difference, both can do everything LAV offers. If madVR comes into play, and you want the absolute best with no compromise, the 650Ti is better, but i don't know 100% if it really can do everything.
I have a 660, and it at least does everything. :)
kolak
20th August 2013, 21:32
Any chance for "better" dithering- isn't swscale support error diffusion now?
nevcairiel
20th August 2013, 22:16
swscale is extremely slow, and for moving video error diffusions advantages aren't all that big anymore.
kolak
20th August 2013, 22:25
But other methods leave visible artefacts.
If it's so slow than no point anyway.
jkauff
21st August 2013, 01:59
I know nev recommends software decoding for LAV because the CPU can process many more frames per sec than either CUDA or QuickSync, and that's what I normally use. When I'm watching a movie while doing Handbrake encoding, though, I switch to QuickSync because HB is using 100% of my CPU. Frankly, I don't see a difference in performance or quality.
My question is, what does LAV do with all those extra frames in software mode? I only play movies, no anime or other stressful content. Is it worth switching modes, or should I just leave QS on all the time? Are there other benefits to software mode that make it preferable to QS?
nhakobian
21st August 2013, 02:46
I know nev recommends software decoding for LAV because the CPU can process many more frames per sec than either CUDA or QuickSync, and that's what I normally use. When I'm watching a movie while doing Handbrake encoding, though, I switch to QuickSync because HB is using 100% of my CPU. Frankly, I don't see a difference in performance or quality.
My question is, what does LAV do with all those extra frames in software mode? I only play movies, no anime or other stressful content. Is it worth switching modes, or should I just leave QS on all the time? Are there other benefits to software mode that make it preferable to QS?
For decoding, all H.264/AVC decoders are required to be bit-for-bit identical. Its encoding quality that suffers in hardware vs. software implementations (i.e. x264).
truexfan81
21st August 2013, 05:20
@truexfan81:
The big difference between the 650 and 650 Ti is the number of stream processors ("CUDA cores"), 384 on the 650 vs 768 on the 650Ti. This results in quite a difference in 3D/Shader performance. The clock differences are only marginal and can be ignored.
@Mercury_22:
For LAV alone there is no difference, both can do everything LAV offers. If madVR comes into play, and you want the absolute best with no compromise, the 650Ti is better, but i don't know 100% if it really can do everything.
I have a 660, and it at least does everything. :)
oops i picked the wrong one then :rolleyes:
NikosD
21st August 2013, 05:31
I know nev recommends software decoding for LAV because the CPU can process many more frames per sec than either CUDA or QuickSync, and that's what I normally use.
That is generally not true.
In fact, the opposite is more accurate.
Hardware decoders are generally faster and consume a lot less power than CPUs.
It depends on the CPU, Hardware Decoder, the codec and even the video sample you compare.
For example, most cpus are slower in VC-1 decoding compared to HW decoders.
Also large bandwidth clips favor HW decoders because of the internal structure.
Look at my signature for more.
nevcairiel
21st August 2013, 09:34
That is generally not true.
In fact, the opposite is more accurate.
Hardware decoders are generally faster and consume a lot less power than CPUs
This may have been so 5-6 years ago when your CPU was new, but today the CPUs with software decoders are much faster than AMDs or NVIDIAs decoders (on H.264/MPEG2). Only Intels decoder is able to keep up. VC-1 is slower to decode because there is no real good optimized decoder available, but on any recent CPU its not slower than AMD/NVIDIA solutions at least.
Even your test shows that on your own CPU, only QS is faster on H.264 on most clips. Only the extremely high bandwidth clips change that a bit, but those are rather rare in the real world, and any newer CPU would change that situation again.
Anyway, the bigger advantage for me in software decoding is that you don't have to rely on your GPUs drivers, which may be buggy, or have any of the restrictions that DXVA puts on to you. Software decoding will always work the same way on every system, while DXVA may not.
mzso
21st August 2013, 09:40
I ran into a dx50 video that plays fine with ffdshow/mplayer, but looks corrupted with LAV, here's a sample:
https://mega.co.nz/#!g0wHiSbR!N64PEETN6LDYkvsy1oEVMGWE-uZkxNhb4k5T1uLLsqw
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.