Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > New and alternative a/v containers

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th July 2021, 15:22   #24521  |  Link
Qotscha
Registered User
 
Join Date: Dec 2012
Posts: 40
Quote:
Originally Posted by raymondjpg View Post
You could be right, I thought that eng|n in the subtitle field assumed normal english subtitles for all audio languages.

However, setting the subtitle field to eng:eng|n or *:eng|n makes no difference to the behaviour in MPC-BE. If the first listed english subtitle in a matroska container is SDH or forced, that will still be selected over a normal english track that is further down the list.
After testing this a bit, it seems to me that LAV does not recognize visual or hearing impaired flags in Matroska at all. In track listing there are no [visual impaired] or [hearing impaired] texts and, when using advanced subtitle selection, hearing impaired tracks are treated like normal tracks (or default and/or forced if you flag them that way).

With TS files those texts are shown in track listing and subtitle selection works correctly.
Qotscha is offline   Reply With Quote
Old 16th July 2021, 19:36   #24522  |  Link
glorp
Registered User
 
Join Date: Apr 2010
Posts: 49
mkvmerge added new track header flags for things like hearing/visual impaired, commentary, etc. That was a fairly recent addition (version 54.0, Feb 21). I imagine LAV splitter isn't aware of them yet. IIRC it used to look for "SDH" in the Title tag of a Matroska sub track to determine that it was hearing impaired.

Last edited by glorp; 16th July 2021 at 19:40.
glorp is offline   Reply With Quote
Old 17th July 2021, 02:08   #24523  |  Link
raymondjpg
Registered User
 
Join Date: Jan 2014
Posts: 123
Quote:
Originally Posted by Qotscha View Post
After testing this a bit, it seems to me that LAV does not recognize visual or hearing impaired flags in Matroska at all. In track listing there are no [visual impaired] or [hearing impaired] texts and, when using advanced subtitle selection, hearing impaired tracks are treated like normal tracks (or default and/or forced if you flag them that way).

With TS files those texts are shown in track listing and subtitle selection works correctly.
If I mux the Matroska file into a TS file with tsMuxeR 2.6.12, then all subtitle tracks (listed as PGS) have no track names and have the default flag set to "Yes".

Interestingly playing the TS file in both MPC-HC 1.8.5 (fairly old) with internal LAV filters 0.74.0, and in MPC-BE with external LAV filters 0.75.1, LAV splitter appears to have picked up the first listed English subtitle track (SDH in the matroska container), but displays subtitles from the normal track. This is consistent with your contention that subtitle selection is correct in TS files.

However, manually selecting the English subtitle from further down the list (the normal track in the matroska container) in the LAV splitter subtitle track selection still delivers the normal English subtitles! It's as if the SDH subtitle has disappeared. The SDH track is still there, as it can be selected under the Play|Subtitle Track selection in the player.

All tests were conducted with eng|n in the LAV Splitter subtitle field. Changing that to eng|h or eng:eng|h does not force the SDH subtitles, throwing some doubt on the contention that subtitle selection is correct in TS files.

Quote:
Originally Posted by glorp View Post
mkvmerge added new track header flags for things like hearing/visual impaired, commentary, etc. That was a fairly recent addition (version 54.0, Feb 21). I imagine LAV splitter isn't aware of them yet. IIRC it used to look for "SDH" in the Title tag of a Matroska sub track to determine that it was hearing impaired.
Remuxing the matroska file with the latest version of MKVToolNix GUI (v59.0.0), and setting the "Hearing impaired" flag to "Yes" makes no difference to the behaviour. With eng|n or eng:eng|n in the LAV Splitter subtitle field, the first listed English subtitle track (SDH) is still selected in preference over the normal track further down the list.

This is consistent with your contention that LAV filters may not have caught up with recent changes to flags in the matroska container, but it also appears that LAV splitter is not recognising "SDH" in the name tag of a Matroska sub track.

This behaviour is not new. I raised a similar issue about three years ago in the MPC-BE forum.
raymondjpg is offline   Reply With Quote
Old 17th July 2021, 12:12   #24524  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,342
LAV does not even attempt to determine the type of a track based on its name - such detection is honestly rather unreliable in the best of cases, so I also have no plans to do that. So that not working is perfectly expected.
Matroska SDH flags or such are not read yet, but i'll put it on the list to fix.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is online now   Reply With Quote
Old 18th July 2021, 13:05   #24525  |  Link
raymondjpg
Registered User
 
Join Date: Jan 2014
Posts: 123
Quote:
Originally Posted by nevcairiel View Post
LAV does not even attempt to determine the type of a track based on its name - such detection is honestly rather unreliable in the best of cases, so I also have no plans to do that. So that not working is perfectly expected.
Matroska SDH flags or such are not read yet, but i'll put it on the list to fix.
Thanks for that advice.

Regards
raymondjpg is offline   Reply With Quote
Old 19th July 2021, 23:45   #24526  |  Link
Sunspark
Registered User
 
Join Date: Nov 2015
Posts: 467
Quote:
Originally Posted by mclingo View Post
ok, so if I enable volume equalization in enhancements in the windows audio properties all the volume comes back, are these supposed to be all disabled?
Part of it is the codec, and part of it is the player. If the audio codec is E-AC3 and if I am using MPC-HC I have to turn on Normalise and 400% max amplication with regain volume checked in the player's options. What you found in the Windows properties is the same basic idea. If using exclusive mode, you will have to use the player's options because the Windows setting is for directsound output.
Sunspark is offline   Reply With Quote
Old 25th July 2021, 11:40   #24527  |  Link
ryrynz
Registered User
 
ryrynz's Avatar
 
Join Date: Mar 2009
Posts: 3,646
NVDec support would be awesome for DVD stuff, the difference between it and other deinterlacers is huge based on my own experience.
In the meantime I'll just switch to CUVID manually any time I play a DVD.
ryrynz is offline   Reply With Quote
Old 1st August 2021, 04:30   #24528  |  Link
Sunspark
Registered User
 
Join Date: Nov 2015
Posts: 467
Quote:
Originally Posted by Ger View Post
Think you're on to something there.

I use the System Default renderer (more info about that below).

It's definitely related to 5.1 vs. 2.0. If I uninstall AC3Filter I can switch between the 5.1 and 2.0 tracks in that sample, and the 5.1 track loads Monogram and the 2.0 track loads LAVCAudio.

With lavcaudio set to "prefer":
AC3 2.0 track: LAVCAudio loads (alone) and sounds good.
AC3 5.1 track: Highest merit AC3 decoder is used. Internal, ffdshow etc. LAVCAudio is not loaded at all.

I'll just include some more info in case it helps (this is all with The Gift sample):

With AC3Filter installed:
LAVFSplitter -> LAVCAudio -> AC3Filter -> Audio Switcher -> Default DirectSound Device - CLSID : {79376820-07D0-11CF-A24D-0020AFD79767}

Without AC3Filter:
LAVFSplitter -> Monogram AAC decoder -> Audio Switcher -> Default DirectSound Device - CLSID : {79376820-07D0-11CF-A24D-0020AFD79767}

Default DirectSound Device should be Speakers on Realtek ALC 885 HDAUDIO. Configured for stereo (tried changing to 5.1, even though I don't have enough speakers, but no change in behavior).

Not using custom mapping in MPC-HC audio switcher.

Tried "DirectSound: AMD HDMI Output" (which I use regularly for my TV), and it also goes straight to Monogram AAC (when AC3Filter isn't installed), like the Realtek DS default.

Tried Speakers (without the DirectSound prefix), and lavcaudio now loads, but no audible result (silence).

The only audiorenderer option in MPC-HC that produces proper sound for me without AC3Filter is "Default WaveOut Device - CLSID : {E30629D1-27E5-11CE-875D-00608CB78066}".

So summarized, I guess LAVCAudio is happy to accept 2.0 tracks, but doeesn't want 5.1 tracks when used with with any of my DirectSound renderers. With non-DS renderers the results are mixed.

If you want me to copy/paste the pin info from a particular place in the chain, with or without AC3Filter installed, let me know.
Apologies for necro-quoting a comment from 10 years ago, but it is still relevant today because I was fiddling with it, so I am going to write about it.

I have the current versions of both MPC-BE and MPC-HC installed and currently both of them have matching LAV filter versions for the purpose of this exercise. One key difference with the audio renderer however is that MPC-BE uses its own mpc audio renderer that is not producing identical sound output to the internal audio renderer in MPC-HC (different CLSIDs) even though both of them are set to exclusive WASAPI mode--as opposed to shared mode.

I felt that the output from MPC-HC was noticeably quieter than MPC-BE and I didn't understand why, since one would assume with WASAPI it would be identical and both were set to 100% volume.

Like Ger, I'm also using a Realtek device and I was working with a 6-channel E-AC3 video that is being downmixed to 2-channel stereo over an analog 3.5mm connection.

One challenge I have, is that I don't have good hearing but I do feel given between two samples to choose from that I can identify which one is has more clarity or is louder than the other.

My current understanding of the 3 main audio outputs Windows uses; DirectSound, WaveOut and WASAPI is that directsound which is the primary sound system will mix & resample anything and everything that it processes. Waveout is also part of the OS but will not be mixed/resampled by Windows afaik, and WASAPI is supposed to be completely untouched by the OS.

In MPC-HC eac3 downmixed voices will be loudest and have decent tonality (more body?) when using Default WaveOut Device.

There is still a slight (I feel) listening difference between it and MPC-BE's audio renderer set for WASAPI exclusive mode but I am not able to quantify what it is but volume wise they are relatively comparable.

So, if you're using MPC-HC downmixing to stereo analog, my opinion is that waveout is best. MPC-BE does not have a waveout renderer. It's either use the wasapi one or directsound.

Probably these results are completely different over HDMI or something else.

For most people likely none of this matters because they're probably using digital connections or receivers, but if someone reading this is using a realtek chip analog 2.1 system I'd love to know if you agree or disagree with my listening observations here.

UPDATE: After clsid wrote below in post #24575 I tried shared mode on the internal audio renderer (wasapi) and everything was loud and clear for my analog output. Comparable to directsound. Directsound is also a shared wasapi method in Windows. I am not using waveout (which is a very old output method) and am set for wasapi shared mode in the internal audio renderer.

Last edited by Sunspark; 2nd August 2021 at 17:22.
Sunspark is offline   Reply With Quote
Old 1st August 2021, 06:57   #24529  |  Link
ryrynz
Registered User
 
ryrynz's Avatar
 
Join Date: Mar 2009
Posts: 3,646
Why not record the resulting audio from both for a better analysis? Could compare them visually as well as audibly.
ryrynz is offline   Reply With Quote
Old 1st August 2021, 07:40   #24530  |  Link
Sunspark
Registered User
 
Join Date: Nov 2015
Posts: 467
I don't know how, because I've never done it before.

I'm willing to give it a try. Are there instructions you recommend?

Especially if the results can be depicted visually.
Sunspark is offline   Reply With Quote
Old 1st August 2021, 13:54   #24531  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,642
Some people seem to think that exclusive mode magically improves audio quality. It doesn't. It restricts audio output to one application at a time. Which one might consider to actually be a bad thing.

Even when using WASAPI, there can still be resampling taking place in the driver.

Even with DirectSound, resampling is of high enough quality that I doubt you can hear any difference compared to no resampling.

The main difference between WaveOut and DirectSound is how the volume setting in the player behaves. This might be the reason for the difference that you are noticing.
With WaveOut 100% volume in player equals the main output volume level in Windows. With DirectSound 100% in player corresponds to the application volume level (which can be lower than main level). Click on the volume icon in the system tray to see application volume level.

If you want higher volume for voices when downmixing, then that can be achieved by changing the center mix level to 1.0 in LAV audio decoder mixing settings.
__________________
MPC-HC 2.1.7.2
clsid is offline   Reply With Quote
Old 2nd August 2021, 13:20   #24532  |  Link
el Filou
Registered User
 
el Filou's Avatar
 
Join Date: Oct 2016
Posts: 896
Quote:
Originally Posted by Sunspark View Post
One key difference with the audio renderer however is that MPC-BE uses its own mpc audio renderer that is not producing identical sound output to the internal audio renderer in MPC-HC (different CLSIDs) even though both of them are set to exclusive WASAPI mode--as opposed to shared mode. [...] There is still a slight (I feel) listening difference between it and MPC-BE's audio renderer set for WASAPI exclusive mode but I am not able to quantify what it is but volume wise they are relatively comparable.
Do you see information in the respective audio renderers' property dialog on whether they are doing the downmixing themself, or leaving that to the audio driver?
From my own personal experience, there is no guarantee even when using exclusive mode that the audio driver won't touch the sound before getting it to the output. For example, my Creative X-Fi will gladly accept multichannel input in exclusive mode even though it only has stereo outputs, and downmix it in the driver.
Exclusive mode only guarantees the sound won't be touched my Windows' mixer, after that what happens is up to the audio driver.
Quote:
Originally Posted by Sunspark View Post
I don't know how, because I've never done it before.
I'm willing to give it a try. Are there instructions you recommend?
I don't have time to do a drawing, but if your motherboard/soundcard has a "line in" 3.5mm input (= blue colour, not pink), you can connect the "speakers" 3.5 mm output directly to it and then record with an application like Audacity during playback.
Quote:
Originally Posted by clsid View Post
If you want higher volume for voices when downmixing, then that can be achieved by changing the center mix level to 1.0 in LAV audio decoder mixing settings.
Indeed, in general if you want best results I find it's preferable to enable mixing in LAV and set it to the same channel layout as your output, rather than to leave it to the audio driver/renderer.
__________________
HTPC: Windows 10 22H2, MediaPortal 1, LAV Filters/ReClock/madVR. DVB-C TV, Panasonic GT60, Denon 2310, Core 2 Duo E7400 oc'd, GeForce 1050 Ti 536.40
el Filou is offline   Reply With Quote
Old 2nd August 2021, 17:04   #24533  |  Link
SamuriHL
Registered User
 
SamuriHL's Avatar
 
Join Date: May 2004
Posts: 5,351
The only issue with having LAV decode audio is that for things like ATMOS you lose the extension metadata. Apple gets around this limitation by decoding to PCM and then encoding that and the ATMOS metadata into a MAT 2.0 signal that's sent to the audio device. Man I wish we could do that on the PC.
__________________
HTPC: Windows 11, AMD 5900X, RTX 3080, Pioneer Elite VSX-LX303, LG G2 77" OLED
SamuriHL is offline   Reply With Quote
Old 2nd August 2021, 17:28   #24534  |  Link
Sunspark
Registered User
 
Join Date: Nov 2015
Posts: 467
UPDATE: I won't keep writing about this because at this point it's about the renderer and not the decoder which the LAV filters are, I just wanted to say one last thing to close this off in case it helps someone else. After clsid wrote in post #24575 above, I then tried shared mode on the internal audio renderer (wasapi) and everything rendered loud and clear on my analog output. Comparable to directsound. Directsound is also a shared wasapi method in Windows. I am not using waveout (which is a very old output method) and am now happy with wasapi shared mode in the internal audio renderer.
Sunspark is offline   Reply With Quote
Old 2nd August 2021, 17:35   #24535  |  Link
el Filou
Registered User
 
el Filou's Avatar
 
Join Date: Oct 2016
Posts: 896
LAV has downmixing options even though it's a decoder not a renderer, so I don't think it's off-topic. The issue here was the downmixing and there are many steps in the chain where it can be done.
__________________
HTPC: Windows 10 22H2, MediaPortal 1, LAV Filters/ReClock/madVR. DVB-C TV, Panasonic GT60, Denon 2310, Core 2 Duo E7400 oc'd, GeForce 1050 Ti 536.40
el Filou is offline   Reply With Quote
Old 2nd August 2021, 18:45   #24536  |  Link
Sunspark
Registered User
 
Join Date: Nov 2015
Posts: 467
Good point to make because the implementation thereof is another variable affecting output (the # value used, etc). I am doing the downmixing in LAV. So there are actually 3 possible places on the chain for the downmixing to happen; in LAV, the MPC-BE audio renderer which has an optional mixer (MPC-HC does not have a visible one, just an option to ignore the system mixer which I have checked), and the Windows sound system mixer itself. My hearing is not capable to test these 3 at all beyond general perceptual differences such as loudness and maybe clarity.

Strange that shared mode made such a difference compared to exclusive mode on my system. I am uncertain whether this is because of the audio driver implementation by Realtek or if Windows itself does additional processing even though ignore system mixer is checked. The output from LAV is 32 bit float, but in Windows my system is configured as 24 bit/48000. I have no idea if Windows "knows" that the extra 8 bits are padding or if it literally resamples it down to 24.
Sunspark is offline   Reply With Quote
Old 2nd August 2021, 21:31   #24537  |  Link
el Filou
Registered User
 
el Filou's Avatar
 
Join Date: Oct 2016
Posts: 896
MPC-HC's renderer does automatic downmixing if you check exclusive mode. It then says "Processors: Matrix" in the filter info dialog.

The Windows mixer internally works in 32-bit float too, so there's no conversion from the output of LAV. It then converts to the configured output format for shared mode, but 32 float to 24 int audio is a lossless conversion.
__________________
HTPC: Windows 10 22H2, MediaPortal 1, LAV Filters/ReClock/madVR. DVB-C TV, Panasonic GT60, Denon 2310, Core 2 Duo E7400 oc'd, GeForce 1050 Ti 536.40
el Filou is offline   Reply With Quote
Old 4th August 2021, 06:41   #24538  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
float to int and such is a bit is a bit messy in the audio world.

with int the negative audio can be "louder" with float the positive can be louder. which makes it a bit messy in conversation with clipping and such.

32 bit float or 24 bit int are good enough that is doesn't matter but lossless no.
huhn is offline   Reply With Quote
Old 4th August 2021, 09:11   #24539  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,752
Assuming normalized values (fixed mantissa), it can be equivalent, just omit the mantissa... but there is no guarantee. And floating point samples may exceed the normal range.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 4th August 2021, 11:31   #24540  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
http://blog.bjornroche.com/2009/12/i...out-there.html

looks like fun
huhn is offline   Reply With Quote
Reply

Tags
decoders, directshow, filters, splitter

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:21.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.