View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
nevcairiel
6th April 2011, 12:05
I'll test that later, thanks for the reports.
jmone
6th April 2011, 13:41
While I am away with work and can not test, I'm pretty excited about the direct MPLS support as you could in MC, import multiple MPLS from the same stored disc structure, eg the one for the Std Theatrical Release, One for the EE, One for Alternative ending etc depending on your preference. I guess you could also import one for each epesode etc for a disc with multipleTV Shows etc.
I can confirm that this works just fine in JR MC. Imported the 00000.mpls (Theatrical Version) and 00006.mpls (Alternative Ending) from a folder structure, tagged them up / added coverart etc and now I have one disc structures but 2 versions available from TheaterView. Nice!
hoborg
6th April 2011, 14:43
@nevcairiel:
Thanks for .20!
I added two audio playback related issues in to GitHub project page.
nevcairiel
6th April 2011, 15:28
Same problem! "cannot render the file " but working with MPC-HC's internal splitter
EDIT Galapagos it's working too
Stupid question, but you don't happen to have those BDs in a directory with non-ascii characters in it?
hoborg
6th April 2011, 17:34
@nevcairiel:
Is it possible to use LAVF Audio Decoder for DVD playback?
There is no problem to play VOB files, but if i play "Video_ts.ifo" for example in MPC-HC, it will fall back to "AC3 Audio decoder (low merrit)".
Looks like MS DVD Navigator + LAVF audio decoder refuse connection.
nevcairiel
6th April 2011, 17:36
Not right now, no. It might be, but i didnt really invest any energy in that yet.
hoborg
6th April 2011, 17:43
Not right now, no. It might be, but i didnt really invest any energy in that yet.
Thanks for info.
I think you should add this info to known issues or missing features.
Mercury_22
6th April 2011, 19:11
Stupid question, but you don't happen to have those BDs in a directory with non-ascii characters in it?
:) No I don't
I saw you've made some changes : debugger ? do you want me to use it?
nevcairiel
6th April 2011, 19:14
:) No I don't
Are you sure? that would so neatly explain it. :)
If you can, build the latest version, including the updated libbluray, and see what happens.
If you can run it from inside Visual Studio in debug mode, you would get some output from libbluray in the Output window, which would be helpful in figuring out whats going on.
I'm adding output of that debug infos into a file soon too.
I
I used a french BR with two French audio tracks, one in DTS HD and the other in regular DTS (the commentaries of the director). LAV Splitter choose by default the regular DTS track (by the way here maybe you can improve the behavior of you slitter and choose, as the MPC internal Splitter does, the "better track" format so here by default the DTS HD track). I changed it to DTS HD and I got a black screen so I seek in another part of the movies and the video play again correctly but with no more sound except if I choose back the regular DTS track.
If I use LAV Audio, this issue is not present so clearly it is due to Arcsoft Audio Decoder.
Ok, i tested this, and it seems to work just perfectly. I tested on the german version of the Iron Man 2 BluRay, which has 2 DTS-HD MA Tracks, and one DTS commentary track. I can switch from the HD track to the commentary track, and audio keeps playing. I can switch between the HD tracks no problem. I tried on another file, which had a DTS-HD MA and a AC3 stream - if i switch to the AC3 stream, MPC-HC switches to LAV Audio, when i switch back to the DTS-HD stream, ArcSoft Audio Decoder gets used again. Its working 100% as intended.
Only other reason i could think of would be your player. I do all my tests in MPC-HC, and its working perfectly smooth there.
SamuriHL
6th April 2011, 19:17
Are you sure? that would so neatly explain it. :)
If you can, build the latest version, including the updated libbluray, and see what happens.
If you can run it from inside Visual Studio in debug mode, you would get some output from libbluray in the Output window, which would be helpful in figuring out whats going on.
I'm adding output of that debug infos into a file soon too.
You should make it so we can output to DbgView.exe and capture stuff that way. That's how we helped Albain with the bitstreaming code in ffdshow.
nevcairiel
6th April 2011, 19:19
You should make it so we can output to DbgView.exe and capture stuff that way. That's how we helped Albain with the bitstreaming code in ffdshow.
Why didn't i know about this tool before?
I don't need to do anything, you just need to be running a debug build, and that tool can catch my debug output already. I was using the proper debugging routines for this, just that i normally read them in the VS output panel. :)
SamuriHL
6th April 2011, 19:20
Why didn't i know about this tool before?
I don't need to do anything, you just need to be running a debug build, and that tool can catch my debug output already.
Good question. :D Yea, that's what it was...we needed the debug version. I remember now. It works very well. We spent weeks helping albain using that.
SamuriHL
6th April 2011, 19:23
Right, so, guys who want to help Nev find problems, if you're building your own releases, just build the debug version and use DbgView:
http://technet.microsoft.com/en-us/sysinternals/bb896647
Maybe Nev can provide debug versions to test with, as well, for those who aren't building but would like to help? ;)
nevcairiel
6th April 2011, 19:44
:) No I don't
I figured out whats with your discs, or at least one of them.
It thinks they are still encrypted. I'm not sure if they really are, but it thinks they are.
I disabled the check in libbluray, please update and build a new copy of LAV Splitter and libbluray, and try again.
If that doesn't help, i need the debug logs. :)
noee
6th April 2011, 20:16
I have a reasonable debug env, but I can't (currently) build the project.....anyone wanna shoot me a debug version?
SamuriHL
6th April 2011, 20:31
I have a reasonable debug env, but I can't (currently) build the project.....anyone wanna shoot me a debug version?
http://www.mediafire.com/file/c372832k615835z/LAVFSplitter-samuri-04062011.zip
I just built it from source. It has both 32 and 64 bit debug. I didn't include the bat files for installing or uninstalling.
I could have removed the exps and libs, but, well, I'm lazy. :)
Blight
6th April 2011, 20:48
Hi,
Quick Question:
When creating the LAV Splitter and adding a source file name using the IFileSourceFilter interface. Why does the "Load" function returns a value of "1" (S_FALSE) rather than the usual success code of "0" (S_OK) ?
nevcairiel
6th April 2011, 20:51
Hi,
Quick Question:
When creating the LAV Splitter and adding a source file name using the IFileSourceFilter interface. Why does the "Load" function returns a value of "1" (S_FALSE) rather than the usual success code of "0" (S_OK) ?
Good question. Its fixed in the next version to return S_OK.
Mercury_22
6th April 2011, 20:59
I figured out whats with your discs, or at least one of them.
It thinks they are still encrypted. I'm not sure if they really are, but it thinks they are.
I disabled the check in libbluray, please update and build a new copy of LAV Splitter and libbluray, and try again.
If that doesn't help, i need the debug logs. :)
Working now :thanks: but again the vc-1 i it's very very choppy and I've tested all the new splitter's settings (enable/disable) with the same results (using arcsoft video & audio)
P.S. Frame correction doesn't help either
nevcairiel
6th April 2011, 21:02
The new video stream parsing option will most likely need you to restart the player.
If its set to off, and the VC1 option is off too, and it still doesn't work right, well, nothing else to do.
VC1 is just broken. Either use another decoder, or another renderer. Personally, i have never had any issues with madVR, but of course you cannot use that with DXVA. In EVR-CP, enabling frame time correction seemed to generally fix that problem, but not always. I've had better results with the Cyberlink decoder then the ArcSoft decoder, though.
The commercial decoders are usually designed to work with the other components as well, that is the ArcSoft demuxer and the ArcSoft renderer .. one of those is probably designed to fix that.
Mercury_22
6th April 2011, 21:20
Too bad cause now I can't even play the VC-1 i m2ts file without very "choppy" video not even with WMVideo decoder DMO and Frame correction ON!
nevcairiel
6th April 2011, 21:22
I didn't change anything, really. I just added the option to change it yourself. If you set the VC-1 option to indetermined and the video parsing option to on, it should behave exactly like 0.19 and 0.20 (short of any changes in ffmpeg between those two versions)
Mercury_22
6th April 2011, 21:25
I was using Nevcairiel-LAVFSplitter-83dbb65 I'll try again with Nevcairiel-LAVFSplitter-a263b10 let me compile it and I'll report back
EDIT: It's the same :mad: How is VC-1 i on your end ?
Frame correction helps but it's not as smooth as before I'll test the official 0.2 and I'll report back
Snowknight26
6th April 2011, 21:38
Seeking in this 3 hour long, 70MB M2TS is a bit flaky. Sometimes seeking goes straight to the end, sometimes it doesn't.
http://stfcc.org/misc/amergang2.full.m2ts
Unfortunately for me, this is also the longest playlist on the American Gangster Blu-ray (and as a result, is played when opening index.bdmv).
Also, regarding the out-of-sync-audio issue.. I think it only occurs when LAVSplitter takes a little longer than usual correct the timestamps. I seek in a random file, the video plays at half framerate for almost a second, then it stabilizes, but by then the audio is off by a few hundred milliseconds.
Apart from these minor issues, I love it. :D
nightfly
6th April 2011, 21:48
How are you checking this? Via ctrl-J in mpc? I only get the audio lag field when using evr-sync.
...
Also, regarding the out-of-sync-audio issue.. I think it only occurs when LAVSplitter takes a little longer than usual correct the timestamps. I seek in a random file, the video plays at half framerate for almost a second, then it stabilizes, but by then the audio is off by a few hundred milliseconds.
Apart from these minor issues, I love it. :D
hoborg
6th April 2011, 21:49
About VC-1:
I was not able to play VC-1 (m2ts) with LAVF splitter smoothy too (http://www.volny.cz/hoborg/vc-1i_m2ts_lavf+ffdshow.jpg) - no matter what LAVF timestamps correction are on/off/auto.
Using MPC-HC internal gabest splitter + FFDshow video decoder set to wmv9 = perfect playback (http://www.volny.cz/hoborg/vc-1i_m2ts_gabest+ffdshow.jpg).
So what is doing gabest splitter diferently?
Graphstudio video (http://www.youtube.com/watch?v=8Wwqbweoxjo).
Mercury_22
6th April 2011, 21:52
Just tested the official 0.20 and VC-1 i m2ts and index.bdmv ( except those not working at all :) ) are playing very smooth ! Something got broken since then and now (Nevcairiel-LAVFSplitter-a263b10)
Snowknight26
6th April 2011, 22:59
Any chance of being able to edit LAVSplitter/LAVAudio settings without going through the player? Some DLL entry point such as ffdshow has (configure/configureAudio) would do the trick.
Blight
6th April 2011, 23:30
Hi,
Another question:
After registering LAV Splitter, the "File Source Async" output pin sub-type for AVI changes from "{E436EB88-524F-11CE-9F53-0020AF0BA770}" to "{8489F3C9-15FB-4C8F-A8A7-07D4755F5B88}".
The Microsoft AVI splitter does not recognize this new sub-type and can no longer connect to the "File Source Async" filter. Is it intentional? If so, what is the reason for it and can it be avoided?
nevcairiel
7th April 2011, 06:29
I do not use the file source async, nor do i know how it determines its output pin types. All lavsplitter does is add its mediatypes to the registry, if that is enough to make the file source go all weird on us..
I can try to figure out why its doing that, but i really dont know whats the use of that change, and its not intentional because lav splitter is its own source filter.
As i understand the source filter selection, the File Source should only be used for media types/byte markers it registers itself for. Why would it suddenly start using the media type/byte markers i register for my Source Filter?
How can i ever co-exist with another source filter, if it hijacks my media type, instead of using the media type it itself signed up for?
FWIW, i have not seen these issues in MPC-HC, though. I can disable all internal filters and LAV Splitter, and it does fall back to the windows AVI splitter.
You aren't doing any custom graph building and Async File Source creation that would cause this funnyness, are you?
nevcairiel
7th April 2011, 06:46
Just tested the official 0.20 and VC-1 i m2ts and index.bdmv ( except those not working at all :) ) are playing very smooth ! Something got broken since then and now (Nevcairiel-LAVFSplitter-a263b10)
I think i know what broke, i'll fix it later.
I was not able to play VC-1 (m2ts) with LAVF splitter smoothy too (http://www.volny.cz/hoborg/vc-1i_m2ts_lavf+ffdshow.jpg) - no matter what LAVF timestamps correction are on/off/auto.
I just assume you're using a recent build as well, and not 0.20?
Any chance of being able to edit LAVSplitter/LAVAudio settings without going through the player? Some DLL entry point such as ffdshow has (configure/configureAudio) would do the trick.
I suppose thats possible to add, but not on the list of my most urgent tasks.
hoborg
7th April 2011, 07:26
I just assume you're using a recent build as well, and not 0.20?
I am on official .20 x86 - there is newer available to test? Where?
Matching_Mole
7th April 2011, 08:00
Ok, i tested this, and it seems to work just perfectly. I tested on the german version of the Iron Man 2 BluRay, which has 2 DTS-HD MA Tracks, and one DTS commentary track. I can switch from the HD track to the commentary track, and audio keeps playing. I can switch between the HD tracks no problem. I tried on another file, which had a DTS-HD MA and a AC3 stream - if i switch to the AC3 stream, MPC-HC switches to LAV Audio, when i switch back to the DTS-HD stream, ArcSoft Audio Decoder gets used again. Its working 100% as intended.
Only other reason i could think of would be your player. I do all my tests in MPC-HC, and its working perfectly smooth there.
You're right, with all other blu-ray I tested no issue (and I use also MPC). I thinks it's maybe related more to the fact that in this specific blu-ray the DTS HD is 1.0. No issue with MPC internal splitter but with your splitter, as soon as I change the audio track to the DTS HD 1.0 the video is stopped and no more sound (only with Arcsoft Audio decoder). All back to normal as soon I selected again the regular 2.0 DTS audio Track.
Do you want a sample or something to check from your side?
nevcairiel
7th April 2011, 08:03
I am on official .20 x86 - there is newer available to test? Where?
All reports i ever got said that with 0.19 and 0.20, VC-1 works just fine. You may need Frame Time Correction for EVR-CP, but otherwise it works. It got broken in a recent change (after 0.20)
Do you want a sample or something to check from your side?
If you could upload a short sample of the affected m2ts file, that would be great.
hoborg
7th April 2011, 08:14
All reports i ever got said that with 0.19 and 0.20, VC-1 works just fine. You may need Frame Time Correction for EVR-CP, but otherwise it works. It got broken in a recent change (after 0.20).
It is easy to reproduce.
It happend even with normal EVR in graphstudio. I used EVR-CP only becouse of stats in screenshots.
Should i post you the m2ts sample? I think i already did (http://rapidshare.com/files/456274227/m2ts.VC-1i_DTS.zip).
nevcairiel
7th April 2011, 08:35
Should i post you the m2ts sample? I think i already did (http://rapidshare.com/files/456274227/m2ts.VC-1i_DTS.zip).
I did test that sample when i added that option to disable the VC-1 timestamp correction. If that option is off, it outputs the exact same data packets as the gabest splitter, with one minor difference, that mine have a duration set, and the gabest packets all have a duration of "1".
Sadly, my work laptop is not fast enough to decode it in software, so playback is always rather broken. I will check back when i get home.
Matching_Mole
7th April 2011, 09:29
If you could upload a short sample of the affected m2ts file, that would be great.
here the sample :
http://www.megaupload.com/?d=P7AX1FC2
pankov
7th April 2011, 10:01
You aren't doing any custom graph building and Async File Source creation that would cause this funnyness, are you?
I'm a long time ZoomPlayer user and from my point of view this is actually what ZoomPlayer does and makes it the best player from configuration point of view. We, the users, have total control of what filters (sources/splitters/decoders/renderers) are used for each file type/extension or media subtypes.
If you have the time you can take a look - now that the demo version is back.
But even if you don't I think this is somewhat similar to the MPC-HC's way of configuring preferred filters ... and source filters/splitters ... but I've read somewhere that it doesn't work with source filters. If it was I guess you'll get the same problem if you select the MS AVI Splitter as preferred. Sadly I'm not advanced enough user of MPC-HC and I'm not sure I can test/replicate the problem with it
:o
nevcairiel
7th April 2011, 10:05
I'm a long time ZoomPlayer user and from my point of view this is actually what ZoomPlayer does and makes it the best player from configuration point of view.
In any case, after double checking the matter, i do nothing that i'm not supposed to do. I strictly follow the way a source filter is supposed to register itself. MPC-HC deals with it just fine, if other players don't - i blame them, or at least can't help them unless they tell me what is happening exactly.
pankov
7th April 2011, 10:10
nev,
don't get me wrong, I'm not blaming you for anything.
I'm just begging/hoping you and Blight can sort it out, 'cause we ZoomPlayer users really miss your splitter.
I'm very grateful for all your work.
btw
can you post a test build with the fix, you've made for the return value of the Load routine?
edragon
7th April 2011, 10:34
the lav audio decoder when playing flac file couses corruptions
nevcairiel
7th April 2011, 10:51
the lav audio decoder when playing flac file couses corruptions
The avcodec flac codec does not seem to be really that good. I recommend a decoder using libflac, like madFlac, for example.
I will probably turn flac support off by default in the next version, until i can decide how to solve this.
Blight
7th April 2011, 11:10
I do not use the file source async, nor do i know how it determines its output pin types. All lavsplitter does is add its mediatypes to the registry, if that is enough to make the file source go all weird on us..
I can try to figure out why its doing that, but i really dont know whats the use of that change, and its not intentional because lav splitter is its own source filter.
As i understand the source filter selection, the File Source should only be used for media types/byte markers it registers itself for. Why would it suddenly start using the media type/byte markers i register for my Source Filter?
How can i ever co-exist with another source filter, if it hijacks my media type, instead of using the media type it itself signed up for?
FWIW, i have not seen these issues in MPC-HC, though. I can disable all internal filters and LAV Splitter, and it does fall back to the windows AVI splitter.
You aren't doing any custom graph building and Async File Source creation that would cause this funnyness, are you?
You can reproduce this issue in GraphEdit by pointing the "File Source Async" to an AVI file with and without LAV Splitter being registered (no other filters in the graph).
My guess is that it's related to the registry changes.
It is possible to have multiple source filters for the same content without this side-effect. For example, this problem doesn't occur if I register the MPC AVI Splitter (standalone filter).
I don't believe MPC-HC fall back to the windows AVI splitter, I think it falls back to the MPC AVI Splitter (which is able to connect with the new sub-type).
nevcairiel
7th April 2011, 11:12
It is possible to have multiple source filters for the same content without this side-effect. For example, this problem doesn't occur if I register the MPC AVI Splitter (standalone filter).
The MPC AVI Splitter is a splitter, not a source filter. It uses the File Source Async.
I basically have two choices (and a third one thats alot more work to implement)
- Use my own subtype like i always did, which works fine with most other source filters, like Haali, etc, but according to you breaks the File Source (async).
- Use the "official" subtypes for common formats like AVI, overwriting the previous source filter in the registry.
(- Support using the File Source (async) and use LAV Splitter only as a splitter.)
The second way might work with the File Source (async), because players typically use some special code that loads it when no other source filter is found, but it does not allow registering two source filters for the same file type. I can register Haali as well, how does it deal with that?
I suppose it would not affect that many types, really only the file types MS offers splitters for, that is AVI, their WMV formats, and thats it?
I could live with the second option, if it only affects AVI, and maybe 1-2 other types.
Sebastiii
7th April 2011, 11:18
here the sample :
http://www.megaupload.com/?d=P7AX1FC2
Salut :) I will test this sample too :)
Merci,
Seb.
Blight
7th April 2011, 14:38
The MPC AVI Splitter is a splitter, not a source filter. It uses the File Source Async.
I basically have two choices (and a third one thats alot more work to implement)
- Use my own subtype like i always did, which works fine with most other source filters, like Haali, etc, but according to you breaks the File Source (async).
- Use the "official" subtypes for common formats like AVI, overwriting the previous source filter in the registry.
(- Support using the File Source (async) and use LAV Splitter only as a splitter.)
The second way might work with the File Source (async), because players typically use some special code that loads it when no other source filter is found, but it does not allow registering two source filters for the same file type. I can register Haali as well, how does it deal with that?
I suppose it would not affect that many types, really only the file types MS offers splitters for, that is AVI, their WMV formats, and thats it?
I could live with the second option, if it only affects AVI, and maybe 1-2 other types.
The MPC AVI Splitter contains two two filters "MPC - Avi Splitter" and "MPC - Avi Source".
The AVI Source filter, works like LAV Splitter, but doesn't take over the registry entries.
This probably causes it to never load by default if DirectShow itself is building the graph, but still allows it to be used if a player/user wants it.
Is it possible to make the AVI registry entries optional during the LAV install, with a default of not applying the registry changes for AVI?
This way, users who still want LAV AVI support can select to enable it during the install, but by default, LAV Splitter will maintain backwards compatibility with the windows AVI Splitter.
nevcairiel
7th April 2011, 14:50
The MPC AVI Splitter contains two two filters "MPC - Avi Splitter" and "MPC - Avi Source".
Thats the key to all that, it does have a Source, but its never used. DirectShow will *never* load it by default, unless you force it.
Is it possible to make the AVI registry entries optional during the LAV install, with a default of not applying the registry changes for AVI?
This way, users who still want LAV AVI support can select to enable it during the install, but by default, LAV Splitter will maintain backwards compatibility with the windows AVI Splitter.
In case you haven't noticed, there isn't much of an installer. If there was, that would be an option.
I still think that i'm doing it 100% right - the Async File Source is not registered as a source filter for my Subtype, so why does it use it? I just add keys to the registry, i don't modify any existing ones.
Like i said in my previous post, i can change it so that my source uses the same subtype for AVI that the MS AVI Splitter expects. Personally i don't like that way very much, because it doesn't allow you to easily install two source filters next to each other, but it would "fix" the media type of the Async File Source.
But, then i ask myself, why would anyone want to? The MS AVI Splitter doesn't really have any magnificient features that mine or the MPC-HC AVI Splitter does not have.
Anyway, i'll change it so that it uses the default AVI type, and not my custom one.
One question that keeps popping up: Does the File Source (async) output custom media types for any other files? Usually it just spits out MEDIASUBTYPE_NULL (except for AVI, apparently), unless some registry entry like mine confuses it.
Edit: Looks like the Windows internal MPEG-1 and MPEG-2 Demultiplexer also uses it, can throw all MPEG types into there apprioriate categories as well, i guess.
The WMV splitters don't use the File Source (Async), so they don't care.
clsid
7th April 2011, 15:25
I will probably make a installer next week, or maybe tomorrow if I have some time. That will be able to configure which formats the splitter handles.
For those who like to experiment with using the splitter for formats for which it isn't registered by default. You can force its use for a file extension with this tweak:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Media Type\Extensions\.xyz]
"Source Filter"="{B98D13E7-55DB-4385-A33D-09FD1BA26338}"
Post your findings here. Then I can add options to the installer for working formats.
nevcairiel
7th April 2011, 16:10
Here is what i'll do:
- First, i'll set the AVI subtype i use to the one MS uses, which will allow the MS AVI Splitter to still be used, and should solve the problem at hand.
- At a later stage, i'll allow using LAV Splitter with another source filter (File Source (Async) or other streaming sources), and make that the default mode for most single-file based formats (BluRay will require to always use as a source filter), unless some player directly requests source filter usage (which would be more efficient)
- Aside from those changes, I'll evaluate options for installers.
The first will go in .21, the second in a yet unknown revision (soon).
nevcairiel
7th April 2011, 16:29
It is easy to reproduce.
It happend even with normal EVR in graphstudio. I used EVR-CP only becouse of stats in screenshots.
Should i post you the m2ts sample? I think i already did (http://rapidshare.com/files/456274227/m2ts.VC-1i_DTS.zip).
I did test that file again, and yes, it does not work perfect with ffdshow in wmv9 mode, however the glitches are really very minor, at least with my development version here.
I see 9 dropped frames, just at the beginning of the movie, everything else seems "ok". This is with EVR-CP and Frame Time Correction on, VC-1 timestamp option on "Auto" in LAV Splitter.
It also seems fine in madVR.
It does however play perfect with the following:
- LAV CUVID Decoder
- Cyberlink PDVD Decoder
- ArcSoft Video Decoder
I admit that VC-1i is not fully supported, therefor i just call it broken until ffmpeg supports VC-1i. There are a multitude of decoders available that do support it, including the standard windows decoder.
Personally, i don't see the point of ffdshow in wmv9 mode anyhow. Its the same decoding as the WMVIdeo Decoder DMO, just in another packaging.
Btw, weren't you one of those that made me write the compat mode for the Cyberlink decoder for VC-1 anyway? :d
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.