View Full Version : LAV Filters - DirectShow Media Splitter and Decoders
htnut
28th July 2023, 03:35
WASAPI in shared mode is rather cursed. Its not that helpful. For WASAPI you should always want to use Exclusive.
DirectSound is always in shared mode and requires picking a different output device entirely.
Ok, this is helpful. Despite over two decades of HTPCs I don't have a grasp on this.
So, now, specifically selecting DirectSound in JR, if bitstreaming:HDMI is turned on, anytime I launch a BD I get the popup "Playback Problem"... "Palyback could not be started"... "The audio format may not be supported by your hardware"..."
W10 sound settings I have set output device to "DENON-AVR (Intel Display Audio)". The only other option is "Headphones".
W10 control panel Sound properties: DENON-AVR is selected with the green checkmark. Right clickng to "properties" shows "supported formats" including all the expected formats (TrueHD, Atmos 2.0, Atmos 2.1, etc.)
And, in the JRiver Audio options I have only two "Direct Sound" options: "Default Audio Device [Direct Sound]" or "DENON-AVR (Intel Display Audio) [Direct Sound]". Either of those options throw the error.
What else might be an issue with my config? My simplist HTPC is an i3 with Intel Iris integrated graphics.
I will note that Zoom Player, set to "Direct Sound DENON AVR (Intel Display Audio)" plays via bitstream (my amp reports ATMOS). This is why I keep thinking that JRiver either can't do it or there's something Im' missing in the configuration of JR, or my PC.
Thanks for sticking with me on this!
nevcairiel
28th July 2023, 09:14
I guess it depends which version of MC you are using, DirectSound bitstreaming was only fixed recently, so you would only succeed with the latest MC31.
htnut
28th July 2023, 20:03
I guess it depends which version of MC you are using, DirectSound bitstreaming was only fixed recently, so you would only succeed with the latest MC31.
Figures, I bought MC30 last year.
Sunspark
28th July 2023, 23:50
I've never done so and don't have an Atmos system, but the dolby atmos for home theatre in the dolby access app from the MS store is free. It's only the headphones part that costs so just skip the trial/purchase and only install. Might be worth a try for you. You could set up the home theatre part and then see which players it will work with.
htnut
29th July 2023, 07:07
I guess it depends which version of MC you are using, DirectSound bitstreaming was only fixed recently, so you would only succeed with the latest MC31.
nevcairiel, you hit the nail on the head.
I installed the trial of MC31 this evening and... it works.
All fixed.
So much time I spent trying to find workarounds, to learn that it was a broken implementation of DirectSound the whole time. Tasteless way for me to pay for an upgrade (isn't it a bug that should be fixed in the MC30 I bought?) But, alas, I support those who continue to strive to improve my home theater experience.
Thank you. Thank you.
JarrettH
30th July 2023, 21:29
WASAPI in shared mode is rather cursed. Its not that helpful. For WASAPI you should always want to use Exclusive.
DirectSound is always in shared mode and requires picking a different output device entirely.
If two streams are playing in Shared mode, is one resampled? I've always wondered about this :cool:
lvqcl
31st July 2023, 08:31
One, or both, or none. Depends of their sample rate.
nevcairiel
31st July 2023, 09:37
WASAPI shared mode does not in fact resample, as it will only accept input in the currently configured shared sample rate. At least it won't the way its used here.
DirectSound does resample, to the system sample rate.
huhn
31st July 2023, 21:27
so wasapi wouldn't work with the mpdn "resample/reclock" where it just throws an arbitrary sample rate at it?
or isn't supposed to work.
Sunspark
31st July 2023, 21:50
While it is true that wasapi and directsound are separate libraries, the output from both libraries goes to the same destination, wasapi shared, which then goes through the windows audio service.
wasapi exclusive skips the audio service but both it and the shared then goes through the kernel streaming library, etc.
Above based on the diagram at https://github.com/dechamps/FlexASIO/blob/master/BACKENDS.md
htnut
1st August 2023, 07:14
WASAPI shared mode does not in fact resample, as it will only accept input in the currently configured shared sample rate. At least it won't the way its used here.
DirectSound does resample, to the system sample rate.
So, should JR MC31 also successfully be able to bitstream using WASAPI with "exclusive mode" unchecked?
While I can pause and "share" the DirectSound device, if I instead choose WASAPI + bitstream: HDMI then MC31 throws an error unless "exclusive mode" is checked.
nevcairiel
1st August 2023, 07:29
No, WASAPI shared mode does not allow that. In fact I don't think anyone should ever use WASAPI shared mode, its just cumbersome to use.
JarrettH
16th August 2023, 01:01
hey nevcairiel, just wondering, should I be using hardware or software decoding? I run a GT 1030, i3 12100, madvr, latest LAV, MPC-BE, Win 10. I've only settled on software because when I bring up the stats in madvr, my setup is 2 ms faster in render times this way. Thanks.
ryrynz
16th August 2023, 02:14
Might not actually be faster though, should check your clockspeeds.
JarrettH
16th August 2023, 21:41
Oh might it downclock? The speed looks about the same to me when I opened up gpu-z. I'm using Optimal power management mode.
ryrynz
17th August 2023, 02:33
Set it to log the results and compare.
ashlar42
17th August 2023, 14:24
I am seeing dropped/repeated frames with the new Avatar and Avatar The Way of Water UHD discs.
Remuxing them leads to a situation where, even though the refresh rate is spot on (with madVR indicating expected dropped/repeated frames in days), it drops a frame here, repeats a frame there. In the end, while watching the whole movies, on average I get about 50/60 an hour. They don't always happen in the same portions of the movies but they do tend to appear always in the same "spots" (only sometimes they don't).
I have tried basically everything I know of in madVR and that's why I write here now. One thing I've discovered is that if I use the regular AC3 audio track (as opposed to the TrueHD Atmos one), not a single frame is being dropped or repeated.
Same thing happens if I decode TrueHD Atmos to 7.1 PCM (losing Atmos information in the process, obviously) or AC3 to 5.1 PCM. No frames dropped or repeated.
Any ideas? While looking at LAV options I wondered what is "Auto A/V Sync correction" supposed to do (and if it matters at all in a bitstreaming scenario such as this).
Edit: tried disabling the A/V Sync correction option, it didn't make any difference.
Edit 2: this seems to be happening with several UHD remuxes with an Atmos track. As far as I could tell, Kodi does not exhibit the same problem. Can't tell if these semi-recent fixes have something to do with it: https://github.com/xbmc/xbmc/pull/22705
ashlar42
22nd August 2023, 16:31
Anyone? Is there anywhere else I should be reporting this at?
nevcairiel
22nd August 2023, 18:44
There is a known issue with high-bitrate Atmos tracks that I haven't gotten around to addressing quite yet. Hopefully soon.
SamuriHL
22nd August 2023, 23:49
That would be awesome.
ashlar42
23rd August 2023, 01:17
There is a known issue with high-bitrate Atmos tracks that I haven't gotten around to addressing quite yet. Hopefully soon.
Thanks for your reply. Much appreciated.
ashlar42
23rd August 2023, 14:39
There is a known issue with high-bitrate Atmos tracks that I haven't gotten around to addressing quite yet. Hopefully soon.
Just to be sure that we are talking about the same issue:
My problem does not lead to any audio dropouts. Audio is perfect, it's just frames that are getting dropped or repeated in madVR.
htnut
26th August 2023, 07:00
There is a known issue with high-bitrate Atmos tracks that I haven't gotten around to addressing quite yet. Hopefully soon.
When this issue is solved do you think it may solve the DirectSound bitstreaming audio dropouts w/ momentary video glitch that I reported on the JRiver forum?
nevcairiel
26th August 2023, 08:18
No. Not every issue is related.
ashlar42
26th August 2023, 16:23
No. Not every issue is related.
Hi! Could you let me know if the issue I reported is the one you mentioned as being likely solvable through LAV Filters? From your wording I am not sure I understood things correctly. Sorry...
I am experiencing dropped/repeated frames in madVR but no audio dropouts or anything. Audio remains perfect throughout playback.
pcamino
30th August 2023, 06:38
Hi all, new to the forum and new to this in general. I was curious as to if LAV filters are able to handle and decode 4ch audio video files within Windows and what is needed to playback those types of files if I have my audio card in windows set to "quadraphonic" I'm trying to replicate a video player like Playback pro, where if I put a Mac OS in quadraphonic. then it can actually read all 4channels of the video files and send them discretely to the quadraphonic outputs of my audio interface. I coudn't find any settings within the LAV filter GUI to make it work. Though i'm not sure if the player software may need some tweaking as well.
tebasuna51
30th August 2023, 13:04
Hi all, new to the forum and new to this in general.
Welcome to the Doom9 forum.
I was curious as to if LAV filters are able to handle and decode 4ch audio video files within Windows...
No problem, in Windows I can recommend you software players (https://forum.doom9.org/forumdisplay.php?f=15) like MPC-HC (https://forum.doom9.org/showthread.php?t=175209) or BE (https://forum.doom9.org/showthread.php?t=165890) with LAV filters included. Also VLC (https://www.videolan.org/) can be used.
Balling
30th August 2023, 19:17
There is a known issue with high-bitrate Atmos tracks that I haven't gotten around to addressing quite yet. Hopefully soon.
Samples?
ashlar42
30th August 2023, 23:16
Samples?
The new Avatar remuxed, for instance. But it's not just that... even the old Avatar in UHD suffers from the same problem.
ashlar42
31st August 2023, 22:16
Just wanted to add that with mpc-be, using internal filters (hence not LAV), frames are not repeated/dropped with madVR. With the Atmos titles, I mean.
Balling
1st September 2023, 16:56
The new Avatar remuxed, for instance. But it's not just that... even the old Avatar in UHD suffers from the same problem.
Can you give a file? I will test on my LG C9. Because all other genius players are hardly reference.
ashlar42
1st September 2023, 22:06
Can you give a file? I will test on my LG C9. Because all other genius players are hardly reference.
Not sure what copyright limitations allow me to do. If a small segment would be ok, how small, etc.
Balling
1st September 2023, 22:11
Not sure what copyright limitations allow me to do. If a small segment would be ok, how small, etc.
Small that allows to reproduce falls under the fair use.
pcamino
7th September 2023, 05:01
Welcome to the Doom9 forum.
No problem, in Windows I can recommend you software players (https://forum.doom9.org/forumdisplay.php?f=15) like MPC-HC (https://forum.doom9.org/showthread.php?t=175209) or BE (https://forum.doom9.org/showthread.php?t=165890) with LAV filters included. Also VLC (https://www.videolan.org/) can be used.
Thanks @tebasuna51, but wanted to build custom software to use as a player, just need to figure out code to be able to do the 4ch decode thing.
tebasuna51
7th September 2023, 10:27
... but wanted to build custom software to use as a player, just need to figure out code to be able to do the 4ch decode thing.
You can use the LAV filters, after solved some problems/bugs in past year (https://forum.doom9.org/showthread.php?p=1967419#post1967419), can decode and output correct multichannel audio with any kind of channel configuration.
Before that the LAV filters apply a default :
{4, SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY},
always for 4 channels, now preserve the channel mask from the source and can output quadraphonic audio (FL,FR,SL,SR) to your player.
nevcairiel
7th September 2023, 11:41
There is a known issue with high-bitrate Atmos tracks that I haven't gotten around to addressing quite yet. Hopefully soon.
I've applied a fix for this, give the latest test build a try from here:
https://files.1f0.de/lavf/nightly/LAVFilters-0.77.2-3.exe
htnut
9th September 2023, 07:40
I've applied a fix for this, give the latest test build a try from here:
https://files.1f0.de/lavf/nightly/LAVFilters-0.77.2-3.exe
Will the associated fix be included in a JRiver MC31 build?
ashlar42
11th September 2023, 00:24
I've applied a fix for this, give the latest test build a try from here:
https://files.1f0.de/lavf/nightly/LAVFilters-0.77.2-3.exe
Preliminary results seem good. Probably better than MPC-BE Audio filter that I was using "ad interim".
Avatar The Way of Water remux played for one and a half hour without drops/repeats. This is far, far better than before. I left the movie playing and after another 30 minutes or so I found 3 frames dropped (or repeated, I don't remember). In the next few days I will experiment some more to see whether that can be replicated or if it was a one-off glitch (I try to keep my HTPC Windows 10 install lean but it's not *completely* dedicated).
Refresh rate should not be the culprit, as that indicates frames dropped/repeated after a couple of days.
In any case this is a clear step forward, of this I'm sure. Thanks a lot.
I actually would like to know if there's a way in madVR to activate a log, in order to have a reference to when, during playback, frames have been dropped/repeated. I like Avatar but I can't watch it ten times... :D
huhn
13th September 2023, 01:59
debug tracks pretty much everything.
they are very hard to read and have an absolute insane size.
v0lt
19th September 2023, 07:46
@nevcairiel
Please update FFmpeg. The developers recently eliminated a very unpleasant noise when playing APE 24-bit files (https://github.com/FFmpeg/FFmpeg/commit/80ad0e2198df4e2961928d8304da58df6db77ec4).
nevcairiel
19th September 2023, 12:26
I plan on updating it soon.
Balling
22nd September 2023, 21:33
@nevcairiel
Please update FFmpeg. The developers recently eliminated a very unpleasant noise when playing APE 24-bit files (https://github.com/FFmpeg/FFmpeg/commit/80ad0e2198df4e2961928d8304da58df6db77ec4).
Partially eliminated. https://trac.ffmpeg.org/ticket/10323
lvqcl
30th September 2023, 09:20
LAVFilters-0.77.2-7.exe wasn't built/uploaded properly? Its size is 624K.
Siso
30th September 2023, 12:18
LAVFilters-0.77.2-7.exe wasn't built/uploaded properly? Its size is 624K.
+ 1. Can't install it.
nevcairiel
30th September 2023, 15:15
Seems like there was a network error, I've restarted the latest nightly.
Siso
30th September 2023, 15:36
Seems like there was a network error, I've restarted the latest nightly.
Thank you, nev. It works now.
Mercury_22
30th September 2023, 20:54
D3D11 is crashing with the latest build LAVFilters-0.77.2-7 (DXVA2 it's working though)
Intel Graphics Driver 31.0.101.4826
Spunkmeyer
30th September 2023, 21:15
Same on AMD, reverted to 0.77.2-3.
Siso
30th September 2023, 21:39
It crashes for me too with dxva cp.
nevcairiel
30th September 2023, 21:55
That should be fixed in the next build. Its still rather work-in-progress, so any testing is appreciated.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.