View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
ice25
6th April 2013, 11:16
nev, quick question...
If I use ReClock with 100ms of delay, then should I put LAV to delay audio at 100ms too? Or is my logic broken? I just had this thought after messing a little in the settings.
I think you're confused. Reclock doesn't have a delay feature, it's only the sound buffer in ms.
dbcooper
6th April 2013, 12:35
I have a question that I hope isn't obvious (I've searched the forum but not found the answer I'm after):
With AMD GPU's is DXVA Copyback necessary for MadVR, rather than DXVA Native?
I seem to get playback and color management with DXVA Native, but perhaps I am missing out on the chroma and luma scaling from MadVR?
Thanks in advance,
DB.
nevcairiel
6th April 2013, 14:10
DXVA Native is fine for AMD with madVR
kolak
6th April 2013, 15:28
Which is faster, the Lav filters UT Video Codec or the original?
I wonder what to use in Avisynth, Avisource or Directshowsource, thatīs why would like to know:)
Native support is SUPER fast and optimized- I don't think ffmpeg one is any close.
Avisource will be way better anyway- avoid directshow input filter as long as you can- way more problematic.
UtVideo 422 HD size can be decoded at 1300fps on 12 core machine:)
Niyawa
6th April 2013, 17:34
Only if you want 200ms delay.
My thoughts exactly. :D
Haha, I just wanted to confirm, thanks.
@Niyawa: The delay(s) are only for getting audio and video lip sync, if you have problems. For what do you intend to use it?
No no, no problems. I've set the buffer to 100 ms and I don't even notice at all, it was just a thought that came out of nowhere in my mind after I was taking some look at LAV audio settings.
I think you're confused. Reclock doesn't have a delay feature, it's only the sound buffer in ms.
Well, while the name is different, the effect is basically the same so I didn't thought it would matter.
huhn
6th April 2013, 20:46
Well, while the name is different, the effect is basically the same so I didn't thought it would matter.
the buffer does not delay the audio
nevcairiel
6th April 2013, 20:56
Here is what i consider a Release Candidate for the next version:
32-bit: http://files.1f0.de/lavf/LAVFilters-0.55.3-78-g84df425.zip
64-bit: http://files.1f0.de/lavf/LAVFilters-0.55.3-78-g84df425-x64.zip
The ordered chapter stuff should be mostly finished, i fixed a few bugs since the last builds, and added an option to turn off external segment loading. In fact, no bugs or missing features come to mind immediately when i think about it.
Unless some new bugs come to light that may need a bit more time for fixing, i'll probably release a final version in the next 1-2 days, so if you know about bugs that need squashing (especially regarding ordered chapter support), please let me know as soon as possible. :)
sneaker_ger
6th April 2013, 22:02
In what way does LAV search for external files, btw? I remember old Haali versions simply reading every mkv file in the same folder, even if no external files were actually linked.
nevcairiel
6th April 2013, 22:43
There isn't really a better way then reading all mkv files in the folder, because you need their Segment UIDs, however, LAV only does that if it actually needs an external segment, otherwise this is not done.
So no change in playback of "normal" MKVs.
sneaker_ger
6th April 2013, 23:16
So basically it acts like current Haali versions, I see. I was thinking that maybe there was a better way, like at least stop searching once all linked Segments have been found or do some prioritization for the search with file names(similar name) , writing date (closest to current file) or file size (for example in relation to chapter length). But the current way is good enough me. For the "simple" linking I think the Matroska specs even offers file name tags ("PrevFilename", "NextFilename").
FreeFall
7th April 2013, 01:02
nevcairiel,
Reported earlier on about DVD menu problems, still the same with current build.
I have a problem with this DVD sample, LAV 0.55.3 and EVR renderer.
http://www.mediafire.com/?8zx7vn58u8c1t52
Play the first episode and then go back to the main menu, the last subtitle line stays on the screen until the menu loops and is refreshed (DXVA Native / Copy Back or Software mode). Using CUVID the same thing happens but sometimes the last video frame is displayed instead of the menu background, it might take a couple of tries for it to happen, usually after around 5 or 10 seconds of playback.
Thanks.
FreeFall
Niyawa
7th April 2013, 07:48
the buffer does not delay the audio
Maybe delay is not the right term, but higher the buffer, higher the cut in the audio at start or seeking it will be. I guess we could just call it "cut".
... higher the buffer, higher the cut in the audio at start or seeking it will be. I guess we could just call it "cut".
Please keep in mind:
I've never experienced issues with TrueHD or LPCM, however both of these formats are a bit special because they have very short audio frames, so increasing the buffer size can actually solve this issue.
nevcairiel
7th April 2013, 08:18
Play the first episode and then go back to the main menu, the last subtitle line stays on the screen until the menu loops and is refreshed
I can't reproduce this.
I tried playing the whole (partial) episode, or going back to the menu in between, and never the subtitle sticks around.
Niyawa
7th April 2013, 08:52
Please keep in mind:
I'm not sure if I get it. What I said is that when the buffer is high, whenever playback starts (seeking for example) the audio will be cut by that time you set in ms. You're probably referring to "hiccups" caused by the low buffer instead.
FreeFall
7th April 2013, 10:32
Sorry nevcairiel I didn't test things properly, Mpc-Hc is ok. The problem only happens when using Zoom Player 8.61.
Thanks
FreeFall.
nevcairiel
7th April 2013, 10:55
Sorry nevcairiel I didn't test things properly, Mpc-Hc is ok. The problem only happens when using Zoom Player 8.61.
I can reproduce it now, but i'm not sure there is much i can do about it.
You can ask the Zoom Player Devs to fix it, though.
Switching to the menu is done using the IDvdControl2 Interface, specifically the "ShowMenu" command.
What is important is that the ShowMenu command is called with the "DVD_CMD_FLAG_Flush" flag in the second parameter, otherwise the DVD Navigator does not properly flush the decoder, and old stuff may stick to the screen.
The same goes for seeking (all Play* functions in IDvdControl2), always pass the Flush flag, or the decoder might get confused.
FreeFall
7th April 2013, 11:51
Thanks for your help, will report the problem to Zoom Players devs.
FreeFall
DarkSpace
7th April 2013, 16:17
Here is what i consider a Release Candidate for the next version:
32-bit: http://files.1f0.de/lavf/LAVFilters-0.55.3-78-g84df425.zip
The Aspect Ratio issue appears to be fixed now, and the Hidden Default Edition is also working now.
However, I noticed something else: For small Segment parts, the audio appears to be omitted. Instead, the next Chapter's audio is played directly and only a few seconds later, silence is inserted by LAV Audio's Audio Sync feature (actually, it seems like Audio Sync is only applied when the new Chapter actually begins?).
Edit 1: It appears that none of the previously posted builds (I tried the most recent 4) work, either. Just wanted to make sure.
Edit 2: I can't reproduce with simple samples, it seems. I'll keep trying, but might it come from using FLAC Audio in one Segment that's called at different times and not cutting/appending the FLAC but instead encoding the FLAC file as one long audio file?
SamKook
7th April 2013, 18:10
Niyawa: There's sadly no way to prevent the cut in the audio made by reclock while it fills the buffer. It's really annoying(although not that bad for most audio when set to 100ms), but I'm pretty sure it's something that should be fixed from inside reclock which, from reading their forum, I'm pretty sure will never happen.
Unless I'm wrong and nevcairiel can somehow find a way to force reclock to fill its buffer before actually starting to play the audio which would be awesome.
nevcairiel
7th April 2013, 19:48
Edit 2: I can't reproduce with simple samples, it seems. I'll keep trying, but might it come from using FLAC Audio in one Segment that's called at different times and not cutting/appending the FLAC but instead encoding the FLAC file as one long audio file?
So create complex samples? :)
I don't know enough about FLAC to answer that, but i'll look into it if i can reproduce.
Niyawa
7th April 2013, 23:25
Niyawa: There's sadly no way to prevent the cut in the audio made by reclock while it fills the buffer. It's really annoying(although not that bad for most audio when set to 100ms), but I'm pretty sure it's something that should be fixed from inside reclock which, from reading their forum, I'm pretty sure will never happen.
Unless I'm wrong and nevcairiel can somehow find a way to force reclock to fill its buffer before actually starting to play the audio which would be awesome.
It would be awesome indeed. The 100ms is the sweet spot to not notice the cut, unless you really want to. But at the same time isn't it a necessary step so we don't get the audio being cut every second or so? If I set it to 25 ms for example, between 6-10 seconds I get that hiccup effect. It seems that filling the buffer before the audio plays would just delay it.
mandarinka
8th April 2013, 11:28
Whoa, nice work there! Thanks for taking the possibility of resolution switching into account where possible. Just a small note for that - besides resolution switches, there can probably be switches in pixel aspect ratio too (switch between 4/3 and 16/9 anamorphic). But I guess you guys know that.
Mark Regalo
9th April 2013, 03:18
Are there any recommendations for or against using Reclock's sound compressor option in combination with Clipping Proetection in LAV Audio enabled?
DarkSpace
9th April 2013, 15:55
Whoa, nice work there! Thanks for taking the possibility of resolution switching into account where possible. Just a small note for that - besides resolution switches, there can probably be switches in pixel aspect ratio too (switch between 4/3 and 16/9 anamorphic). But I guess you guys know that.
Indeed, it already works, but it's nice to see that someone other than myself also thought of it!
On another note, I just thought of another possibility: What happens when a Segment is loaded that doesn't have Audio or Video for all its duration (say, the Chapters say the Segment is to be played from seconds 0-4 but the Segment's Audio only is 3 seconds long while the video is long enough)? I believe that in such a case, the missing Audio should be padded with silence, but a too-short Video stream may be more complicated. (Freeze the last frame? Add black frames? ...)
So create complex samples? :)
I don't know enough about FLAC to answer that, but i'll look into it if i can reproduce.
Okay, creating the samples was more difficult than I had expected (I still don't know why this set works while the others don't), but here (http://www.mediafire.com/?x4g09pc4k6ku6uw) they are:
Opening the file 0.mkv (for the Audio and Video version) or 0.mka (for the Audio-only version) and seeking to somewhere close to the 4th Chapter Point (B-0) and playing from there shows the issue that this small Chapter's Audio is omitted and instead the next Chapter's Audio starts playing already. In the Audio-only version, this "desync" isn't corrected while in the version with Video, LAV Audio's A/V Sync appears to notice this when the 5th Chapter begins and inserts silence until sync is corrected. The same happens at the 6th Chapter Point (C-0), where, if left alone until then, the C-0 desync will be added to the B-0 desync.
Skipping directly to B-0 (or C-0 for that matter) doesn't show any problems, so it's important to seek to somewhere before then. Also, seeking to anywhere in the Playlist file automatically corrects any desync that may have accumulated.
cyberbeing
9th April 2013, 16:27
With DarkSpaces samples, LAV Splitter crashes if you move all MKA samples except 0.mka to a different folder and then attempt to open 0.mka or 0.mkv in the same folder as the other mkv samples.
nevcairiel
9th April 2013, 16:36
seeking to somewhere close to the 4th Chapter Point (B-0) and playing from there shows the issue that this small Chapter's Audio is omitted and instead the next Chapter's Audio starts playing already.
Are you saying that you don't hear the audio between B-0 and C at all?
I hear a few seconds of music there, while all other audio is a rather boring "ooooooooooo" :p
With DarkSpaces samples, LAV Splitter crashes if you move all MKA samples except 0.mka to a different folder and then attempt to open 0.mka or 0.mkv in the same folder as the other mkv samples.
This seems to happen because the mka and mkv have the same segment UIDs, so it opens one and the streams mismatch - should probably refuse instead of opening.
nevcairiel
9th April 2013, 17:21
Ok i found something odd.
Some of the ordered chapters reference a Segment UID of 0, which i always interpreted as "the file that was originally opened, ie. this file", however those chapters seem to reference times in that file which don't exist.
Looking at 0.mkv, A-0 references 0 to 3.8s (the whole file length of the content of 0.mkv itself), which is fine. B-0 however references 3.8s to 7.8s (and C-0 7.8s to 12.3s), considering the file is only 3.8s long, how is that supposed to work?
I am confused by this setup, its told to play stuff which doesn't exist.
Haali seems to flush the decoder, but it doesn't send any data either, which causes it to detect the async immediately. Maybe i can do that, force the refresh.
cyberbeing
9th April 2013, 17:42
On that note, opening 0.mkv or 0.mka alone in a folder also crashes LAV Splitter.
DarkSpace
9th April 2013, 17:49
Are you saying that you don't hear the audio between B-0 and C at all?
I hear a few seconds of music there, while all other audio is a rather boring "ooooooooooo" :p
That's supposed to be an "ooooooooooo" (it didn't work as supposed with only the "ooooooooooo"), since silence wouldn't have shown the A/V Sync.
This seems to happen because the mka and mkv have the same segment UIDs, so it opens one and the streams mismatch - should probably refuse instead of opening.
Are you sure? I specified UIDs that differ in the last value for all of the .mkv / .mka files.
Looking at 0.mkv, A-0 references 0 to 3.8s (the whole file length of the content of 0.mkv itself), which is fine. B-0 however references 3.8s to 7.8s (and C-0 7.8s to 12.3s), considering the file is only 3.8s long, how is that supposed to work?
Strange, I checked the original files and everything and you're right. Sorry about that (though, at least I now know why it can be reproduced every time I re-run the batch file to create these files). Thanks again, and sorry for sending broken files, I'll fix my batch file.
I am confused by this setup, its told to play stuff which doesn't exist.
Haali seems to flush the decoder, but it doesn't send any data either, which causes it to detect the async immediately. Maybe i can do that, force the refresh.
I don't know, but it seems like that would also be a problem when playing Segments with too-short audio. Is this Decoder Flush a solution for these cases, too?
nevcairiel
9th April 2013, 17:57
I don't know, but it seems like that would also be a problem when playing Segments with too-short audio. Is this Decoder Flush a solution for these cases, too?
Yes it would, because it forces an immediate resync.
I'm working on adding this, i found a bug that prevents it to be done easily though .. sadly.
Edit:
Ok works now.
nevcairiel
9th April 2013, 19:50
Here is a new test build, which should hopefully fix the audio sync issue and the crash
32-bit: http://files.1f0.de/lavf/LAVFilters-0.55.3-79-g0e3dd08.zip
64-bit: http://files.1f0.de/lavf/LAVFilters-0.55.3-79-g0e3dd08-x64.zip
Now, any more issues i need to fix before i can publish it to the masses? :)
cyberbeing
9th April 2013, 20:12
What's the status on supporting CueDuration & CueRelativePosition for subtitle seeking? Is that next on the agenda after this upcoming Ordered Chapter LAV release is finalized?
DarkSpace
9th April 2013, 20:15
Here is a new test build, which should hopefully fix the audio sync issue and the crash
32-bit: http://files.1f0.de/lavf/LAVFilters-0.55.3-79-g0e3dd08.zip
64-bit: http://files.1f0.de/lavf/LAVFilters-0.55.3-79-g0e3dd08-x64.zip
Now, any more issues i need to fix before i can publish it to the masses? :)
You're fast as always, but I've got something to report indeed: Skipping to Chapter Points (and also Seeking in general, with the exception of the first Chapter - there, you can seek freely) takes extremely long with this build, at least for Ordered Chapter files, and even the Chapter Switch Points during normal playback take a long time (at least for Segment switches). It happens with both EVR-CP and madVR, with madVR reporting a huge number of dropped frames and the audio getting very stuttery. For this reason, I also can't confirm if the Audio Sync issue has been fixed.
On another note, it seems that several files that seemed to work earlier now stopped working. I'll look into it and prepare samples if necessary.
Edit: For example, it seems that Segments aren't loaded at all or only partially, so the virtual timeline constructed by your Splitter is incomplete and also, because the displayed duration doesn't change, invalid. If you've still got them, my files test1/2.mkv show this very well. If you don't have them any longer, they are in this package (http://www.mediafire.com/?jsclyq3udd28qsb).
yonta
9th April 2013, 20:36
Starting from version 0.55.3-78, LAVVideo drops lots of frames on some 1080i h.264 files with both hardware and software modes.
0.55.3-73 works fine, playing them at 50/60 fps.
sample (http://www1.datafilehost.com/d/c13dd612)
nevcairiel
9th April 2013, 20:47
Starting from version 0.55.3-78, LAVVideo drops lots of frames on some 1080i h.264 files with both hardware and software modes.
0.55.3-73 works fine, playing them at 50/60 fps.
sample (http://www1.datafilehost.com/d/c13dd612)
Works fine here.
Note that this file is 4:2:2, so there is no hardware decoding.
Maybe try with the next build again? Maybe i found something.
yonta
9th April 2013, 21:18
Works fine here.
Note that this file is 4:2:2, so there is no hardware decoding.
Maybe try with the next build again? Maybe i found something.
Yes, that one is 422 and is decoded with software mode.
Just FYI one more sample (http://www1.datafilehost.com/d/540167ff)
nevcairiel
9th April 2013, 21:20
Here is another build, hopefully not screwed up by a last minute change now.
32-bit: http://files.1f0.de/lavf/LAVFilters-0.55.3-81-g181cdaf.zip
64-bit: http://files.1f0.de/lavf/LAVFilters-0.55.3-81-g181cdaf-x64.zip
I also changed something in the H264 decoder which may restore its performance on some files.
yonta
9th April 2013, 21:34
Here is another build, hopefully not screwed up by a last minute change now.
32-bit: http://files.1f0.de/lavf/LAVFilters-0.55.3-81-g181cdaf.zip
64-bit: http://files.1f0.de/lavf/LAVFilters-0.55.3-81-g181cdaf-x64.zip
I also changed something in the H264 decoder which may restore its performance on some files.
0.55.3-81 works fine on both files!
josey_wells
10th April 2013, 01:25
The -81 version also seems to fix a problem I have had with MPC-BE where 2 copies of LAV Splitter were loaded at one time.
DarkSpace
10th April 2013, 09:40
Here is another build, hopefully not screwed up by a last minute change now.
32-bit: http://files.1f0.de/lavf/LAVFilters-0.55.3-81-g181cdaf.zip
64-bit: http://files.1f0.de/lavf/LAVFilters-0.55.3-81-g181cdaf-x64.zip
I also changed something in the H264 decoder which may restore its performance on some files.
It now works, fixes the seeking issue and I can confirm that the sync issue is fixed for both Audio+Video and Audio-only. The only thing I noticed was one ASS subtitle that was displayed even after the Segment switch, but I suspect that this line was mistimed and that Haali wouldn't have displayed it at all. If you want a sample, please tell me and I'll provide one.
nevcairiel
10th April 2013, 09:48
If a subtitle line is timed to be shown over a segment border, then thats what is going to happen. I only ensure that nothing with its start-time after the segment border sneaks through.
If you think its something that may be a bug, feel free to provide a sample and i'll look whats going on in there, but no promises on a quick fix this time ;)
DragonQ
10th April 2013, 11:32
When you update ffmpeg, do you just update your own version of it? The "official" version hasn't had any changes since March but your last few code changes have been in ffmpeg. I was curious to see what those changes were but I can't see them anywhere. :(
nevcairiel
10th April 2013, 12:22
I don't know which ffmpeg you look at.
My own version is here: http://git.1f0.de/gitweb?p=ffmpeg.git;a=summary, updated just yesterday, and the upstream ffmpeg (which i update against) is here: http://git.videolan.org/?p=ffmpeg.git, updated within the last hours.
DragonQ
10th April 2013, 14:37
OK thanks, I was looking in the wrong place.
itsonlyjustincase
10th April 2013, 16:23
Here is a new test build, which should hopefully fix the audio sync issue and the crash
32-bit: http://files.1f0.de/lavf/LAVFilters-0.55.3-79-g0e3dd08.zip
64-bit: http://files.1f0.de/lavf/LAVFilters-0.55.3-79-g0e3dd08-x64.zip
Now, any more issues i need to fix before i can publish it to the masses? :)
My last bother :(. Do you think it would be possible to force it to use CUDA cores more ? I have only a poor 10% video load when playing hd video) i mean pushing even more the GPU to relax even more the CPU ?
itsonlyjustincase
10th April 2013, 16:24
For anyone interested i have a Lucid Virtu MVP 2 standard licence to give. I don't have GTX nvidia so bought it for nothing
DarkSpace
10th April 2013, 16:38
If a subtitle line is timed to be shown over a segment border, then thats what is going to happen. I only ensure that nothing with its start-time after the segment border sneaks through.
If you think its something that may be a bug, feel free to provide a sample and i'll look whats going on in there, but no promises on a quick fix this time ;)
Well, personally I believe that if a subtitle is timed from frame 50 to frame 100 of Segment A and the chapters specify frames 0-75 of Segment A, then frames 0-50 of Segment B, then frames 80-150 of Segment A, that the ASS line should be shown only relative to Segment A's frame numbers (including an ASS animation with the \t tag, but that might be even more difficult), meaning that the line is only shown for the chapters that specify frames from Segment A. Currently, you display the ASS lines relative to the Virtual Timeline's frame numbers, at least for lines that "cross chapter borders". I believe that Haali just displays the line from frames 50-75 of Segment A and then fails to re-initialize displaying it when Segment A is called again for the above example, while I think it would be proper to re-display the ASS line as if there hadn't been any interruption at all (and also to take care of the "timing shift" introduced by the missing frames).
Here (http://www.mediafire.com/?01w3p72phqi9p3q) is a sample to show what I described above. No worries about the quick fixing this time, since Haali just removes the subtitle line at the Segment switch and it is never seen again, I just consider such files partially-broken.
P.S. I know that using frames is wrong and that using times in seconds would be more correct, but it's easier to explain using frames than seconds.
sneaker_ger
10th April 2013, 16:46
Well, I guess implementing the thing on the first chapter shouldn't be too hard, but the display of the subtitles on the third chapter could be problematic. We basically have that problem already with seeking in files without chapters - if you seek into the middle of a subtitle, it won't be displayed because the splitter doesn't know about the line. Its packet is interleaved into an earlier time. The new Matroska features are supposed to fix that but LAV does not implement it - nor does any other program that I know of for that matter.
paradoxical
10th April 2013, 16:48
My last bother :(. Do you think it would be possible to force it to use CUDA cores more ? I have only a poor 10% video load when playing hd video) i mean pushing even more the GPU to relax even more the CPU ?
CUVID decoding doesn't use the CUDA cores. It uses a separate decoder.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.