View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
FreeFall
7th November 2013, 13:30
How did you fix the subtitle timing problems with TrueHD audio, could this be a similar problem?
nevcairiel
7th November 2013, 13:34
The problem could indeed be the same, and I didn't fully understand it back then.
TrueHD caused some misbehavior in LAV that made it artificially limit its queue size to a very low amount, so the timing problem would be far more obvious. After fixing that problem, queues returned to their normal size, and timings seemed alright, so I didn't bother looking further.
But the underlying problem was probably the same, and should be fixed in the subtitle renderers. They should not wait for the next subtitle to draw the current one, because it could come much later in the stream.
FreeFall
7th November 2013, 13:43
Thanks, I'll create a ticket on mpc-hc's bug tracker with the sample and information gathered from your testing.
FreeFall
7th November 2013, 15:23
nevcairiel,
Here is the report, #3691 PGS Subtitle timing problems with TrueHD / LPCM audio
https://trac.mpc-hc.org/ticket/3691#tickethttp://
Thanks
LordX2
8th November 2013, 19:57
Hey guys - I am having a subtitle issue - and I hope its a simple one!
I am using: MPC-HC, madvr, and LAV Filters.
I see embedded subtitles on some MKVs, but not all. In fact I see them on maybe 10-20% and DONT see them on the rest.
When I right click in MPC-HC it shows the subtitles are available and that they are selected. But I see nothing.
I checked under LAV splitter settings - and Deliver only Forced subtitles is NOT checked - so it should use all subtitles.
I am stumped.
Guest
8th November 2013, 20:18
I see embedded subtitles on some MKVs, but not all. In fact I see them on maybe 10-20% and DONT see them on the rest. How did you make the MKVs that work versus those that don't?
LordX2
8th November 2013, 21:21
I did not make the MKV files so I am not sure what subtitle 'formatting' they may have.
Is there a way to check this on the MKVs I already have?
LordX2
8th November 2013, 21:38
Ok I found Mediainfo to look at the two different MKV Files.
Looks like the one that WORKS uses English, UTF-8 Subs.
The ones that do NOT work use: English, PGS subs.
Edit - I do not have Directvobsub or anything like that - just MPC-HC, madvr, LAV Filters
TheBlackRock
8th November 2013, 21:42
Hello I have been testing the LAV Video decoder on a Windows 7 machine with a GeForce GTX 680 graphics card. I have built a graph in GraphStudio to play an h.264 file. I have NVIDIA CUVID selected as the hardware acceleration mode, but when I play the file it appears as if hardware acceleration is not active (as shown in the attached screen shot). It was my understanding that the Decoder Properties dialog should have the word "Active" next to the hardware decoder drop down if hardware acceleration is actually being used. I get the same results when testing with an AMD 7970 card. Please let me know how I can get hardware acceleration to be active. Any help would be greatly appreciated. Thanks.
Guest
8th November 2013, 22:31
I did not make the MKV files so I am not sure what subtitle 'formatting' they may have. Please read and follow our forum rules, specifically rule 6. Your crossposts also violate forum rules.
@all
No help to be given on this issue.
NikosD
9th November 2013, 09:41
I've done some tests today with 3 different H.265 clips, regarding SW decoding performance of H.265 decoder.
System 1: Laptop Core2Duo T5500@1.66 MHz
System 2: Desktop Core2Duo E7400@2.83 GHz
Win 8 x64 - LAV filters 0.59.1 - DXVA checker 3.0 for both systems.
The results were very strange.
For some unknown reason a C2D@1.66GHz seems to perform very close to a C2D@2.83GHz.
CPU utilization (both cores used) was the same about 80% - 90% for both systems.
Desktop performance was ONLY 11% - 25% faster than laptop.
It should be at least 80% faster due to faster clock and internal architecture.
michkrol
9th November 2013, 09:43
Hello I have been testing the LAV Video decoder on a Windows 7 machine with a GeForce GTX 680 graphics card. I have built a graph in GraphStudio to play an h.264 file. I have NVIDIA CUVID selected as the hardware acceleration mode, but when I play the file it appears as if hardware acceleration is not active (as shown in the attached screen shot). It was my understanding that the Decoder Properties dialog should have the word "Active" next to the hardware decoder drop down if hardware acceleration is actually being used. I get the same results when testing with an AMD 7970 card. Please let me know how I can get hardware acceleration to be active. Any help would be greatly appreciated. Thanks.
Have you tried playing it in a video player like MPC-HC, it might be GraphStudio not working correctly.
Try using DXVA-copyback/-native instead of CUVID.
It's also possible this file is incompatible with CUVID/DXVA - not all h264 files are supported. A sample file I've found that works with DXVA:
http://xhmikosr.1f0.de/samples/Big_Buck_Bunny/Big_Buck_Bunny_480p_x264.mkv
If you're not a gamer, get newest DirectX (you need 9.0c updates even if you have dx10 installed): http://www.microsoft.com/en-us/download/details.aspx?id=35
Normally I'd say try updating your drivers, but I've heard there are problems with newest Nvidia drivers, so try using a little older version?
sneaker_ger
9th November 2013, 17:14
I've done some tests today with 3 different H.265 clips, regarding SW decoding performance of H.265 decoder.
System 1: Laptop Core2Duo T5500@1.66 MHz
System 2: Desktop Core2Duo E7400@2.83 GHz
Win 8 x64 - LAV filters 0.59.1 - DXVA checker 3.0 for both systems.
The results were very strange.
For some unknown reason a C2D@1.66GHz seems to perform very close to a C2D@2.83GHz.
CPU utilization (both cores used) was the same about 80% - 90% for both systems.
Desktop performance was ONLY 11% - 25% faster than laptop.
It should be at least 80% faster due to faster clock and internal architecture.
I would recommend GraphStudioNext (http://code.google.com/p/graph-studio-next/) for performance tests. Build a graph like that:
LAV Splitter Source->LAV Video Decoder->Time Measure Filter->Null Renderer
Then click "View"->"Performance test", select number of wanted passes (more passes=less error) and click "Start".
NikosD
9th November 2013, 17:26
I know the app you suggest - it's a well known program - but dxva checker is very accurate too.
It's not a problem of the benchmark tool.
I tried PotPlayer too and I got same results, very slight performance increase with the faster system.
I'm sure it's a decoder problem, but a very odd one.
beter
9th November 2013, 22:29
I have an old TV record, it is in MPEG-TS format(trp), with MPEG-2, AC3x2 and 2 DVB subtitles.
The two DVB subtitles are split out with the former MPC-HC's internal splitter(current internal splitter of MPC-BE), but not with LAV splitter.
Is it a bug, or my former set-top box recorded it in a non standard way?
http://www.sendspace.com/file/2colg5
michkrol
9th November 2013, 22:36
I've done some tests today with 3 different H.265 clips, regarding SW decoding performance of H.265 decoder. (...)
Intrigued by your findings I did some quick tests of my own and can't confirm your results.
The performance scales (almost) perfectly linear for me with frequency and cores count.
Tested on my desktop (4 Ivy Bridge cores @ 4GHz) vs my netbook (2 Ivy Bridge cores @1,5GHz). Simple math gives me (4*4)/(2*1,5)=5,33 and the results show about 5,1 times the performance, so it matches well.
I've done the tests with GraphStudioNext. Will try some more files with DXVA Checker, when I get more time.
NikosD
10th November 2013, 10:24
I would recommend GraphStudioNext (http://code.google.com/p/graph-studio-next/) for performance tests.
Intrigued by your findings I did some quick tests of my own and can't confirm your results.
Well guys, you were right!
You convinced me to try GraphStudioNext and I confirmed a reasonable increase of performance (around 65%) of desktop system compared to laptop.
BUT HERE COMES THE INTERESTING THING!
I was right too!
Checking out once again DXVA Checker, I found out same kind of performance like GraphStudioNext!
What has changed ? Only one difference.
In order for GraphStudioNext to work, I had to put LAV video to Software mode (Hardware Decoder to use: None)
The software fallback is the problem.
I did the test again with DXVA native.
Here are the results for a test video sample:
Desktop/ Laptop 78fps/ 47fps GSNext (Null+SoftLAV)
Desktop/ Laptop 72fps/ 45fps DXVAChecker (EVR+SoftLAV)
Desktop/ Laptop 58fps/ 45fps DXVAChecker (EVR+DXVAn)
I think this is a MAJOR PERFORMANCE bug, affecting probably MPC-HC v1.7.0 and up (I used v1.7.0.190 by XhmikosR which is using LAV filters 0.59.1) and also PotPlayer.
Because I have low performance with both players using desktop and HEVC decoding, compared to laptop (same kind of low performance as shown above with DXVA Checker software fallback)
For some reason the software fall back of HEVC decoder of FFMpeg (or LAV Video/ PotPlayer) causes a major performance drop with my signature system.
Why the laptop configuration is not affected ?
Probably because it doesn't support full DXVA acceleration at all.
nevcairiel
10th November 2013, 10:32
There is no HW support for HEVC and therefor there is no software fallback. LAV behaves 100% the same no matter what you configure when playing HEVC.
NikosD
10th November 2013, 10:35
OK.
But then, how could you explain the performance drop of HEVC decoding from 72fps to 58fps, by just selecting DXVAn in Hardware Decoder to use selection ?
nevcairiel
10th November 2013, 10:37
Your system is damaged.
I get the same performance no matter what i configure.
NikosD
10th November 2013, 10:43
:eek:
Yes it could be.
But the only thing I do that could affect that matter, is driver upgrading.
I always choose "Clean install", but who knows.
If someone could run a DXVA Checker HEVC decoding test with LAV Video in Software mode and then in DXVAn mode, he would make me do a clean install of Win 8.1, a lot faster than I had in mind :D
P.S
You added the last sentence...Probably I have to do a format.
Did you try with an Nvidia card ?
andybkma
10th November 2013, 11:14
nev, greetings, I have a vc-1 bug report. I have many wmv vc-1 vids such as this that will play with hardware acceleration CUVID but not with the wmv9 dmo software decoding in LAV (the fallback decoder if unchecking VC-1 under hardware decoding). I just get a green screen or a black screen. Using LAV 59.1 & the wmv LAV Splitter. Any other info needed please let me know. Thanks.... ;-)
http://depositfiles.com/files/za7f10j73
filler56789
10th November 2013, 11:38
nev, greetings, I have a vc-1 bug report. I have many wmv vc-1 vids such as this that will play with hardware acceleration CUVID but not with the wmv9 dmo software decoding in LAV (the fallback decoder if unchecking VC-1 under hardware decoding). I just get a green screen or a black screen. Using LAV 59.1 & the wmv LAV Splitter. Any other info needed please let me know. Thanks.... ;-)
http://depositfiles.com/files/za7f10j73
That file plays OK here, with both LAV Video and the M$ DMO decoder. However I couldn't help noticing the uncommon&obsolete Fourcc "WMVA".
andybkma
10th November 2013, 12:24
That file plays OK here, with both LAV Video and the M$ DMO decoder. However I couldn't help noticing the uncommon&obsolete Fourcc "WMVA".
Hmmm very odd. As soon as I deselect VC-1 HW decoding, the file(s) just give me a blank screen. Didn't matter if I used mVR or EVR as the renderer either. Happens with both my media players, Zoom & POT with LAV set up as the wmv splitter and decoders for both A/V with these files. Odd that it should work for you. I am on Win7 SP1, 64 bit but LAV 32bit
nevcairiel
10th November 2013, 12:24
nev, greetings, I have a vc-1 bug report. I have many wmv vc-1 vids such as this that will play with hardware acceleration CUVID but not with the wmv9 dmo software decoding in LAV (the fallback decoder if unchecking VC-1 under hardware decoding). I just get a green screen or a black screen. Using LAV 59.1 & the wmv LAV Splitter. Any other info needed please let me know. Thanks.... ;-)
http://depositfiles.com/files/za7f10j73
The question you have to ask yourself is usually, does it work with WM ASF Reader + WMVideo DMO.
If not, then MS decoder is not compatible with that file. This may also depend on the version of Windows, since its a MS decoder.
andybkma
10th November 2013, 13:09
The question you have to ask yourself is usually, does it work with WM ASF Reader + WMVideo DMO.
If not, then MS decoder is not compatible with that file. This may also depend on the version of Windows, since its a MS decoder.
Yes, the video plays with ASF Reader as the splitter and the WMVideo DMO as the decoder: (Note: The below is with both Nvidia and HD4000)
ASF Reader & WMVideo DMO = YES good
LAV Splitter & WMV Video DMO = YES good
ASF Reader & LAV Decoder (nonHW) = NO blank screen
LAV Splitter & LAV Decoder (nonHW) = NO blank screen
Something on my system, nev? The sample I provided worked for you?
beter
10th November 2013, 13:45
Yes, the video plays with ASF Reader as the splitter and the WMVideo DMO as the decoder: (Note: The below is with both Nvidia and HD4000)
ASF Reader & WMVideo DMO = YES good
LAV Splitter & WMV Video DMO = YES good
ASF Reader & LAV Decoder (nonHW) = NO blank screen
LAV Splitter & LAV Decoder (nonHW) = NO blank screen
Something on my system, nev? The sample I provided worked for you?
try to disable this when you use LAV to decode VC-1:
http://i.imgur.com/Q1bgTe2.png
andybkma
10th November 2013, 14:00
try to disable this when you use LAV to decode VC-1:
Thanks, now it shows avcodec as the active decoder instead of WMV9 DMO and the vid plays fine. But wouldn't a problem still lie somewhere with the LAV video decoder WMV9 DMO since the M$ WMV Video DMO decoder can play it?
wanezhiling
10th November 2013, 15:22
Maybe LAV's wmv9 dmo decoder is something different to MS offical decoder.
nevcairiel
10th November 2013, 15:24
Fixed in Git. WMVA was not passed-through properly.
WMVA should be pretty similar to VC-1, however the DMO decoder seems to want me to tell it when its WMVA or it refuse to work. :)
andybkma
10th November 2013, 16:01
Fixed in Git. WMVA was not passed-through properly.
WMVA should be pretty similar to VC-1, however the DMO decoder seems to want me to tell it when its WMVA or it refuse to work. :)
Thank you kindly :-)
NikosD
10th November 2013, 20:14
I found a more consistent system and solved all of my problems :p
It's been a long time since my last CPU decoding tests, so I had forgotten the performance drop due to the renderer.
The performance drop is not due to LAV settings or different benchmark tools.
I did again the tests with H.265 samples and EVR/ EVR renderless with both GSNext and DXVA Checker.
The performance drop was the same for both tools using a renderer (EVR). And it was a big one.
But the same goes for H.264 too, for CPU decoding.
HW acceleration of H.264 has almost same performance with or without EVR.
Sorry for bothering you. :rolleyes: (waiting for my next GPU with HW acceleration of H.265)
EDIT:
Still unexplainable why the laptop is not affected by EVR/ Null renderer and has no performance drop between those two conditions.
Exactly the same performance with or without EVR renderer.
Are my two both desktop systems damaged and have a performance drop using EVR renderer with both H.264 and HEVC CPU decoders ?
boyumeow
11th November 2013, 05:43
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Rotation : 90°
Hello to anyone or nev, just wonder, according to mediainfo there is the Rotation, and should LAV filters be able to decode and implement it, or should the media player be doing it?
Thanks for whoever could understand and answer me :thanks:.
wanezhiling
11th November 2013, 08:45
LAV splitter doesn't support embedded rotation info yet.
littleD
11th November 2013, 12:10
I found a more consistent system and solved all of my problems :p
It's been a long time since my last CPU decoding tests, so I had forgotten the performance drop due to the renderer.
The performance drop is not due to LAV settings or different benchmark tools.
I did again the tests with H.265 samples and EVR/ EVR renderless with both GSNext and DXVA Checker.
The performance drop was the same for both tools using a renderer (EVR). And it was a big one.
But the same goes for H.264 too, for CPU decoding.
HW acceleration of H.264 has almost same performance with or without EVR.
Sorry for bothering you. :rolleyes: (waiting for my next GPU with HW acceleration of H.265)
EDIT:
Still unexplainable why the laptop is not affected by EVR/ Null renderer and has no performance drop between those two conditions.
Exactly the same performance with or without EVR renderer.
Are my two both desktop systems damaged and have a performance drop using EVR renderer with both H.264 and HEVC CPU decoders ?
I made one software video decoding test on win8 and saw no difference to win7. But after actualization to win8.1 things changed. On this system i get higher FPS'es in software video benchmarks. I deduct it is because better multithreading support (higher cpu utilization overall in tests). Evr and decoding pipeline is likely to be better in this sytem too. Make sure of having latest drivers with highest Wddm version number.
64 bit also gives noticable advantage, no craches so far when using lav/mp-hc in 64 bit but get higher performance on all systems
NikosD
11th November 2013, 12:34
Interesting. ..
The laptop tested has Win 8.1 not 8.
It sounds unbelievable to be that the reason of high performance.
The drivers are Win 7 only, it's a very old laptop.
The drivers of desktop system are shown to the signature.
The most important difference between my Win 8.1 laptop system and Win 8 desktop systems is not CPU utilization.
It's the non existent performance penalty of using EVR compared to null renderer.
Is this a unique feature of Win 8.1 or my Win 8 desktops are damaged dropping performance a lot, using EVR ?
Everything tested was 32bit except 64bit OS
littleD
11th November 2013, 13:49
I didn't test EVR overhead on win8 unfortunately. But there is a nice clip on this forum bf1.mp4 120fps in h254 format. I can't get it into synchronize on win7 playing in MPC-HC. Red and green line are far away even OSD shows (almost) 120 fps during decoding. On win8.1 i get perfect synchronzing means two lines red and green parallel close to each other (custom presenter 64 bit as well). This is what i believe is EVR improved in 8.1. It might do some work on GPU or have lower latencies somewhere maybe. It is interesting for me too.
NikosD
11th November 2013, 17:27
bf1.mp4 and bf.mp4 are really great great findings!
I only had one easy 120fps H.264 clip (only 480p120@2.5Mbps) but those two 1080p120@10Mbps and 30Mbps clips are awesome!
Two major surprises.
1) Using LAV Video CPU decoding to benchmark the 10Mbps clip, my Win 8 Desktop C2D@2.83GHz and my Win 8.1 Laptop C2D@1.66GHz have almost same performance using EVR according to DXVA Checker!
With EVR renderless I got almost double score with desktop system.
2) My VP5 of signature system is faster in 30Mbps clip than in 10Mbps clip!
131fps for 30Mbps L5.1 H.264 clip
126fps for 10Mbps L4.0 H.264 clip
In real playback with PotPlayer, it needs 95% of VPU power for 30Mbps clip and 99% utilization for 10Mbps clip (sometimes it can't even keep up - it goes up to 117-118fps)
Aleksoid1978
12th November 2013, 02:52
nevcairiel
Latest build from git - crash in LAVVideo.ax on H.264 + DXVA Native on seeking. Any H.264 material.
nevcairiel
12th November 2013, 06:43
Works just fine for me, no crashes here.
Aleksoid1978
12th November 2013, 06:48
Works just fine for me, no crashes here.
Crash on MPEG-TS with MPC-BE Splitter.
nevcairiel
12th November 2013, 07:26
How is that any H.264 material if its only on MPEG-TS? :D
I found the reason, should be fixed.
Aleksoid1978
12th November 2013, 07:29
How is that any H.264 material if its only on MPEG-TS? :D
Sorry - my bad test. ;)
Qotscha
12th November 2013, 21:56
Couple of questions considering http live streaming with encryption:
1. Have I understood correctly that HTTP live streams with AES-128 encryption can not be played with LAV Splitter currently?
2. I can play such streams with ffplay and reading this (https://trac.ffmpeg.org/ticket/2008) and this (https://github.com/xbmc/xbmc/pull/3193) I have understood that ffmpeg should be built with GnuTLS for these streams to work. So should encrypted HLS work with LAV too, if I do so?
3. What should I do to compile ffmpeg with GnuTLS. I think this (ftp://ftp.gnutls.org/gcrypt/gnutls/w32/) together with gnutls.pc file from here (http://mirrors.xbmc.org/build-deps/win32/mingw-msys/gnutls-3.2.3-mingw32.zip) are what I need, but where should I put these for --enable-gnutls options to work. To MSYS folder, to thirdparty folder?
4. Instead of trying to do something too complicated for my limited skills, should I just wait for nevcairiel to add support for encrypted HLS possibly with customizable http-user-agent in near future? ;)
Edit: Why I ask this? Currently I watch quite a lot encrypted HTTP live streams from one specific streaming service using VLC. It would be nice, if I could use MPC-HC instead, and for that I would need a custom build of LAV Splitter with different user-agent (which I, BTW, have managed to change :p) and with decryption capability. (To be specific, I can use MPC-HC if I use VLC to decrypt and stream to MPC-HC but that is not very elegant solution.)
turbojet
13th November 2013, 01:29
When using lav video decoders with dss2 it only gives about 60 fps while ffm2svideosource gives 250 fps. Is the lav video decoder multi-threaded?
handaimaoh
13th November 2013, 01:58
When using lav video decoders with dss2 it only gives about 60 fps while ffm2svideosource gives 250 fps. Is the lav video decoder multi-threaded?
Of course it is.
turbojet
13th November 2013, 08:05
Culprit is single threaded dss2, setmtmode(3) with lavcodec gets it up in ffms2 range but it doesn't speed up encoding.
sneaker_ger
13th November 2013, 08:41
Should AviSynth's internal threading really have any influence on the LAV threading?
turbojet
13th November 2013, 09:52
Oh nevermind PEBKAC. It was stuck on cuvid, it's only about 5% slower than ffms2 when setup right through avisynth.
In order to switch between lav and cuvid from a command line is changing HKCU\Software\LAV\Video\HWAccel from 0 to 1 all that's needed? Is there a better way to do it?
NikosD
13th November 2013, 20:26
After a lot of testing I think I'm going to need the help of nevcairiel or some other developer to interpret my results.
The most amazing result of my testing is that there is no CPU decoding/playback!
In realworld, playback with a renderer (not null renderer) is a CPU/GPU thing even when you select CPU decoder and not HW acceleration.
For example H.264/H.265 CPU/EVR decoding with the iGPU of a SandyBridge as primary, is a lot slower than the exact CPU/EVR decoding with a faster discrete card as primary - with all the other parameters kept same.
This is unexplainable to me.
Also ATI card system had almost no performance penalty between EVR/EVR renderless, compared to a big performance penalty of Nvidia systems.
One explanation could be that there were no driver updates for ATI system compared to Nvidia system.
But even that, it's a drawback for the "clean" installation of upgrading Nvidia drivers.
I think there is room for optimization for the CPU playback scheme, not only in the core CPU decoding but also in CPU/ renderer system.
It's possible that OS and drivers of GPU could affect a lot the performance of CPU decoding, too.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.