View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
nevcairiel
8th April 2016, 23:53
> 1Gbps bitrates are just extremely high, don't expect that to get much faster without faster hardware. ProRes uses slice-based threading, which means performance scaling depends on the video encoding. If it has enough slices it should theoretically be able to get to 100% usage, if nothing else bottle-necks the process.
Aegwyn11
8th April 2016, 23:57
Thanks nevcairiel, you gave me an idea. I'll try forcing fewer macroblocks per slice in ffmpeg (should result in more slices) and try again.
Edit - I reduced the macro blocks per slice to 4 (default is max, 8) and it seemed better. File size was very slightly larger and CPU usage was slightly higher. I just tested 30s, I'll do a bigger test next week.
I have a very high bitrate (~1.4 Gbps) UHDp59.94 Prores422 HQ file that I'm having trouble getting to play smooth.
It's huge, usually need fast 8-core o.O
Try Quicktime x86, it usually plays a bit faster than ffmpeg x64.
Aegwyn11
10th April 2016, 14:17
It's huge, usually need fast 8-core o.O
Try Quicktime x86, it usually plays a bit faster than ffmpeg x64.
I did try QuickTime, it couldn't manage it either. I don't think more cores would help, as my 6 core processor isn't fully utilized. Maybe faster cores would help, but I'm already at 3.5 Ghz. Maybe a Skylake i7 could do it, who knows. Or maybe Broadwell-E when it comes out.
baii
10th April 2016, 17:40
I did try QuickTime, it couldn't manage it either. I don't think more cores would help, as my 6 core processor isn't fully utilized. Maybe faster cores would help, but I'm already at 3.5 Ghz. Maybe a Skylake i7 could do it, who knows. Or maybe Broadwell-E when it comes out.
Get some better cooling and pump it to 4ghz, that should be more than 10% performance increase.
Quad i7 pretty much struggle for most high bit rate 4k. Let alone 60fps ones.
Sent from my SM-T700 using Tapatalk
Reino
11th April 2016, 13:34
It appears some hls-streams require a user-agent nowadays. Do you think it's possible to add an option to enter a useragent, or have it send a user-agent by default?
filler56789
13th April 2016, 09:38
Regarding the recent LBR DTS support in dcadec...
żisn't it good-enough for being added to LAV Audio?
nevcairiel
13th April 2016, 09:44
LAV doesn't use dcadec anymore, and its not going to again just for this.
Once its finished it'll be integrated into FFmpegs dca decoder, at which point LAV will get it.
nevcairiel
13th April 2016, 09:47
It appears some hls-streams require a user-agent nowadays. Do you think it's possible to add an option to enter a useragent, or have it send a user-agent by default?
LAV already sends a user-agent. Probably just not one your source likes.
I thought about making a configurable user-agent before, but not sure yet. Those stream providers should realise that user-agents are such a weak protection, everyone can just fake them. Why make us go through all this trouble.
wanezhiling
14th April 2016, 07:22
http://112.17.0.10:8085/ysten-business/live/fhchinese/yst.m3u8
Hi, I tried latest nightly mpc-hc and it seemed not work.
P.J
15th April 2016, 21:33
Just tried to play an HEVC 8-bit 4K video with Atom x7-Z8700 but got square artifacts: :confused:
http://1.t.imgbox.com/3b2aIiqh.jpg (http://imgbox.com/3b2aIiqh)
LigH
16th April 2016, 08:46
Not only squares. You can also see jagged lines in the left half, at the top of the blue tint, like the devil's horns.
But I believe it's a playback error in a way that chroma planes are shifted and scaled. Maybe not a decoder but a renderer issue, misinterpreting the decoder's output or not handling the dimensions well?
nevcairiel
16th April 2016, 09:03
This is a bug in the Intel driver.
P.J
16th April 2016, 13:37
This is a bug in the Intel driver.
It's a Surface 3, where can I find the latest driver for Atom x7-Z8700? :confused:
Reino
16th April 2016, 15:04
LAV already sends a user-agent. Probably just not one your source likes.
I've just installed the latest nightly and I see you've fixed it. Thanks!
nevcairiel
16th April 2016, 15:11
I've just installed the latest nightly and I see you've fixed it. Thanks!
I didn't really change anything though, but if it works I won't complain. :)
Reino
16th April 2016, 15:41
I just checked with FFMpeg and it seems they removed the 'user-agent-protection'. *sigh*
Guess they read your post. ;)
mbordas
17th April 2016, 18:28
I have a question about what seems to be an old/known problem, but I figured it wouldn't hurt to ask in case anyone has suggestions about possible workarounds.
I have two blu rays with mono LPCM soundtracks (Badlands, French Lieutenant's Woman). The soundtrack in FLW has been remuxed to mono AAC.
Lav splitter correctly identifies the BL track as mono, and plays it through the left speaker. This seems to be a bug in the driver which has been around a long time:
https://forum.redfox.bz/threads/reclock-1-8-5-7.37473/#post-239907
But with FLW, Lav Splitter says:
A: Mono [eng] (aac he-aac, 48000 Hz, stereo) [default]
and LAV audio is trying to play it as stereo. I can work around this by enabling mixing and setting the output speaker configuration to mono. Then it plays through the left speaker.
I have "expand mono to stereo" unchecked in both Lav audio and reclock.
Any thoughts? The desired behavior is to have these soundtracks play from the center speaker. But short of rewiring my receiver, I can't find any way of doing this.
nevcairiel
17th April 2016, 22:29
If the stream info says its stereo, then your AAC track is in fact stereo, or at least the decoder says it is. Maybe an encoding stage screwed up? I could only comment on the real stream with a sample.
If the audio driver has a bug that assigns the channel wrong, what do you expect to change however? The driver doesn't care if its PCM source or AAC source.
As a workaround for mono sources, you could tell LAV to mix to 5.1, if the mono channel is flagged as "Center", then it'll remain in the center and silent channels will be added, since LAV doesn't actually support upmixing audio.
3421
18th April 2016, 05:06
This video file video decoder only plays one second. The audio decoder processes the sound with distortion. Another player plays it as it should be, but not all players norm play. 0-26
https://www.cubbyusercontent.com/pl/ex%d0%b0mple.7z/_23416bebc04c431fbc74af2d3e6d4de3
chros
18th April 2016, 09:40
I'm using MPC-HC.1.7.10.180.x64 (latest nightly with LAV 0.68.0-16-git) and :
1. "Prefer audio stream with Highest Quality" doesn't seem to work: it always picks up the 2ch AAC stream (default stream)
- media info from mkv
Video: MPEG4 Video (H264) 1916x1076 23.976fps [V: English [eng] (h264 high L4.0, yuv420p, 1916x1076) [default]]
Audio: AAC 48000Hz stereo [A: English [eng] (aac lc, 48000 Hz, stereo) [default]]
Audio: Dolby AC3 48000Hz 6ch 384kbps [A: English [eng] (ac3, 48000 Hz, 5.1, 384 kb/s)]
Subtitle: UTF-8 [S: CC [eng] (subrip)]
Subtitle: UTF-8 [S: No subtitles]
2. Is it possible to remove all additional filters from DS chain or reinit the chain when "Remove audio decoder on Audio Stream Switch" is selected and switch happens?
Reason behind is that I'm using AC3filter (x64) for upconvert 2ch sources only for decoded stream (it gets PCM data). But when I switch stream (with the example in the 1. point) from AAC to AC3 manually then AC3filter stays in the chain and breaks playback. Only solution is block AC3filter in MPC-HC then restart playback (or modify the default track info in header in the file itself).
Thanks
nevcairiel
18th April 2016, 09:46
1. "Prefer audio stream with Highest Quality" doesn't seem to work: it always picks up the 2ch AAC stream (default stream)
Default tags take precedence over everything else, except language choices.
2. Is it possible to remove all additional filters from DS chain or reinit the chain when "Remove audio decoder on Audio Stream Switch" is selected and switch happens?
Not with LAV only, a player could theoretically do that for you, since its really the players job primarily to build the graph.
mbordas
18th April 2016, 15:53
If the stream info says its stereo, then your AAC track is in fact stereo, or at least the decoder says it is. Maybe an encoding stage screwed up?
sure, it could be bad encoding, but mediainfo shows the following:
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : HE-AAC / LC
Codec ID : A_AAC
Duration : 2h 3mn
Channel(s) : 1 channel
Channel positions : Front: C
Sampling rate : 48.0 KHz / 24.0 KHz
Frame rate : 23.438 fps (1024 spf)
Compression mode : Lossy
Delay relative to video : -105ms
Title : Mono
Language : English
Default : Yes
Forced : No
here's a sample:
http://speedy.sh/BqYh5/mono-audio-sample.mkv
mbordas
18th April 2016, 16:06
As a workaround for mono sources, you could tell LAV to mix to 5.1, if the mono channel is flagged as "Center", then it'll remain in the center and silent channels will be added, since LAV doesn't actually support upmixing audio.
Thanks, that seems to work (for the pcm mono track anyway). It loses the bit-exactness of the PCM track, but oh well - you can't have everything :)
But, maybe I'm confused about something. If I check "Convert Ouput to Standard Channel Layouts", shouldn't it always set the channel mask to 0x63F in a 7.1 system? Then if the track is stereo or mono or whatever, it will fill in the missing channels with silence? That's what your workaround seems to be doing. What am I missing?
nevcairiel
18th April 2016, 16:09
But, maybe I'm confused about something. If I check "Convert Ouput to Standard Channel Layouts", shouldn't it always set the channel mask to 0x63F in a 7.1 system? Then if the track is stereo or mono or whatever, it will fill in the missing channels with silence? That's what your workaround seems to be doing. What am I missing?
That option doesn't look at your speaker settings, it just converts it to one of a few "standard" layouts that are generally known to work well over HDMI, thats generally Mono, Stereo, 5.1, 6.1 and 7.1, always choosing the one that has enough channel for the source.
So that option in itself doesn't help a mono case, since its still going to pick Mono as a valid choice. I could of course remove Mono from the list of standard layouts, which would automatically promote it to 5.1, since Stereo has no center speaker.
But people with a fully working Mono setup probably wouldn't appreciate that.
If you want to force one partiular layout for all combinations, thats what the mixer setting is for.
LigH
18th April 2016, 16:12
There may be AAC encoders which encode mono automatically as doubled stereo due to some compatibility reasons (e.g. with poor decoders failing for center-only mono tracks), unless you disable this feature with a parameter, I guess. But I don't remember in detail.
mbordas
18th April 2016, 16:38
OK that makes sense, and it gives me a working option which is fine. But I think you could also reverse the logic - set the default to the highest number of channels? It wouldn't break anything and it would make the mono case work better.
nevcairiel
18th April 2016, 16:57
OK that makes sense, and it gives me a working option which is fine. But I think you could also reverse the logic - set the default to the highest number of channels? It wouldn't break anything and it would make the mono case work better.
Its meant to be a safe option to use, which wouldn't affect 99% of all files, since most are already in one of those layouts, but then you encounter one of those pesky 5.0 or 3.0 files, and one of the channels comes out as the LFE and you miss the dialog .... thats really the reason I build it a while ago, something I can turn on always and make sure all channels go where they are supposed to, without having any side-effects on proper files.
sure, it could be bad encoding, but mediainfo shows the following:
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : HE-AAC / LC
The reason is that it uses HE-AAC for a Mono track, which makes the decoder think it should be applying Parametric Stereo decoding, resulting in stereo again.
It is technically a bug in the FFmpeg aac decoder, but I wouldn't hold my breath on a quick fix, since its a rather odd situation.
If you must use AAC, should probably encode it in plain AAC LC, not using HE-AAC.
mbordas
18th April 2016, 17:11
bugs everywhere :(
Thanks for the info.
nevcairiel
18th April 2016, 17:29
bugs everywhere :(
Thanks for the info.
I checked the AAC specification some more, and apparently its not a bug but just defined behavior in this case:
Since a received mono stream will result in a stereo output if Parametric Stereo data is present in the stream, the
HE AAC v2 Profile decoder shall assume that PS data is available and decide the number of output channels to be
two for a single channel element containing SBR data, and thus also possibly PS data. If no PS data is found the
mono output shall be mapped to the two opened channels for every single channel element.
Its not what you wanted to hear, but apparently its not wrong what we're doing.
As said, you can avoid this by using AAC LC, ie. not using SBR.
3421
19th April 2016, 01:49
LAVSplitter: witn mpc mpeg source splitter file play normally.
Sp00kyFox
19th April 2016, 22:23
I have a problem here, maybe someone knows whats going on here. with avisynth I scaled a fullhd source down to 1280x532 and encoded it with x265 (16bit in, 12bit out, i444) but when playing it the resolution is 1280x528, the lower 4 pixel lines are cropped away. even though mediainfo says the resolution is how it should be. I'm using the latest stable version of lavfilters v0.68.0 with madvr v0.90.17 and zoom player v11.1.
edit: ok it seems the problem is fixed in the lavfilters version provided by the latest k-lite pack which is v0.68-26-g5be9d.
chros
20th April 2016, 09:49
Default tags take precedence over everything else, except language choices.
Not with LAV only, a player could theoretically do that for you, since its really the players job primarily to build the graph.
Thanks for the answers!
Sp00kyFox
22nd April 2016, 00:32
to the problem I mentioned before, this must be the one which was fixed quite recently:
https://trac.ffmpeg.org/ticket/4980
Nevermind, ffmpeg always multiplies by 2 the default window offset (assuming 4:2:0), while it should use a coordinate system that depends on the chroma format.
I tried it again with the latest nightly build (v0.68.0-28, 2016-04-21) but the issue is still there. I don't understand why it is fixed in v0.68-26-g5be9d (which is only available in the k-lite pack to my knowledge) but not in the nighly builds. is this an unofficial patch or an oversight? again, here is a test clip:
https://mega.nz/#!WJxBAJBR!P1xhjdkSPC-eIlY998PEELj2Rflc0USw4HcxwXEQC4M
maybe the integrated ffmpeg libraries are not quite up to date?
clsid
22nd April 2016, 13:51
FFmpeg was last updated on February 1st in LAV. K-Lite uses that fix on top.
That sample plays with green colors here with EVR-CP. So colorspace conversion seem b0rked. Plays ok with madVR,
VictorLS
23rd April 2016, 07:54
Sorry for offtop: can anyone explain why lastest Lentoid HEVC Decoder http://www.strongene.com/en/downloads/downloadCenter.jsp (like Elecard HEVC Video Decoder) shows color abracadabra in any SAT program with any Renderer while receiving 10bit 3840x2160p50 h265 http://mir.cr/E4UZKWXX, but when playing recorded video with LAV Splitter both decoders shows good picture? LAV Video Decoder shows good while receiving and playing though.
PS. I need "Skip non-key frames" in decoder but Elecard can not correct color abracadabra with 10bit (8bit shows good always). I plan to write to Stongene to add "Skip non-key frames" in their Lentoid if they correct 10bit while receiving.
nevcairiel
23rd April 2016, 09:13
If you start your post with "Sorry off-topic", maybe just don't post at all.
VictorLS
23rd April 2016, 14:33
nevcairiel
If you add "Skip non-key frames" feature earlier (or nVIDIA produced single slot passive-cooled videochip with HWAccel like GTX950/960) I'd never ask about other decoder here ;)
nevcairiel
23rd April 2016, 14:35
I said this before, this will never happen. I don't implement features with the whole purpose of destroying image quality. So please take your off-topic discussions elsewhere.
Sp00kyFox
23rd April 2016, 16:40
FFmpeg was last updated on February 1st in LAV. K-Lite uses that fix on top.
ah, got it. so I guess we can expect it sometime in the future in the official build.
VictorLS
23rd April 2016, 16:45
I said this before, this will never happen. I don't implement features with the whole purpose of destroying image quality.
Thanks for reply but It's a pity once more. If that feature not too difficult to implement in LAV Video Decoder may be you'll spend some your free time to write special version of decoder with "Skip non-key frames" feature on/off, upload it somewhere and send me link in PM? I'll never say about it anyone )
So please take your off-topic discussions elsewhere.
I promise I'll never ask you about this feature in the future.
P.J
24th April 2016, 11:55
How to properly play HDR videos on regular monitors?
They look washed-out/dull :(
Manni
24th April 2016, 11:57
How to properly play HDR videos on regular monitors?
They look washed-out/dull :(
Use MadVR with LAV. MadVR does a very good HDR to SDR conversion using the metadata provided by LAV, with many options to get the best possible result on your non HDR display.
aufkrawall
24th April 2016, 17:24
Would it be possible that 1080p 60fps get blacklisted for DXVA2 CB/native with < GCN 1.2 GPUs? I get unstable playback with it with madVR (with R9 390) and it's not possible to just uncheck 60fps (videos with lower requirements run fine).
And maybe RGB output levels and dithering method options should be grayed out when all formats are checked? Or am I mistaken and these options still have an effect then?
nevcairiel
24th April 2016, 17:32
Would it be possible that 1080p 60fps get blacklisted for DXVA2 CB/native with < GCN 1.2 GPUs? I get unstable playback with it with madVR (with R9 390) and it's not possible to just uncheck 60fps (videos with lower requirements run fine).
I do not plan to add any performance-related hwaccel trigger options, sorry.
And maybe RGB output levels and dithering method options should be grayed out when all formats are checked? Or am I mistaken and these options still have an effect then?
Just because a format is enabled doesn't mean its supported by the renderer, it could still use something with a lower bitdepth or fallback to RGB.
aufkrawall
24th April 2016, 21:21
Alright, thanks for your feedback. :)
Magik Mark
26th April 2016, 01:00
Use MadVR with LAV. MadVR does a very good HDR to SDR conversion using the metadata provided by LAV, with many options to get the best possible result on your non HDR display.
May I ask which options work best? I could only see "hdr luminance option" for now.
HDR video on regular displays look brighter. I guess there is little we could about this without affecting the video quality of non-HDR videos
mbordas
26th April 2016, 19:25
A quick follow up on my earlier question about mono audio processing.
I just realized mpc-hc now supports WASAPI with the latest 1.7.10:
Completely new Internal Audio Renderer:
- Outputs sound through WASAPI (shared or exclusive)
- Employs automatic channel downmixing
It helps to read the changelog sometimes :)
(FYI, you have to set Output->Audio Renderer = Internal and the checkbox Internal Renderers->Audio Filter = Exclusive mode)
But it seems to set the channel mask to match your speaker setup, so everything works perfectly. And I can easily correct for that HE-AAC encode by just downmixing to mono in LAV audio. All is good, and no more reclock!
NikosD
28th April 2016, 16:53
On an old laptop with Intel 965 Express chipset and Vista x86 SP2, latest LAV filters do not provide HW acceleration for MPEG2_VLD.
I tried MPC-HC which falls back to SW and DXVA Checker which can't connect to EVR renderer.
On the other hand, MS DS MPEG2 decoder works on the same MPEG2 clips and provides HW acceleration.
wanezhiling
28th April 2016, 17:09
MS DS MPEG-2 decoder may provide DXVA_IDCT not VLD?
Try PotPlayer to check by its OSD
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.