View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
CiNcH
27th December 2012, 12:32
Why can the ffmpeg parser only be used for the following formats resp. subtypes inside LAV Video?
if(codec == AV_CODEC_ID_MPEG1VIDEO || codec == AV_CODEC_ID_MPEG2VIDEO || pmt->subtype == FOURCCMap(MKTAG('H','2','6','4')) || pmt->subtype == FOURCCMap(MKTAG('h','2','6','4'))) {
m_pParser = av_parser_init(codec);
}
I think that if it was enabled for VC-1, sending fixed size ES chunks from the source filter instead of an exact frame per media sample would work as well, no?
nevcairiel
28th December 2012, 01:03
There's some glitches (no audio output at the L channel, the audio is stereo) with the audio when playing with a 720p rmvb file with raac audio after seeking for several times. This problem only appear when I use LAV Splitter, no problem with the splitter with mpc-hc 1.6.5 stable.
I got a sample file from clsid instead.
Try with this version, it should resolve the issue i hope, my own tests seem positive.
http://files.1f0.de/lavf/LAVFilters-0.54.1-68-ge480b02.zip
nevcairiel
28th December 2012, 09:59
I think that if it was enabled for VC-1, sending fixed size ES chunks from the source filter instead of an exact frame per media sample would work as well, no?
I don't think thats everything required for this use-case, depending on the exact behaviour of the source filter other steps may be required - not to mention that this code-path is only used for VC-1 DXVA, sofware decoding (in default settings) uses the wmv9 dmo decoder which can't use the parser yet.
I have it somewhere on my list to try to support splitters which don't deliver VC-1 in Microsofts spec, but it will be a while.
CiNcH
28th December 2012, 10:14
not to mention that this code-path is only used for VC-1 DXVA, sofware decoding (in default settings) uses the wmv9 dmo decoder which can't use the parser yet.
I recognized that too. I have seen that the QuickSync path even requires the sequence header as extra data in the connection media type.
BTW, something I did not have a look at yet... how does the QuickSync path work with the fixed size ES chunks that the DVBSource sends in case of MPEG-2 and H.264? Does QuickSync itself perform a NALU/frame parsing for those formats?
nevcairiel
28th December 2012, 10:35
I have seen that the QuickSync path even requires the sequence header as extra data in the connection media type.
All decoders require this (except CUVID). The ffmpeg based DXVA decoder and the wmv9 dmo decoder. However, this information is also available in-band, so the decoder could try to delay initialization and wait for this information, so it would be possible to work around this with some effort.
BTW, something I did not have a look at yet... how does the QuickSync path work with the fixed size ES chunks that the DVBSource sends in case of MPEG-2 and H.264? Does QuickSync itself perform a NALU/frame parsing for those formats?
I believe Eric has code for this in the IntelQuickSyncDecoder. Not sure if for VC-1 as well.
egur
28th December 2012, 14:55
I believe Eric has code for this in the IntelQuickSyncDecoder. Not sure if for VC-1 as well.
All I do is a basic parse of H264 streams and make sure they are HW compatible (remove AnnexB style info). The Intel Media SDK underneath my decoder does the rest (split or join packets). HW works one frame at time.
wanezhiling
28th December 2012, 16:55
The file has a "odd" FourCC used by one specific authoring tool, apparently.
There is two ways to fix such a file, either you overwrite the type in the splitter, or you make the decoder recognize the FourCC, i decided to do the second.
Another similar sample:http://pan.baidu.com/share/link?shareid=201287&uk=3558042035
LAV video decoder can not recognize the FourCC, MPC-HC/BE is fine.
clsid
28th December 2012, 22:29
If you add "3IV2" for the file above, then you could add "3IV1" as well while you're at it. Both are from 3ivX MPEG-4 encoder.
The rm fix is working great btw.
nevcairiel
28th December 2012, 22:30
Another similar sample:http://pan.baidu.com/share/link?shareid=201287&uk=3558042035
LAV video decoder can not recognize the FourCC, MPC-HC/BE is fine.
Fixed
If you add "3IV2" for the file above, then you could add "3IV1" as well while you're at it. Both are from 3ivX MPEG-4 encoder.
I added 3ivx, 3iv1 and 3iv2 (and the uppercase variants)
The rm fix is working great btw.
Great!
Anima123
29th December 2012, 01:34
Nevcairiel,
Thanks a lot for the fix. I know rm container sucks, however I have plenty of videos in this format.
As I can recall, Kostya said somewhere that he may intended to write a new rm splitter. I hope that he can find some time to do that in the end.
Regards,
mzso
29th December 2012, 03:21
Hi!
I have a blu-ray, which shows the movie title (possibly some others too) in a different language if I change the audio languge. I didn't find a way with LAV to change the video stream. So I'm guessing I can't?
wanezhiling
29th December 2012, 05:59
http://pan.baidu.com/share/link?shareid=201574&uk=3558042035
LAVF failed.
nevcairiel
29th December 2012, 08:38
http://pan.baidu.com/share/link?shareid=201574&uk=3558042035
LAVF failed.
File broken. :p
wanezhiling
29th December 2012, 08:48
PotPlayer is fine. (http://i.imgur.com/xrEbj.png)
It uses ffmpeg real codec. :rolleyes:
nevcairiel
29th December 2012, 08:49
Not decoding is the problem, but the demuxing fails.
wanezhiling
29th December 2012, 09:06
I see. PotPlayer's real splitter is just from offical real company...:o
nevcairiel
29th December 2012, 09:16
and LAV or MPC-HCs is not. :p
You can report a bug to ffmpeg or libav, but it just fails at demuxing the file.
wanezhiling
29th December 2012, 09:49
http://www.mediafire.com/?ba6444aui5ub6ku
LAVs FLV Splitter (http://i.imgur.com/cDgwx.png)
MPCs FLV Splitter (http://i.imgur.com/E96qU.png) is correct.:p
Anima123
29th December 2012, 10:49
Searching problem with wmv files when LAV splitter used
Today I tried LAV splitter for wmv by disable LAV Splitter Source and enable File Source (Async.) and experienced horrible lag of video when seeking. If letting LAV to decide, the M$ splitter will be used, and there's no problem seeking at all.
Is it a recommended way to use LAV Splitter for wmv files? If there's bugs within LAV Splitter for wmv files, could you please look into it Nev?
It is holiday season, I got that. So, no push from me at all. I hope Nev can enjoy his/her real life. Your work on LAV is much appriciated.
DragonQ
29th December 2012, 12:35
Who the hell uses Real codecs in 2012? They were terrible ten years ago and Real should've been left to die.
ryrynz
29th December 2012, 13:20
wanezhiling goes out of his way to find files that appear to break splitters & decoders or are in fact broken themselves, Real or not.
VipZ
29th December 2012, 14:22
Nev, do you still recommend building with VS2010 or could one safely compile with VS2012 now with your provided solution/project files?
filler56789
29th December 2012, 14:30
Who the hell uses Real codecs in 2012?
The Far East people, and wanezhiling is from the Far East. :)
They were terrible ten years ago and Real should've been left to die.
Sadly RealMedia still is alive :( and well :confused:
ryrynz
29th December 2012, 23:50
Nev, do you still recommend building with VS2010 or could one safely compile with VS2012 now with your provided solution/project files?
He just had that one commit that added support so I think that would be it, Nev isn't one to leave something half done.
Nev, I've been meaning to ask, does that mean your next release will be compiled by VS2012? Or perhaps you could offer a VS2012 version also?
nevcairiel
30th December 2012, 00:18
Why would i offer two versions? I never understood this obsession with compilers with MPC-HC or ffdshow, so i'm not going to start it.
I'll continue to use VS2010 for the forseeable future, because i'm no big fan of the VS2012 UI myself.
How well VS2012 builds work? I have no clue. I know it builds and it plays some files, if it behaves exactly the same as VS2010 or if there are any hidden bugs only present in a VS2012 build, i cannot say yet, and for obvious reasons until i myself switch, i cannot support builds with it.
SamuriHL
30th December 2012, 00:23
I can only speak for myself on this. I prefer to keep only one compiler installed. It's helpful if it's the latest compiler simply cause MS tends to focus on that the most for bug fixes, new features, whatever. For me, however, it's not an obsession. I don't much care what compiler is needed as long as I can compile what I need. Still, if I can compile everything with VS2012 then I'll reinstall it and get rid of 2010. I compile on my laptop so it's mostly a space thing for me.
Others, I think, are under the mistaken impression that compiling with the newest compiler is somehow going to make the product better or faster. Neither of which are particularly true. It's that whole "newer is better" mentality.
nevcairiel
30th December 2012, 00:25
http://www.mediafire.com/?ba6444aui5ub6ku
LAVs FLV Splitter (http://i.imgur.com/cDgwx.png)
MPCs FLV Splitter (http://i.imgur.com/E96qU.png) is correct.:p
The file was taken down.
ryrynz
30th December 2012, 01:04
Why would i offer two versions?
I figured XP compatibility was still an issue here.
I never understood this obsession with compilers with MPC-HC or ffdshow, so i'm not going to start it.
There's probably little in it but it would be nice to compare.
I'll continue to use VS2010 for the forseeable future, because i'm no big fan of the VS2012 UI myself.
I've heard that complaint before, fair enough.
How well VS2012 builds work? I have no clue.
Guess we'll just wait for someone to compile one.
Others, I think, are under the mistaken impression that compiling with the newest compiler is somehow going to make the product better or faster. Neither of which are particularly true. It's that whole "newer is better" mentality.
I've read about a number of improvements to VS2012, besides the UI, I got the impression it was overall a better compiler.
ranpha
30th December 2012, 03:40
VS2012 build works just fine, but it is not going to be faster than VS2010 build.
Core i3-3220 + GTX460. Test file is a random H264 m2ts file I ripped from a Blu-ray disc.
avcodec:-
Visual Studio 2012 Update 1 SSE2
122.68
Visual Studio 2010 SP1 SSE
124.1
QuickSync:-
ICL13 Update 1 SSE4.1
387.05
Visual Studio 2012 Update 1 SSE2
385.12
Visual Studio 2010 SP1 SSE
381.93
CUVID:-
Visual Studio 2012 Update 1 SSE2
63.77
Visual Studio 2010 SP1 SSE
63.78
ryrynz
30th December 2012, 04:46
Cheers for that, it's good to see the actual numbers.
turbojet
30th December 2012, 08:21
There's a problem with cuvid when resolution isn't mod4. Bad lines at the bottom, more explanation at http://forum.doom9.org/showthread.php?t=166811
avc, mpeg2, vc-1 are affected, I can't test mpeg4 asp. Here's a clip (http://www.sendspace.com/file/g5w1xm) encoded in the 4 different formats that might help diagnose. avcodec, dxvacb dxvan (h.264 only) and quicksync have no problem.
wanezhiling
30th December 2012, 08:34
The file was taken down.
http://www.sendspace.com/file/m2oii6
Try this.
nevcairiel
30th December 2012, 10:43
VS2012 build works just fine, but it is not going to be faster than VS2010 build.
The only parts which may change in speed are the custom converters, like using RGB output. Any other performance critical code is built with GCC anyway.
There's a problem with cuvid when resolution isn't mod4. Bad lines at the bottom, more explanation at http://forum.doom9.org/showthread.php?t=166811
avc, mpeg2, vc-1 are affected, I can't test mpeg4 asp. Here's a clip (http://www.sendspace.com/file/g5w1xm) encoded in the 4 different formats that might help diagnose. avcodec, dxvacb dxvan (h.264 only) and quicksync have no problem.
I cannot reproduce any issues anymore, but i did fix something like that a while ago (after the last release). Try with this version:
http://files.1f0.de/lavf/LAVFilters-0.54.1-68-ge480b02.zip
VipZ
30th December 2012, 12:21
Been testing my VS2012 build. So far there are no issues.
Tested colour conversion, sound output/mixing, deinterlacing, audio bitstreaming, DXVA copyback etc.
nevcairiel
30th December 2012, 12:57
http://www.sendspace.com/file/m2oii6
Try this.
Wasn't this supposed to be a FLV and not a MKV. o.O
Edit:
Oh its just named wrong.
nevcairiel
30th December 2012, 13:16
http://www.sendspace.com/file/m2oii6
Try this.
The file has a "duration" metadata which says 390 seconds, which translates to 6:30, so the file has just broken metadata.
MPC-HC doesn't read the metadata and instead tries to find the duration by seeking around in the stream, but ffmpeg reads the metadata and trusts it. Since FLV is primarily a streaming format, using the metadata is a much better choice.
wanezhiling
30th December 2012, 14:07
The duration of original file is http://i2.minus.com/i5VkibvRuEz7b.png
LAV reads the metadata http://i4.minus.com/iboJpW8BXbo4oV.png
Since FLV is primarily a streaming format, using the metadata is a much better choice.
Ok thanks for your explanation, its valuable for me.
turbojet
30th December 2012, 19:58
I cannot reproduce any issues anymore, but i did fix something like that a while ago (after the last release). Try with this version:
http://files.1f0.de/lavf/LAVFilters-0.54.1-68-ge480b02.zip
That fixed it, thanks!
6233638
30th December 2012, 22:06
Well here's a new problem. Just tried watching the DVD of Hard Boiled, and when using LAV Video for decoding - either DXVA or CPU decoding - subtitles are displayed as being translucent.
If I disable LAV Video, it seems that the subtitles are animated to fade in and out for each line spoken, and LAV only appears to display the first frame (almost transparent) for the entire duration.
First frame the subtitle appears in (http://www.abload.de/img/first-framec1zxp.jpg)
A few frames further, using the MPC-HC decoder (http://www.abload.de/img/late-framekkxna.jpg)
The result with LAV Video decoding (http://www.abload.de/img/lav-videowvag9.jpg)
I'll happily send you a sample, but I'm not quite sure how to grab a clip that includes all the subtitles etc.
(don't worry about the drop in resolution with the MPC-HC screenshot, I hadn't configured it at all, so it wasn't being deinterlaced)
nevcairiel
30th December 2012, 22:20
Well you will have to provide some kind of sample. If there are subtitles early in the main movie, provide all the menu files (IFO/BUP, VIDEO_TS.VOB, VTS_x_0.VOBs), and a cut of the main content file, enough to show the affected sub line. If the start has no subs like this, it'll get quite complicated, because the timing will probably have to match some timing in the IFO files, so you can't create a cut from the middle of the disc.
As an alternative, i could try to add extensive logging for all DVD related events and you could create a log with a debug build.
leeperry
31st December 2012, 02:24
I captured a bunch of youtube videos and I could either choose them to be in MP4 or WEBM (http://en.wikipedia.org/wiki/WebM) containers, the former work just fine with LAV but the latter don't seem to be (fully) supported? or at least they stuttered like hell in PotP :o
wanezhiling
31st December 2012, 02:59
Why not PotPlayer's fault? PotPlayer has many compatibility issues with famous external filters, madVR, ffdshow, VSfilter, AV Splitter, LAV Filters...
doubleJ
31st December 2012, 08:26
So, I've been using FFDShow for years (by virtue of CCCP).
Now, I've switched to Lav Audio (by virtue of CCCP).
My receiver doesn't support AAC, but I could do a real-time transcode to AC3 with FFDShow (AC3Filter used to work, as well).
How do I go about doing that with Lav Audio?
I read something about using ReClock and WASAPI, but I'd rather not have to install something on top of CCCP if I didn't have to (I didn't have to with 2011-11-11).
JJ
nevcairiel
31st December 2012, 09:28
LAV is a decoder, it does not offer transcoding features like that, and never will.
I captured a bunch of youtube videos and I could either choose them to be in MP4 or WEBM (http://en.wikipedia.org/wiki/WebM) containers, the former work just fine with LAV but the latter don't seem to be (fully) supported? or at least they stuttered like hell in PotP :o
WebM is just Matroska, it works just fine for me.
If you have a specific sample, upload it somewhere, but i recommend also trying briefly in another player.
JEEB
31st December 2012, 12:50
So, I've been using FFDShow for years (by virtue of CCCP).
Now, I've switched to Lav Audio (by virtue of CCCP).
My receiver doesn't support AAC, but I could do a real-time transcode to AC3 with FFDShow (AC3Filter used to work, as well).
JJ
As nevcairiel has already said, as it is only a decoder, there is no such feature. You can basically register your favourite encoder via the DirectShow filter in MPC-HC's external filters listing as "preferred" and enabling re-encoding there when needed. I just checked this with the "ffdshow Audio Processor" filter and it seems to generally work (tested with mixing enabled in it and disabled in LAV, but I would guess re-encoding would work as well).
I'll have to look into this generally, and then write up a FAQ entry about it as relatively many people still seem to need S/PDIF level 5.1 bit streaming from sources that aren't such to begin with. Also I'll have to see which of the alternatives is the most useful in such regard (and most unobtrusive while doing it).
nevcairiel
31st December 2012, 16:15
Well here's a new problem. Just tried watching the DVD of Hard Boiled, and when using LAV Video for decoding - either DXVA or CPU decoding - subtitles are displayed as being translucent.
If I disable LAV Video, it seems that the subtitles are animated to fade in and out for each line spoken, and LAV only appears to display the first frame (almost transparent) for the entire duration.
First frame the subtitle appears in (http://www.abload.de/img/first-framec1zxp.jpg)
A few frames further, using the MPC-HC decoder (http://www.abload.de/img/late-framekkxna.jpg)
The result with LAV Video decoding (http://www.abload.de/img/lav-videowvag9.jpg)
Try this build, it should support fade-in/fade-out animations like those:
http://files.1f0.de/lavf/LAVFilters-0.54.1-76-gd52abc1.zip
In theory it would also be possible to do color or position animations with the same mechanic in the DVD decoder, but without a sample which actually uses this, i'm a bit reluctant to hack it in there.
If someone finds a sample DVD with subs which should be animated, but LAV does not do it, please let me know.
bugmen0t
31st December 2012, 17:00
can you split cheklist filter on hardware acceleration from HD to HD(720) and full HD (1080p)
current lav filter(54.1) . HD cheklist is both 720 and 1080. thats annoying
you should not put 720 and 1080 on the same checklist. 1080p is called full HD, beyond that is Ultra HD
i request this because my gpu is not strong for 1080p(full HD)dxva2
but still able to handle 720p(HD) dxva2
so i want to disable hardware acceleration on content higher than 720p
wanezhiling
31st December 2012, 17:13
:p My old 8400M GS is easy for 1080p dxva2.
doubleJ
31st December 2012, 17:21
As nevcairiel has already said, as it is only a decoder, there is no such feature. You can basically register your favourite encoder via the DirectShow filter in MPC-HC's external filters listing as "preferred" and enabling re-encoding there when needed. I just checked this with the "ffdshow Audio Processor" filter and it seems to generally work (tested with mixing enabled in it and disabled in LAV, but I would guess re-encoding would work as well).
I'll have to look into this generally, and then write up a FAQ entry about it as relatively many people still seem to need S/PDIF level 5.1 bit streaming from sources that aren't such to begin with. Also I'll have to see which of the alternatives is the most useful in such regard (and most unobtrusive while doing it).
Yeah, most .mp4 files use AAC-LC audio and most receivers don't.
Hehehe...
So, I'll need to install FFDShow or AC3Filter, then?
That's unfortunate.
JJ
andyvt
31st December 2012, 17:25
So, I'll need to install FFDShow or AC3Filter, then?
That's unfortunate.
JJ
Or Reclock, or use HDMI...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.