View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
DragonQ
17th July 2013, 13:51
I have plenty of those MBAFF recordings from Freeview HD and they play fine in MPC-HC with MadVR and LAV Filters. MediaPortal using EVR and LAV Filters seems to handle it fine too.
In fact, I brought this up a while ago, where a stream that switched between progressive and interlaced wasn't being handled properly by MadVR. Can't remember if MadVR or LAV Filters (or both) was updated to fix the problem, but it works fine now AFAIK.
TheDutchJewel
17th July 2013, 14:08
I've a problem with some specific wavpack files, which are played fine with foobar2000, but not with MPC-HC.
Because it looks like a ffmpeg issue, I tested it with "ffplay.exe filename.wv" and got this error:
"filename.wv: Invalid data found when processing input sq= 0B f=0/0"
Any idea about how to solve this problem?
owlsroost
17th July 2013, 14:12
From the description of the BBC it sounds like LAV is doing what its supposed to do. They deliver content as natively progressive whenever possible, and LAV handles it as such, to keep as much quality as possible. :)
I agree in a general sense - LAV actually handles these streams much better than most other decode filters (some of which appear to do timestamp smoothing which really messes up the transitions....)
I can probably tweak the aggressive mode so that it doesn't require a media-type reconnect on such switches, maybe that'll help already to avoid your frame drops.
That would be nice :)
Instead, the frames will simply stop being flagged as interlaced.
Actually that would make it worse, because it would (I assume) stop the interlaced parts being de-interlaced - what these streams need is the progressive parts marked as interlaced (assuming that is what happened with the old 'Aggressive Deinterlace' mode).
nevcairiel
17th July 2013, 14:14
Actually that would make it worse, because it would (I assume) stop the interlaced parts being de-interlaced - what these streams need is the progressive parts marked as interlaced (assuming that is what happened with the old 'Aggressive Deinterlace' mode).
The interlaced parts will of course still be flagged, only the progressive parts will not.
Aggressive is really only meant for streams which mix progressive and interlaced frames in one stream (with the stream itself flagged as interlaced), not mix completely interlaced and progressive streams every other GOP.
owlsroost
17th July 2013, 14:31
The interlaced parts will of course still be flagged, only the progressive parts will not.
That sounds fine - :thanks:
Pat357
17th July 2013, 15:04
Nev,
Latest LAV (90db672..) still fails to decode these Wavpack files :
http://www.mediafire.com/download/fl6umam68s6wo58/wavpack_no_sound_with_LAV(2).7z
There are no errors, but no sound is produced.
Latest FFmpeg/FFplay decode & play these files just fine.
After manual decoding, LAV plays the resulting wav's also just fine.
Can you have a look at it ?
nevcairiel
17th July 2013, 15:33
Nev,
Latest LAV (90db672..) still fails to decode these Wavpack files :
http://www.mediafire.com/download/fl6umam68s6wo58/wavpack_no_sound_with_LAV(2).7z
There are no errors, but no sound is produced.
Latest FFmpeg/FFplay decodes these files just fine.
After manual decoding, LAV plays the resulting wav's also just fine.
Can you have a look at it ?
Works just fine here with LAV Splitter + LAV Audio.
Pat357
17th July 2013, 16:41
Works just fine here with LAV Splitter + LAV Audio.
You're right : as soon as I disable Reclock, I can hear the sound.
When re-enable Reclock, but I select "WASPI exclusive", I can also hear the sound.
But with the output option "Direct sound" there is no sound...:confused:
Strange, will try to reinstall Reclock...
Sorry to bother you with this as it seems not LAV-related :(
LeChuck
17th July 2013, 17:31
When playing the 2D Blu-ray Version of "Tron Legacy" the german audio track just goes silent at
01:23:28 and stays off until i seek to another position.
.
.
.
Here is a 30 sec sample file (Problem occuring on 00:08)
<http://sdrv.ms/11ta4p3>
Was someone able to reproduce the problem?
Not pushing, i just want to be sure it is not overlooked :)
nevcairiel
17th July 2013, 19:57
Was someone able to reproduce the problem?
Not pushing, i just want to be sure it is not overlooked :)
There appears to be a corrupted DTS frame in the stream which breaks the playback, too bad it doesn't recover afterwards..
Maybe i can do something.
Edit:
Should be fixed, hopefully without breaking something else.
dansrfe
18th July 2013, 07:25
Changing the audio delay in LAV Audio and while using LAV Splitter, LAV Video, madVR, MPC-HC, and Reclock the audio stutters and goes off sync unless I skip ahead or backwards in the video via the arrow keys or going to a different timestamp directly. Not sure if this is solely because of Reclock not adjusting itself or due to something LAV suite related.
nevcairiel
18th July 2013, 07:33
LAV only adjusts the timestamps when you change the delay, its certainly possible a audio renderer doesn't like a time stamp drift like that and gets confused.
Since the delay function is primarily designed to compensate for hardware delay in your AVR or TV for example, its a set-once setting and this shouldn't be a real-world problem.
dansrfe
18th July 2013, 18:05
Yeah, I was thinking that Reclock didn't like it.
owlsroost
19th July 2013, 00:34
No, the old mode caused issues with other broadcasts, where the broadcast itself is at least behaving properly (ie. a one-time switch from interlaced to progressive), and i'm not breaking a proper broadcast to fix some terrible broadcast. A new mode is also not an option, too many options just cause confusion.
Personally, i've not seen a broadcast which really switches between a full progressive stream to a potentially interlaced stream all the time.
What is common is a stream marked as interlaced which then contains progressive frames - thats what aggressive deinterlacing was originally designed for.
You should probably talk to the media portal devs to look at their renderer so the frame drops can be avoided.
As an alternative you can of course use "Force" deinterlacing mode.
Or you could provide a recorded sample, maybe there is just some mis-detection going on.
There is a short (~60 sec) sample with few progressive/interlaced transitions here (https://dl.dropboxusercontent.com/u/52149306/A%20Race%20Against%20Time_%20Hilary%20Lister%27s...%20-%20BBC%20TWO%20HD%20-%202013-07-18.zip)
Thanks,
Tony
nevcairiel
19th July 2013, 09:25
There is a short (~60 sec) sample with few progressive/interlaced transitions here (https://dl.dropboxusercontent.com/u/52149306/A%20Race%20Against%20Time_%20Hilary%20Lister%27s...%20-%20BBC%20TWO%20HD%20-%202013-07-18.zip)
Thanks,
Tony
Here is a test build that suppresses the reconnection to the renderer when changing between interlaced and progressive parts, it may help already, but i'm not 100% certain.
If it works, it would even work in "Auto" mode, no need for aggressive.
http://files.1f0.de/lavf/LAVFilters-0.58.1-mp-interlaced-test.zip
Disclaimer: This is a test version based on a not very well tested development version, so use at your own risk. :)
owlsroost
19th July 2013, 09:33
Here is a test build that suppresses the reconnection to the renderer when changing between interlaced and progressive parts, it may help already, but i'm not 100% certain.
If it works, it would even work in "Auto" mode, no need for aggressive.
http://files.1f0.de/lavf/LAVFilters-0.58.1-mp-interlaced-test.zip
Disclaimer: This is a test version based on a not very well tested development version, so use at your own risk. :)
Thanks - I'll give a quick test on the dev PC, then risk it on the HTPC tonight :)
diizzy
19th July 2013, 11:00
Thanks for the great work as always,
I just updated to the newest version (0.58.1) and there seems to be a regression using QuickSync. From what I can tell it pretty much affects all types of MPEG-2 irregardless of container (.ts, .mpg, .vob). If you're lucky you'll get a few frames correctly but it'll then play roughly one frame per second making it a slideshow. Turning off QuickSync fixes the issues, H.264 works fine.
Windows 7 SP1 64-bit
LAV Filters 0.58.1
MPC-HC 1.7.0.7634
madVR 0.86.9
Intel Graphics HD4000 (i7-3770) - v9.18.10.3165
https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&ProdId=3442&DwnldID=22873&ProductFamily=Desktop+Boards&ProductLine=Intel%C2%AE+7+Series+Chipset+Boards&ProductProduct=Intel%C2%AE+Desktop+Board+DZ77GA-70K&lang=eng
Best regards,
Daniel
nevcairiel
19th July 2013, 11:01
Please report any issues with the QuickSync decoder to the author of this decoder, over there -> http://forum.doom9.org/showthread.php?t=162442
dukey
19th July 2013, 20:27
// Handle DVD playback rate..
if (GetDecodeFlags() & LAV_VIDEO_DEC_FLAG_DVD) {
can you just change that to
{
nevcairiel
19th July 2013, 20:33
// Handle DVD playback rate..
if (GetDecodeFlags() & LAV_VIDEO_DEC_FLAG_DVD) {
can you just change that to
{
And why would i do that?
This antiquated interface for playback speed is only used by the DVD Navigator, any other source filters just scale the timestamps before they reach the decoder.
dukey
19th July 2013, 20:37
Saves having to flush everything to change the playback rate
I should probably add, with overlays flushing becomes problematic, if you flush them they are gone ! which is really less than ideal
TOM_SK
20th July 2013, 13:55
Scam alert - searching today for LAV Filters on Google:
-http://lavfilters.com/
nevcairiel
20th July 2013, 13:59
At least the files seem allright, they still carry my digital signature. :p
sneaker_ger
20th July 2013, 15:06
MPC-HC hangs right at the start when trying to play the following file via LAV Splitter 0.58.1:
http://www.file-upload.net/download-7861655/lav-stream-selection.mkv.html
I have set the advanced subtitle selection to:
audio: fin,dut
subtitles: [empty]
---
Originally I wanted to create this sample to report a different problem: audio stream selection seems to have simply stopped working for me lately. Anyone else experience the same? I'm not sure what has caused it, having installed different updates recently.
/edit:
Hmm... it seems to not hang most of the time. Kinda random/sporadic issue. :confused:
/edit2:
Haali also seems to hang sporadically, but only very briefly, so it is not just LAV Splitter.
Rest of the components:
MPC-HC 1.7.0 7634 (Standard/DirectSound audio renderer)
(madVR 0.86.9)
LAV Audio 0.58.1
Win7 x64
/edit3:
Having real trouble pinning it down to a single component. So far I could reproduce the problem with these combinations:
LAV Splitter + LAV Audio
LAV Splitter + Microsoft DTV-DVD Audio Decoder
Haali Splitter + LAV Audio
Could not reproduce with:
Haali Splitter + Microsoft DTV-DVD Audio Decoder
nevcairiel
20th July 2013, 16:18
Most likely MPC-HCs fault, disable its stream switching function, that will also restore LAVs switching functionality.
I believe it should turn itself off when you don't configure favorite languages in mpc-hc, but i havent been keeping up with recent changes.
sneaker_ger
20th July 2013, 16:26
Thx, that was indeed the problem. Since I use the switcher for other things it seems I have to ask the MPC-HC devs about that.
clsid
20th July 2013, 16:39
Probably related to this commit:
https://github.com/mpc-hc/mpc-hc/commit/395f02e5fbb30d9e8810caf7fa12450130ce6699
That caused audio problems with certain files for me.
Megalith
20th July 2013, 23:27
Quick question on LAV audio mixing. I run a stereo setup and the audio is too low unless I turn mixing on and boost the center and surround mix levels to 1.00. Does this do anything detrimental to the sound quality in any way, such as increase the potential of clipping?
Also, the LFE mix level can be boosted to 3.00. Even though you can, it should be left at 1.00 to maintain consistency with the center and surround levels, correct?
bugmen0t
21st July 2013, 10:39
@Megalith
There's a clipping protection build in which will reduce the volume during rare extremely loud passages.
If the sound is just too quiet increase the volume elsewhere.
If you want to change the mix, i.e. the relation between the channels, then set it as you like best.
Setting all levels to 1 will not keep consistency but the default values will in general.
Including the LFE is uncommon. But if you do it needs to be played 10 dB louder than the other channels. However downmixing needs a correction for some channels. Therefore the center and surrounds are set 3 dB quieter and LFE needs 10 dB - 6 dB = 4 dB which gives a level of 10^(1/5) ~= 1.5849 (this is to include LFE with the rest default settings).
Actually an adaptive process would be necessary for minimizing all the possible problems of downmixing. Also listening at different volumes needs different mixing coefficients.
So in the end one won't get it perfect anyways which is why I propose to set anything just as one likes. :)
DragonQ
21st July 2013, 19:48
Yeah I have LFE set to 1.58 on my HTPC since I have full range front speakers. No idea if it makes much difference but might as well. Tis set to 4.0 because LAV seems to do a far better job at downmixing 5.1 than my AVR does!
nevcairiel
21st July 2013, 20:31
Thanks - I'll give a quick test on the dev PC, then risk it on the HTPC tonight :)
Any news if it worked? :)
owlsroost
21st July 2013, 22:42
Any news if it worked? :)
It's stopped the re-connects when it flips between interlaced and progressive (which is good), otherwise it's behaving like 58.1 - was that the intention ?
Thanks,
Tony
nevcairiel
21st July 2013, 22:47
It's stopped the re-connects when it flips between interlaced and progressive (which is good), otherwise it's behaving like 58.1 - was that the intention ?
Yes, its supposed to behave like 0.58.1 and just don't reconnect, hopefully avoiding the frame drops - does it do that?
owlsroost
22nd July 2013, 00:06
Yes, its supposed to behave like 0.58.1 and just don't reconnect, hopefully avoiding the frame drops - does it do that?
The reconnect drops were only an occasional problem (if the EVR Mixer wasn't being very responsive during the reconnect activities) - the main problem is inside the MP custom presenter, which is optimised to work best with 'normal' streams i.e. ones that have a stable frame rate.
I'm working on trying to improve it at the moment, but the old 'aggressive deinterlacing' behavior was a handy workaround for these awkward streams.....
TheDutchJewel
23rd July 2013, 08:22
I've a problem with some specific wavpack files, which are played fine with foobar2000, but not with MPC-HC.
Because it looks like a ffmpeg issue, I tested it with "ffplay.exe filename.wv" and got this error:
Any idea about how to solve this problem?
Problem solved. It was an iso with wv extension. The unpacked version plays fine with ffplay.
pOpY
23rd July 2013, 11:38
Dear nev.
On my main HTPC Mediaportal is crashing if ill use LAV Filters 0.58+.
After installing 0.57 all went back to normal.
It crashes right after starting live TV (SD MPEG2 stream).
Shortly there is audio but no picture, after that the windows error message apears.
Attached are the logs of mediaportal.
Could you please look into it.
thx
pOpY
cyberbeing
23rd July 2013, 12:10
@nevcairiel
Are you able to prevent Microsoft's "Internal Script Command Renderer" from connecting to LAV Splitter's subtitle pin with TS + DVB Subtitles?
This filter seems to connect to the following which you expose for DVB subtitles:
MEDIATYPE_Text {73747874-0000-0010-8000-00AA00389B71}
GUID_NULL {00000000-0000-0000-0000-000000000000}
Currently this behavior prevents XySubFilter from rendering DVB subtitles when madVR auto-loads us into the graph instead of DirectShow, with media players like Zoom Player. Not a critical issue at the moment, but it could turn into one depending on future modifications to loading behavior with the subtitle interface.
nevcairiel
23rd July 2013, 12:12
Why do you rely on auto-loading by madVR for internal subs, and not just let DirectShow load you?
I would rather not start blocking anything, because after the ISCR it'll be something else that connects to the subs with a very low merit, and and and..
PS:
Thats the media type when the pin is set to "No Subtitles", not the type for DVB Subs.
madshi
23rd July 2013, 12:18
Auto-loading behaviour is still under discussion, so I think it's too early to even think about changing anything in LAV. I'd first like to clarify which exact auto-loading behaviour we'll end up with.
nevcairiel
23rd July 2013, 12:19
For internal subtitles i don't think there is any question, just let DirectShow graph building load it and connect it to the subtitle pin.
Anything else would be contrary to the whole DirectShow concept.
madshi
23rd July 2013, 12:23
I fully agree.
cyberbeing
23rd July 2013, 12:24
I was testing out a build with XySubFilter set to "DO_NOT_USE" merit to see how well it would work with madVR auto-loading only. Yet upon investigating a report from a user that XySubFilter Beta wasn't showing subtitles with Zoom Player, I noticed this issue. No idea why XySubFilter Beta could be failing to load (or connect quick enough?) via DirectShow, but if so, it seems possible that this filter could be to blame for no subtitles.
Thats the media type when the pin is set to "No Subtitles", not the type for DVB Subs.
...well that's rather annoying that Microsoft has a System Filter with high merit of 0x00800001 which steals any subtitle pin advertising "No Subtitles" if nothing else connects quickly enough.
nevcairiel
23rd July 2013, 12:28
Well admittedly i invented the type for "No Subtitles" (or stole it from some other filter a long time ago), and crazy enough these days its different to any other subtitle type LAV would ever output, so i could probably change it to more closely resemble the type it would use for actual subtitles (ie. use MEDIATYPE_Subtitle which the ISCR will never connect to)
cyberbeing
23rd July 2013, 12:37
so i could probably change it to more closely resemble the type it would use for actual subtitles (ie. use MEDIATYPE_Subtitle which the ISCR will never connect to)
I think that would be a good idea, since currently it seems this filter will steal this pin (especially since it enters the graph early via quartz.dll) unless a subtitle filter has a merit of at least 0x00800002 (Preferred +2). Anything less and this ISCR filter will override even VSFilter.dll.
nevcairiel
23rd July 2013, 12:46
Just to clarify, there is no early or late loading, its only controlled via merit, unless some component is specifically added by name directly.
cyberbeing
23rd July 2013, 12:47
Well if I set VSFilter.dll to the same merit as "Internal Script Command Renderer", the ISCR always wins...
nevcairiel
23rd July 2013, 12:48
With the same merit the order is somewhat arbitrary, depending on the enumeration order, possibly based on the name or the GUID, who knows.
cyberbeing
23rd July 2013, 13:45
Well it seems MPC-HC always connects a "NullTextFilter" to the following mediatype, which blocks all every subtitle filters in existence from loading internal subtitles.
(even worse than the ISCR behavior):
mtype.majortype = MEDIATYPE_Subtitle;
mtype.subtype = MEDIASUBTYPE_NULL;
mtype.formattype = MEDIASUBTYPE_NULL;
I looked into it and LAV Splitter is using the same MediaType as Haali Splitter does with a disabled subtitle pin, so that must have been where you got it from. I take back my request, it is probably best for you to just leave things how they are. I'll just need to remember that 0x00800002 is the lowest possible merit for subtitle filters, without ISCR causing trouble.
nevcairiel
23rd July 2013, 13:47
Doesn't MPC-HC just connect its TextPassThru filter which sends the subs to the ISR but still allows an external subtitle filter to connect?
How else would VSFilter or ffdshow get subs to render? :D
It might have this Null thing on a low merit so it completes the graph and doesn't leave a dangling pin around.
In any case, i wouldn't use a NULL type anymore, probably would look at the actual subs used and offer its types, because those it better supports, or it doesn't need to connect. ;)
cyberbeing
23rd July 2013, 14:02
Doesn't MPC-HC just connect its TextPassThru filter which sends the subs to the ISR but still allows an external subtitle filter to connect?
How else would VSFilter or ffdshow get subs to render? :D
Unfortunately not. :(
I created a custom LAV Filters build to test it, and suddenly subtitles stopped functioning entirely. Fired up GraphStudioNext and connected it to the MPC remote graph, and I see this NullTextFilter connected to LAV Splitter instead of "DirectVobSub (auto-loading version)" which was connected to LAV Video and the Video Renderer only. Either MPC-HC seems to connect a NullTextFilter to any MEDIATYPE_Subtitle NULL pin before any DirectShow filter gets a chance to, or VSFilter never connects to such pins. This is with the TextPassThru filter disabled, MPC-HC ISR disabled, as well as "ignore embedded subtitles" checked. No idea why this behavior exists, but it does.
In any case, i wouldn't use a NULL type anymore, probably would look at the actual subs used and offer its types, because those it better supports, or it doesn't need to connect. ;)
I agree that this sounds like the best option for LAV Splitter, just make sure you test any such change with VSFilter and various media players before you commit. Who knows what other funky behavior could have been designed around the expectation of a MEDIATYPE_Text Null pin for disabled subtitles, considering both Haali & LAV use it for that purpose.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.