View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
dansrfe
3rd December 2012, 05:32
Does madVR automatically turn on HPET or does the user have to issue a command to turn it on?
ryrynz
3rd December 2012, 05:52
C'mon Dan, you've been here long enough to know to use the search and google things.
The last few madVR versions already set the timer resolution to best available, so that tool isn't needed.
Theoretically using HPET only in the OS via useplatformclock=true could improve playback if your other CPU based timer is unstable. By default Window 7 switches and syncs between HPET and TSC as needed.
Go here (http://www.neowin.net/forum/topic/1075781-tweak-enable-hpet-in-bios-and-os-for-better-performance-and-fps/) for the tool to test it and for instructions, it may not make much of a difference though or it may even just cause issues.
Anleck
3rd December 2012, 06:01
I don't use MadVR.
To use Hpet you must enable it in BIOS then enter these commands into cmd:
bcdedit /set useplatformclock true
Win8 add this command:
bcdedit /set disabledynamictick yes
Restart...
Check using WinTimerTester - a value of 14.31818 MHz means Hpet is properly enabled.
I find media playback to appear smoother with Hpet enabled. Results may differ.
romulous
3rd December 2012, 08:59
Hi nev,
I think I may have a similar issue to andybkma from a couple of pages back (http://forum.doom9.org/showpost.php?p=1603350&postcount=13236). Here is the test clip:
http://www.ausgamers.com/files/details/html/45878
I don't know how you checked the container AR of andybkma's test file, so I can't check this myself - I hoped you might be able to take a look at it.
Zoom Player shows the video in a 1280x1280 window (correct is actually 1280x720). Filter chain is LAV all the way through (splitter, audio decoder, video decoder), and changing the 'Use Stream Aspect Ratio' option in LAV Video does nothing.
I asked Blight about the file, and he said to post it here, as he couldn't see that Zoom is doing anything wrong. He also said to post a screenshot of MediaInfo (which is below) and to mention that the video is reported at a different resolution to the player (he gets 1280x1280 as the source video resolution as well as the aspect ratio). MediaInfo screenshot (this shows the stream AR I think):
http://img705.imageshack.us/img705/3074/snap033bo.png
MPC-HC shows it correctly, as it uses the MPC splitter. Haali's splitter also shows it correctly. Well, correctly as in "I know the video is meant to be 1280x720" - not necessarily as in "correctly according to how the file has been encoded".
Thanks!
nevcairiel
3rd December 2012, 09:03
Media Info shows the AR, the "Display Aspect Ratio" is the container AR, which is 1:1, resulting in 1280x1280. "Original Display Aspect Ratio" is the Stream AR, 16:9. If you set LAV Video to always use the stream AR, it should work. Note that changing this option may require restarting playback.
Edit:
On a second look with the actual file, it seems like ffmpeg fails to read the Stream AR (if there actually is one), which is why it never works. I'll try to take a look when i get home.
The MP4 Container AR is actually encoded as 9:16 PAR, which results in 1:1 DAR, looks like someone flipped those.
Edit2:
The "aspect_ratio_idc" in the bitstream is "0", which means "Unspecified" according to the H264 spec. Not sure there really is a stream AR afterall. Maybe the mp4 demuxer fails at reading the container AR and inverts it?
wanezhiling
3rd December 2012, 09:36
It seems there are plenty of "Stream AR correctly" files in real world.:p
nevcairiel
3rd December 2012, 09:38
But the file doesn't have any Stream AR. :p
Looks like the problem is that the MP4 Stream Header has width and height both set to 720, which causes it to make it a 1:1 AR
MPC-HCs MP4 splitter and Haali seem to ignore that info and only use an explicit "PASP" atom for aspect ratio. But i'm quite sure i actually had files where this was needed to get the correct container AR. Broken files are broken?
Aleksoid1978
3rd December 2012, 09:59
But the file doesn't have any Stream AR. :p
Looks like the problem is that the MP4 Stream Header has width and height both set to 720, which causes it to make it a 1:1 AR
All ok with MP4 Stream header - in avc1 ATOM header store width & height = 1280x720. There is no pasp atom(store Aspect Ratio). And - we heave 16x9 AR for this stream.
nevcairiel
3rd December 2012, 10:01
The "tkhd" atom has stream width/height, which are both 720, clearly not correct, and some muxers use the tkhd width/height to signal aspect ratio.
Aleksoid1978
3rd December 2012, 10:11
The "tkhd" atom has stream width/height, which are both 720, clearly not correct, and some muxers use the tkhd width/height to signal aspect ratio.
I think video stream data - width, height & AR must have more priority that 'tkhd'. But - it does not matter :)
wanezhiling
3rd December 2012, 10:15
Good sample, PotPlayer failed too, MPC-HC/BE work correctly.
Pomegranate
3rd December 2012, 10:59
Pomegranate,
I feed 32 bit floating point into ReClock which dithers it down to 24 bit integer and IMO it sounds the best. Do you get the distortion on all files or certain files only?
It's a sound card driver limitation when using Kernel streaming. The card plays 8, 16, 24 and 32 bit integer pcm perfectly fine. I will try your method and see if there's any difference.
nevcairiel
3rd December 2012, 11:03
I think video stream data - width, height & AR must have more priority that 'tkhd'. But - it does not matter :)
But the video stream in this case doesn't have an AR.
I got a sample where it was exactly done the way i described above, the "tkhd" values were used to specify the AR, and LAV and Haali got it right, and MPC-HC splitter wrong, sadly the sample link died.
http://forum.doom9.org/showthread.php?p=1581615#post1581615
wanezhiling
3rd December 2012, 11:12
But the video stream in this case doesn't have an AR.
I got a sample where it was exactly done the way i described above, the "tkhd" values were used to specify the AR, and LAV and Haali got it right, and MPC-HC splitter wrong, sadly the sample link died.
http://forum.doom9.org/showthread.php?p=1581615#post1581615
http://pan.baidu.com/share/link?shareid=156957&uk=3558042035
:)
hoborg
3rd December 2012, 17:05
Nev, is possible to add support for *.dff audio files?
Samples here: http://www.2l.no/hires/index.html
nevcairiel
3rd December 2012, 17:06
When asking such questions, the first thing you need to ask yourself: Can ffmpeg play this?
If the answer is yes, you may ask here, if the answer is no, you can request the feature from the ffmpeg developers.
hoborg
3rd December 2012, 17:08
When asking such questions, the first thing you need to ask yourself: Can ffmpeg play this?
If the answer is yes, you may ask here, if the answer is no, you can request the feature from the ffmpeg developers.
I have no idea if ffmpeg can decode such format, that is why i am asking the true master ;)
JEEB
3rd December 2012, 17:16
I have no idea if ffmpeg can decode such format, that is why i am asking the true master ;)
Just so you don't ask people in vain in the future: Both ffmpeg and libav have such pages, and ffmpeg's is here (https://ffmpeg.org/general.html#Audio-Codecs).
nevcairiel
3rd December 2012, 17:21
AFAIK, DFF is the format used on SACD, right? I don't think ffmpeg can decode this.
Nekomata
3rd December 2012, 23:13
can i use this with madvr?
DragonQ
3rd December 2012, 23:16
can i use this with madvr?
Yesss.
6233638
4th December 2012, 00:05
Win8 add this command:
bcdedit /set disabledynamictick yesYou should not do this unless you have a specific reason to, as it disables the new interrupt scheduling built into Windows 8.
What it will do, is give you nice looking DPC latency results from tools which were not designed with Windows 8 in mind.
Most people don't seem to actually understand what DPC latency is, and assume that lower values must always better, regardless of what you're doing to achieve them. If you are below 250µs DPC latency, you should not need to do any kind of tweaking to reduce it, and it's only once DPC latency gets above 500µs or so that problems actually start to manifest. Old tools will show results over 1000µs in Windows 8 because things are handled differently than they were in Windows 7 - those numbers are not comparable.
Anleck
4th December 2012, 07:11
6233638 is correct,
disabledynamictick is not needed (relates to an old bug - pre win8 final). I have reset this and everything is fine , Hpet working.
Anyhow my mention of hpet has derailed this thread enough -back to LAV
romulous
4th December 2012, 11:36
The "tkhd" atom has stream width/height, which are both 720, clearly not correct, and some muxers use the tkhd width/height to signal aspect ratio.
So the file itself is encoded in a slightly non-standard way, which is why it shows as 1280x1280 (and not 1280x720)?
Oh, and Blight wanted me to ask if you have any plans on making LAV react like the MPC filter with regards to AR in this case? I'm guessing that is the same answer as per here?
http://forum.doom9.org/showpost.php?p=1603371&postcount=13243
itsonlyjustincase
4th December 2012, 19:22
Hi,
I'm on WIN8 and WIN7 (dual boot)
I have latest Lav filters 0.54.1
I have asus UX32VD with Nvidia 620M (CUDA compatible)
I'm using Djing software call Serato video (www.serato.com). It can be downloaded here :
http://serato.com/scratchlive/downloads/win
then the video pluggin
http://serato.com/video/downloads/win
I have setted LAV Video and Audio as default thanks to win7dsfilterTweaker
When i play HD videos for example 1080p h264 AAC (or 720p) in mp4, i can't get the Hardware acceleration to work. it always says video decoder <inactive> so i have poor performance. I have tested with graphfilter that LAV is really the default decoder and it is. Is there a way to force the GPU using in LAV whenever it would detect a H264 file played ? I'm loosing my hair with that ! Lav works perfectly well but i can't get it to work as i want with my dj soft. I'm ready to pay for that :p
nevcairiel
4th December 2012, 21:48
If it says <inactive>, then you're looking at the wrong properties page. You need to access the properties page of the currently active decoder, which not many players actually support. If you just open it through the start menu, you get a fresh copy, which just isn't decoding anything - so <inactive>. If its working, it will show something other then inactive. :p
Best way to try to figure out if HW decoding is working if you don't have access to the correct properties page, is to simply compare CPU usage between the modes.
Superb
4th December 2012, 22:53
DirectShowSpy...
DragonQ
4th December 2012, 23:10
Best way to try to figure out if HW decoding is working if you don't have access to the correct properties page, is to simply compare CPU usage between the modes.
GPU usage also (using GPU-Z).
itsonlyjustincase
5th December 2012, 00:40
Thank you all for the replies. So how can i make my video player to use LAV decoder ? I want to force the GPU acceleration. It support ffdshow for example but not the dxva :s
filler56789
5th December 2012, 02:19
"This off-topic is morally indefensible, but absolutely necessary". :rolleyes:
At last, we are on page 666. :devil: :D
wanezhiling
5th December 2012, 03:11
GPU usage also (using GPU-Z).
DXVA Checker (http://bluesky23.yu-nagi.com/en/DXVAChecker.html) --> Trace Log
Option: only check DXVA2_DecodeDeviceCreated
Click Start, run media player and play video, Click Refresh.
;) This is always 100% correct way to figure out if HW decoding is working.
dansrfe
5th December 2012, 05:07
Is there a way to force positioning of PGS subtitles or is that an MPC-HC thing? I posted in MPC-HC's thread but the request just got ignored.
nevcairiel
5th December 2012, 08:03
Is there a way to force positioning of PGS subtitles or is that an MPC-HC thing? I posted in MPC-HC's thread but the request just got ignored.
PGS subtitles have a position in their bitstream, its unlikely for any subtitle renderer to allow you to override this position. In any case, its something for the renderer to do, the source just outputs them as-is from the file.
vad74
5th December 2012, 08:42
I use XBMC+DSPlayer with LAV decoder on Intel Core i3-2330M proc. In old version of LAV (0.50.5) in Full Screen mode dont work QuikSync. I download ZIP file with last LAV (0.54.1) , and just unzip all files to .../dsplayer/ folder. But QuikSync dont work in FSE. I try play many different H.264 files. Dont. Its bedly.
I have some H.264 files which play in old LAV via DXVA with big artifacts. I tryed use DXVA with new LAV. Super! All my "bedly" files play excellent in new LAV. Thanks! Now I use DXVA on Intel.
nevcairiel
5th December 2012, 09:07
Indeed, DXVA on Intel (at least for H.264 and MPEG2) is now much more stable.
itsonlyjustincase
5th December 2012, 11:27
DXVA Checker (http://bluesky23.yu-nagi.com/en/DXVAChecker.html) --> Trace Log
Option: only check DXVA2_DecodeDeviceCreated
Click Start, run media player and play video, Click Refresh.
;) This is always 100% correct way to figure out if HW decoding is working.
Thanks i'll try it tonight
nevcairiel
5th December 2012, 19:08
Hallo nev, is it possible that LAV Audio sometimes overflows when using mixing with clipping protection (very loud btw) and integer output formats (needed for some of my tools)? Normalization is fine but much quieter of course. BTW is dithering used when converting floats to integers? And do you use the mean or rms for normalization?
Clipping protection should be impossible to overflow.
Do you have a sample file where this can be observed?
Dithering is currently not performed, but may be an option in the future.
PS:
It doesn't do "normalization", it just normalizes the matrix it uses for mixing, which is a completely different thing. A normalized matrix just means that the total sum of the mixing factors for every output channel does not exceed 1.0, so every channel is reduced so that the sum of channels fits into 1.0
madshi
5th December 2012, 19:29
FWIW, dithering is highly recommended, when reducing audio bitdepth in any way. It's just as important for audio processing as it is for video. If you need information on how to do proper TPDF dithering, feel free to PM me. But you probably already know how it works, anyway...
nevcairiel
5th December 2012, 19:32
I usually don't recommend using LAV to convert the bitdepth. I only added support for this to allow playback with broken components that don't accept some special format. Most notably a bunch of audio drivers on XP, which fail on float audio. Ideally you would convert float to 24-bit int, which is a conversion case where i would argue that you don't hear the last few bits anyway ;)
Anyhow, a dithering feature is currently being developed for the avresample library, which i can then use for these conversions, if someone really needs to convert.
We've come a long way anyway, just 2-3 years ago, we would get 16-bit integer undithered from ffdshow or mpc-hc decoders.... :p
madshi
5th December 2012, 20:45
I'm not sure if audio hardware can really do float audio, I rather doubt it. I guess if you feed float audio to the audio renderer, probably the audio renderer or the OS or the audio driver is internally converting that to integer at some point, and I'm not convinced that this is done "properly" (with dithering etc). So I think it's a better idea to define a max audio output bitdepth (e.g. 16bit or 24bit integer) and then convert all floating point stuff to that by using proper dithering. Ok, in an ideal world, the audio renderer would do that. But we don't really have a reliable audio renderer at the moment which we could trust with such a thing...
Of course you're right that ffdshow and mpc-hc decoders were using undithered output not long ago. But IIRC, eac3to *always* used proper dithering, right from the beginning (> 5 years ago).
nevcairiel
5th December 2012, 20:46
At least the Windows 7 and above DirectSound audio renderers do a proper job at conversion.
madshi
5th December 2012, 21:48
They probably do, if they do the conversion. I'm just wondering whether they might pass the float audio to the audio hardware driver and then maybe it's up to the audio hardware driver to do the float -> int conversion. I've really no idea, though, just shooting in the wild here...
nevcairiel
5th December 2012, 21:49
DirectSound does all the required conversion to audio-hardware compatible formats. In XP, that was different, which is why XP has plenty issues with float audio if you have broken drivers.
itsonlyjustincase
5th December 2012, 22:15
Thanks i'll try it tonight
It doesn't want to recognize my geforce 620m even if i set the nvidia gpu as default for all application. It recognize only my intel hd 4000 :(
nevcairiel
5th December 2012, 22:16
Then use the QuickSync decoder, its faster then CUVID anyway.
madshi
5th December 2012, 22:50
DirectSound does all the required conversion to audio-hardware compatible formats.
Ah ok, didn't know that...
itsonlyjustincase
5th December 2012, 23:25
Then use the QuickSync decoder, its faster then CUVID anyway.
My problem is that my serato software doesn't work with the intel hd 4000 so i have to use and force the geforce 620m
wanezhiling
6th December 2012, 02:59
It doesn't want to recognize my geforce 620m even if i set the nvidia gpu as default for all application. It recognize only my intel hd 4000 :(
http://forum.doom9.org/showpost.php?p=1603351&postcount=15891
itsonlyjustincase
6th December 2012, 10:16
http://forum.doom9.org/showpost.php?p=1603351&postcount=15891
Thanks for this man !!!
So i should rename DXVAChecker.exe to DXVAPlayerChecker.exe ?
itsonlyjustincase
6th December 2012, 12:24
http://forum.doom9.org/showpost.php?p=1603351&postcount=15891
I meant that DXVAChecker doesn't want to detect my onbard nvidia card. It detects only the integrated intel hd 4000
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.