View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
sneaker_ger
4th November 2013, 12:22
[B]Another maybe note-worthy change is that i moved to Visual Studio 2012 and GCC 4.8.2 with this build.
Just for the record: crashes with EMET.
nevcairiel
4th November 2013, 12:23
Just for the record: I don't care. :)
EMET is known to cause instability, and I would never recommend using it to anyone.
sneaker_ger
4th November 2013, 12:43
I know. Which gcc did you use for the 0.58.2 release?
nevcairiel
4th November 2013, 13:09
Probably still 4.7.3, not sure when exactly i switched everything over to 4.8
Carpo
4th November 2013, 13:34
building now :D
andybkma
4th November 2013, 14:20
So far you seem to be alone. I also tested a variety of files and couldn't reproduce any issues here.
MPC-HC has also been using a version close to 0.59 for a while in nightly builds, and i haven't heard anything from them, either.
nev, here is the first 10 seconds of one of the mp4 AAC files that won't play sound with LAV .59. The clip plays fine with LAV .58.1 and also with PotPlayer using its own internal filters. Cheers for your help :-) If you need another sample, pls let me know...
http://depositfiles.com/files/0hllxnd7z
nevcairiel
4th November 2013, 14:55
nev, here is the first 10 seconds of one of the mp4 AAC files that won't play sound with LAV .59. The clip plays fine with LAV .58.1 and also with PotPlayer using its own internal filters. Cheers for your help :-) If you need another sample, pls let me know...
http://depositfiles.com/files/0hllxnd7z
I can reproduce the problem, the AAC decoder freaks out and claims all sorts of brokenness in the file. I'll have to dig deeper, i guess.
filler56789
4th November 2013, 15:06
FWIW, demuxing with ffmpeg and remuxing with L-Smash made LAV Audio "understand" the pesky file.
P.S.: Remuxed file @ http://www.mediafire.com/download/qj084sle8cn9x1q/0059-with-sound.mp4
nevcairiel
4th November 2013, 16:27
I found the issue, it was not in the AAC decoder but the MOV/MP4 demuxer which slightly broke the AAC stream (which i guess L-Smash managed to fix again).
Its fixed in LAV and i also sent a patch to ffmpeg for inclusion.
I'll wait a few more hours for any other potential reports and then release a bugfix version.
Thunderbolt8
4th November 2013, 18:32
do you think it might be an issue with power settings? that is, vlc is using the cpu, thus preventing throttling, leading to increased performance?
cause i dont think anything can impact the system less than evr and dxva native.
also, check to make sure dxva native is actually being used in lav video, it may not be compatible with a filter you are using or something.throttling of the CPU or the GPU? from what I noticed, CPU seems to be at ~50% max according to windows 8.1 task manager.
im not using other filters than LAV splitter, audio and video atm.
LeChuck
4th November 2013, 19:58
LAV Filters 0.59
LAV Audio
- Fixed playback issues on a few DTS and DTS-HD tracks
Problem with audio going silent on DTS-HRA tracks is fixed.
Thank you!
nevcairiel
4th November 2013, 21:46
LAV Filters 0.59.1
LAV Splitter
- Fixed a regression when demuxing AAC audio from MP4/MOV files
Download: Installer (both x86/x64) (http://files.1f0.de/lavf/LAVFilters-0.59.1.exe) -- Zips: 32-bit (http://files.1f0.de/lavf/LAVFilters-0.59.1.zip) & 64-bit (http://files.1f0.de/lavf/LAVFilters-0.59.1-x64.zip)
In case you missed 0.59, it was posted here (http://forum.doom9.org/showthread.php?p=1651262#post1651262).
This version only includes a small regression fix, surprisingly the only one that showed up after more then 24 hours in the wild, i fully expected more issues after such a long time between releases and many changes in FFmpeg.
Anyway, take care!
Reino
4th November 2013, 22:24
Nev, what are your thoughts on post1632484 & post1633682?
nevcairiel
4th November 2013, 22:37
Embedded Cue Sheet support is planned for a future version. The hover info should be fairly easy to do, I'll try to remember on a rainy day.
James Freeman
4th November 2013, 23:21
nevcairiel,
Are you taking the "Show Video Bitrate" into consideration?
FreeFall
5th November 2013, 03:17
nevcairiel,
Playback stalls with this Blu-ray Disc sample using MPC-HC. At around 2 min during the roll of the credits it only happens when played back from its playlist file (00004.mpls). Playback will resume after about a minute and play normally.
The Disc uses two streams one for the episode and one for the credits both the m2ts files playback fine on their own.
H264 / DTS-HD 2.0
http://www.sendspace.com/file/4uwhhe
The video plays without any problems using MPC-BE or it's splitter in combination with LAV Video / Audio decoders.
Subtitle lines at 33 and 39 sec are delayed with Madvr or EVR using internal(Madvr) or xy-VSfilter(EVR) sub renderers, EVR-CP seems fine for some reason.
H264 / LPCM 2.0
http://www.sendspace.com/file/ub3gpg
Tested the same as above using MPC-BE's internal splitter in combination with LAV Audio / Video without any problems.
Thanks.
nevcairiel,
When you have time could you take a look at these samples again, still having the same problems with 0.59.1, both play without any problems using mpc-be's splitter with LAV Video / Audio decoders.
Thanks.
nevcairiel
5th November 2013, 07:13
Are you taking the "Show Video Bitrate" into consideration?
Its unlikely for such a feature to be implemented.
nevcairiel
5th November 2013, 09:43
When you have time could you take a look at these samples again, still having the same problems with 0.59.1, both play without any problems using mpc-be's splitter with LAV Video / Audio decoders.
It seems like the first sample is broken slightly, at the end of the first clip it contains a broken DTS frame (possibly cut badly), and the credits don't contain any audio at all, which makes it go a bit crazy. Transitioning from audio to no audio is a bit problematic in DirectShow as it is, adding the broken audio frame on top doesn't improve the situation, sadly.
I'll see if i can do something.
FreeFall
5th November 2013, 11:28
I used Dgsplit to cut the sample from the original Blu-ray and left the credits untouched, the original disc has the same problem during playback every time the credits roll at the end of each episode.
The Blu-ray is a region A disc from Sentai Filmworks, Dusk Maiden of Amnesia (Anime), All of their discs seem to be authored the same way, episode + credits without audio. I have a few other titles from them and they all have the same problem during playback with LAV splitter.
Thanks.
James Freeman
5th November 2013, 11:42
Its unlikely for such a feature to be implemented.
Is there any other way?
Besides "Bitrate Viewer" software.
I also don't want to use ffdshow.
nevcairiel
5th November 2013, 12:01
I used Dgsplit to cut the sample from the original Blu-ray and left the credits untouched, the original disc has the same problem during playback every time the credits roll at the end of each episode.
Well, here is how it is.
As far as i can see, the problem is quite simple - it happens once LAV hits the end of the file, with approximately 700 frames in its own buffer, or around 29 seconds (at 24p) before the movie ends.
At that point, LAV queues a End-of-Stream event on all pins (Video, Audio, Subtitle) - but because there is no Audio anymore, there is no queue to attach it to, so the End-of-Stream is sent to the audio decoder and audio renderer immediately. And once the audio renderer receives End-of-Stream, it stops playback, until some magic makes it go again after a while, i didn't quite figure this out yet, the audio renderer probably just stops its reference clock which makes this a bit complicated.
I wonder if I should rewrite this logic, so that the EOS is only delivered once all pins received their EOS, so that this situation doesn't happen.
I'll think about it a bit, and see if I can come up with a good solution.
Edit:
There seems to be more going on then i initially anticipated. I think you'll have to live with this problem for the time being, DirectShow is just quite limited when it comes to suddenly disappearing audio. Could try switching audio renderer, i suppose.
FreeFall
5th November 2013, 15:57
No problem I'll just use mpc-be's internal splitter to playback those disc's until you can come up with a solution, thanks for your hard work.
clsid
5th November 2013, 16:29
Perhaps generate and insert silent audio until the video reaches EOS?
nevcairiel
5th November 2013, 16:33
Can't generate silent DTS-HD :P
clsid
5th November 2013, 17:01
My bad. I was assuming PCM output instead of bitstreaming.
Dump an (almost) silent sample from an existing stream and re-use that instead? Just theoretically speaking, not suggesting you actually do that kind of hacky trickery :P
nevcairiel
5th November 2013, 20:40
I implemented a work around that seems to work on the sample I got, although it feels kinda specific to this one case (one clip without audio at the end of the title), but at least it should be minimally invasive and hopefully not cause troubles.
Its generally a bad situation when one stream stops sending data in the middle of playback, both for DirectShow and FFmpeg. I considerd letting these files be broken, who cares that it stops during the credits, but this may hopefully work.
kolak
5th November 2013, 21:11
Does anyone know how well does Intel HD 5000 decode 4K AVC streams? Will it cope with 200Mbit one?
NikosD
5th November 2013, 21:35
Is there any other way?
Besides "Bitrate Viewer" software.
I also don't want to use ffdshow.
Use a capable player like MPC-HC or PotPlayer.
Both can show stats with the info you want.
mindbomb
5th November 2013, 22:31
Does anyone know how well does Intel HD 5000 decode 4K AVC streams? Will it cope with 200Mbit one?
idk, but the hardware decoder on haswell is the same as on ivy bridge, right?
kolak
5th November 2013, 22:37
No- as far as I understand Haswell one is new, better and optimized for 4K from the beginning.
Thunderbolt8
5th November 2013, 23:17
Well, here is how it is.
As far as i can see, the problem is quite simple - it happens once LAV hits the end of the file, with approximately 700 frames in its own buffer, or around 29 seconds (at 24p) before the movie ends.
At that point, LAV queues a End-of-Stream event on all pins (Video, Audio, Subtitle) - but because there is no Audio anymore, there is no queue to attach it to, so the End-of-Stream is sent to the audio decoder and audio renderer immediately. And once the audio renderer receives End-of-Stream, it stops playback, until some magic makes it go again after a while, i didn't quite figure this out yet, the audio renderer probably just stops its reference clock which makes this a bit complicated.
I wonder if I should rewrite this logic, so that the EOS is only delivered once all pins received their EOS, so that this situation doesn't happen.
I'll think about it a bit, and see if I can come up with a good solution.
Edit:
There seems to be more going on then i initially anticipated. I think you'll have to live with this problem for the time being, DirectShow is just quite limited when it comes to suddenly disappearing audio. Could try switching audio renderer, i suppose.perhaps this problem does also relate to this (https://code.google.com/p/lavfilters/issues/detail?id=70&colspec=ID%20Type%20Status%20Priority%20Filter%20Summary%20Modified) one I reported 2 years ago?
James Freeman
6th November 2013, 11:44
Use a capable player like MPC-HC or PotPlayer.
Both can show stats with the info you want. (Video Bitrate)
I use MPC-HC, Lav Filters, MadVR.
I don't see any way to show Video Bitrate.
I know ffdshow can show bitrate, but I want to use LAV.
Thanks.
filler56789
6th November 2013, 11:57
I use MPC-HC, Lav Filters, MadVR.
I don't see any way to show Video Bitrate.
I know ffdshow can show bitrate, but I want to use LAV.
JMO, but a "normal" media player (OR the filters it may use) should not be used as a bitrate viewer. SFAIK, there are professional tools to do that kind of job.
James Freeman
6th November 2013, 12:24
JMO, but a "normal" media player (OR the filters it may use) should not be used as a bitrate viewer. SFAIK, there are professional tools to do that kind of job.
Can anyone give me a straightforward answer.
How can I see the video Bitrate?
The software/method should include HEVC.
wanezhiling
6th November 2013, 12:59
Use PotPlayer: http://i1.tietuku.com/dy4xzwru3.png
FreeFall
6th November 2013, 14:15
nevcairiel,
I just tested roytam1's latest nightly build 2013-Nov-06 from here:
http://roy.orz.hm/lavf-w32-nightlies/ roytam1
The good news is the problem with the original disc the sample was taken from is fixed but now all other disc's from Sentai Filmworks that use the same structure (episode + credits without audio) don't play properly. The problem is after you start playback nothing happens, the disc reads for about 5-6 min and then just plays the credits. It seems like it tries to cache everything before starting and gets mixed up.
Thanks for looking into this I know it's not an easy problem to fix.
nevcairiel
6th November 2013, 14:25
I may know why, and if thats it, it should be fixed.
FreeFall
6th November 2013, 14:39
Thanks again, If you could upload the new build when it's ready I'll test it out. I don't have any knowledge of programming myself so I don't know how hard it is to complie my own builds, I'll have to look into it.
nevcairiel
6th November 2013, 18:51
Here is a test build:
http://files.1f0.de/lavf/LAVFilters-0.59.1-9-gdecc7bc.zip
NikosD
6th November 2013, 20:13
Can anyone give me a straightforward answer.
How can I see the video Bitrate?
The software/method should include HEVC.
My friend you make things harder than they really are.
LAV Video doesn't support bitrate statistics.
Don't use LAV Video if you want to see the bitrate. It's that simple.
MPC-HC latest version 1.7.0 and up uses LAV filters, so if you press the stats menu (Ctrl+4) during playback you won't see bitrate because LAV video doesn't support it, as I said before.
MPC-HC v1.6.8 and before with default internal filters (not LAV filters) , supports bitrate stats, but it doesn't support H.265.
You need v1.7.0 to play H.265 files.
So, if you want to see bitrate statistics with H.265 video files, use PotPlayer and press the tab key during playback.
Reino
6th November 2013, 21:23
So James Freeman, your options are:
- MPC-HC/BE, Properties (Shift+F10) -> Details-tab
- MPC-HC/BE, Properties (Shift+F10) -> MediaInfo-tab
- MPC-BE's internal source/splitter filters to see a 'live' bitrate with "Statistics" (Ctrl+4)
- FFDShow
As Nev won't implement an OSD, FFDShow is the only way to see a 'live' bitrate in combination with LAV Splitter. Tough luck.
nevcairiel
6th November 2013, 22:46
Are we done with the off-topic now?
Thanks.
FreeFall
7th November 2013, 01:08
The new build fixed things, all the problem discs playback smoothly without any hiccups now.
Cheers.
wanezhiling
7th November 2013, 09:15
http://url.cn/SVoaPr
Open the clip and seek it immediately (within 1s), then image is broken...
Happens in dxva2n mode. :)
nevcairiel
7th November 2013, 09:51
Should be fixed.
wanezhiling
7th November 2013, 10:10
;) Great!
CoreAVC(sw/dxva/cuda), ffdshow(sw/dxva), mpc-be(sw/dxva) and PotPlayer(sw/dxva) have this issue.
FreeFall
7th November 2013, 10:24
nevcairiel,
I tried this sample again using mpc-be nightly 1.2.1.0.3701.x86 and the LAV build you posted. The subtiles at 33 and 39 sec are delayed by about 1.5 - 2.0 seconds depending on the renderer used EVR-CP or MadVR.
H264 / LPCM 2.0
http://www.sendspace.com/file/ub3gpg
I watched a few episodes from the original and saw the same problem again about 1/4 of the way through the 3rd episode, slightly longer delay. The only thing I can think of is it might be a similar problem to the one you fixed a while ago, timing problems with TrueHD audio and subtitles.
No problems using mpc-be's splitter with LAV Audio / Video.
If you could take a look at it when you have time and let me know what you think, subtitle renderer or splitter problem?
Thanks.
nevcairiel
7th November 2013, 12:03
If you could take a look at it when you have time and let me know what you think, subtitle renderer or splitter problem?
The only thing i can tell you for certain is that the subtitles are sent out consistently 5-6 seconds before the video.
Staying with your example times, that means the subtitles for second 33 are sent to the subtitle renderer 6 seconds earlier, when the video is still at second 27-28. So there is plenty of time for the subtitle renderer to receive and process the subtitles. And i can also see them having the correct timestamps, as expected.
Why it would show delayed, i really cannot answer.
FreeFall
7th November 2013, 12:44
Would the delay more likely be caused by a problem with the subtitle renderer, should I create a ticket on mpc-hc's bug tracker?
nevcairiel
7th November 2013, 13:18
I tried to do some hacking, and offset the timestamps of all subtitles by 5 seconds, so they would show up much earlier.
For some funny reason it worked for most subtitles, except the problematic ones, they still show up at *exactly* the same time. I really have no clue how their presentation time is determined.
Sounds like something the subtitle renderer developers might want to look into, how it happens.
It does seem like it fails at presenting the previous subtitle until it gets the next one, but that still does not necessarily explain the full situation.
A brief look at the PGS subtitle code in MPC-HC/BE, it seems like they should handle the DISPLAY_SEGMENT to actually show the subtitle, and not wait for the next one like it seems they are doing.
I could work around the issue by further increasing the frame queue in LAV, but its not a fix, just a work around (which has some negative downsides as well), so I'm not going to (my guess is that MPC-BEs splitter has a longer queue to work around this issue)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.