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 22nd February 2013, 20:47   #14221  |  Link
e-t172
Registered User
 
Join Date: Jan 2008
Posts: 589
Quote:
Originally Posted by dansrfe View Post
What are the recommended mix levels for 5.1 audio output?
Again, the authoritative, official, recognized source for downmix coefficients is Rec. ITU-R BS.775. See table 2 at page 11.

Regarding LFE: it is recommended to discard LFE (i.e. zero coefficient), unless you're sure your system is capable of handling high-level low frequency signals (i.e. you have an expensive subwoofer). If you do want to downmix LFE, the correct coefficient is (assuming stereo output) 1.58 (+10dB standard LFE boost -6dB because of additive bass output from the two stereo speakers or from remixing in bass management = +4dB = 1.58).

Last edited by e-t172; 22nd February 2013 at 20:54.
e-t172 is offline   Reply With Quote
Old 22nd February 2013, 20:49   #14222  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
The LAV default settings are fine (with no LFE). It should exactly match the ITU recommendation for a 5.1 -> Stereo downmix.
Adjust to personal preference.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 22nd February 2013, 23:44   #14223  |  Link
dansrfe
Registered User
 
Join Date: Jan 2009
Posts: 1,210
My output is to 5.1, not to stereo.
dansrfe is offline   Reply With Quote
Old 22nd February 2013, 23:59   #14224  |  Link
Pomegranate
Registered User
 
Pomegranate's Avatar
 
Join Date: Oct 2012
Posts: 66
Quote:
Originally Posted by nevcairiel View Post
The LAV default settings are fine (with no LFE). It should exactly match the ITU recommendation for a 5.1 -> Stereo downmix.
Adjust to personal preference.
What if one wants to do 7.1 to stereo?

E.g. watching the Avengers BD with headphones.
Pomegranate is offline   Reply With Quote
Old 23rd February 2013, 09:04   #14225  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
Its still fine for 7.1 -> Stereo or 7.1 -> 5.1, its just another set of surround channels to mix.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 23rd February 2013, 10:03   #14226  |  Link
Mangix
Audiophile
 
Join Date: Oct 2006
Posts: 353
I found an annoying bug with CUVID on my system. It's giving me artifacting. I can't replicate with DXVA2(native/copy-back) or with the software decoder. Here are screenshots as well as the sample.

https://dl.dropbox.com/u/102011983/LAV%20Bugs/weird%20spots.png
https://dl.dropbox.com/u/102011983/LAV%20Bugs/no%20spots.png

https://dl.dropbox.com/u/102011983/LAV%20Bugs/vmr9-test.avi

I have nothing special enabled in the nvidia control panel. Then again if I did, it should also show up in the second picture which was done with copy-back mode.

This is with the latest 314.07 drivers.
Mangix is offline   Reply With Quote
Old 23rd February 2013, 10:31   #14227  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
This clip is MPEG-4 ASP, DXVA2 in LAV does not support this format, CUVID is the only HW implementation which supports it at this time, so its very well possible that the hw decoder is not perfect. MPEG-4 ASP is also disabled by default for HW decoding because it is known to have some issues.
I suggest to turn it off again.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 23rd February 2013, 17:22   #14228  |  Link
6233638
Registered User
 
Join Date: Apr 2009
Posts: 1,019
I have a question: when downmixing surround to stereo, there is a large decrease in volume with normalization enabled - as you would expect. This has me turning up the volume to roughly 25/100 when listening to 5.1 for example, and even louder with 7.1
But if I then play a stereo file, I have to reduce volume to about 10/100 for roughly the same level through my headphones.

Would it be possible to have an option where LAV applies the same gain to stereo files that it does when downmixing, to keep volume the same when playing videos no matter how many channels they have?
It can be very jarring if you watch a DVD right to the very end and it goes back to the menus which are playing stereo audio at a significantly louder volume for example.

Last edited by 6233638; 23rd February 2013 at 17:24.
6233638 is offline   Reply With Quote
Old 23rd February 2013, 17:32   #14229  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
I do not have any plans for this. Use downmixing without normalization for a more consistent volume, on most material it won't even have to adjust the volume to avoid clipping because the used dynamic range is very limited in the first place.

LAV is still first and foremost a decoder, and i only added the mixing because it was a low-hanging fruit and solves a few basic playback problems, but i do intend to keep it simple.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders

Last edited by nevcairiel; 23rd February 2013 at 17:35.
nevcairiel is offline   Reply With Quote
Old 23rd February 2013, 17:42   #14230  |  Link
6233638
Registered User
 
Join Date: Apr 2009
Posts: 1,019
Quote:
Originally Posted by nevcairiel View Post
I do not have any plans for this. Use downmixing without normalization for a more consistent volume, on most material it won't even have to adjust the volume to avoid clipping because the used dynamic range is very limited in the first place.

LAV is still first and foremost a decoder, and i only added the mixing because it was a low-hanging fruit and solves a few basic playback problems, but i do intend to keep it simple.
I would rather use Normalization because it guarantees that you aren't going to either have clipping, or dynamic volume adjustments, as I have plenty of dynamic range to spare on my system.

It seemed like this would be a relatively simple adjustment (reduce the gain of 5.1 and stereo tracks to match downmixed 7.1) and could be tied into the existing "Don't mix stereo sources" option when the output speaker configuration is set to stereo, as the option doesn't do anything right now.

Normalizing volume across all videos provides a much better user experience for anyone listening to headphones or stereo speakers.

Last edited by 6233638; 23rd February 2013 at 17:44.
6233638 is offline   Reply With Quote
Old 23rd February 2013, 18:19   #14231  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
The problem with all these "simple" adjustments is that there is hundreds of different approaches, and everyone wants another one, so i rather keep it as simple as makes sense to me, focusing on decoding, and not processing.

Many people listening with headphones or stereo systems also have rather weak systems, where the low volume of the normalized matrix is a problem, so i see this as a rather limited use-case.
Would i use the worst-case, and adjust everything to a 7.1 mixing level? Thats quite the extensive volume reduction, especially if you enable LFE at any decent level.

Commercial content can in most cases just be downmixed from 5.1 to stereo without causing clipping, so its somewhat unlikely to even get clipping or a mid-stream volume change, so thats what i'm going to keep suggesting.
I can also look into extracing the embeded stereo downmix from AC3 and TrueHD, which for those codecs should at least remove any concerns about how its mixed. Sadly DTS doesn't seem to have anything comparable.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders

Last edited by nevcairiel; 23rd February 2013 at 18:22.
nevcairiel is offline   Reply With Quote
Old 23rd February 2013, 19:48   #14232  |  Link
6233638
Registered User
 
Join Date: Apr 2009
Posts: 1,019
Quote:
Originally Posted by nevcairiel View Post
The problem with all these "simple" adjustments is that there is hundreds of different approaches, and everyone wants another one, so i rather keep it as simple as makes sense to me, focusing on decoding, and not processing.
That's understandable, it just seemed like it would be a small adjustment to the downmixing options.

Quote:
Originally Posted by nevcairiel View Post
Many people listening with headphones or stereo systems also have rather weak systems, where the low volume of the normalized matrix is a problem, so i see this as a rather limited use-case.
Would i use the worst-case, and adjust everything to a 7.1 mixing level? Thats quite the extensive volume reduction, especially if you enable LFE at any decent level.
Well that's how I would do it, as that would give you a consistent volume level whether the content is 2.0/5.1/7.1 and I would either integrate it with the "Don't mix stereo sources" option, or add a "Normalize volume level" option below "Normalize matrix" because if you are also reducing the volume of 5.1 as well as 2.0, technically the "Don't mix stereo sources" option would not apply.

If I'm measuring this correctly, with my current downmix of 0.71/0.71/2.24, volume is being attenuated by 14.6dB when downmixing a 7.1 signal to stereo.

That's less than 3-bits you're losing, so if you are outputting 24-bit, you should be fine. (16-bit to 13-bit might be problematic)

Quote:
Originally Posted by nevcairiel View Post
Commercial content can in most cases just be downmixed from 5.1 to stereo without causing clipping, so its somewhat unlikely to even get clipping or a mid-stream volume change, so thats what i'm going to keep suggesting.
It's probably wise to not reduce dynamic range so much with the standard option, but I really can't stand dynamic volume adjustments, so I would rather guarantee that won't happen, than assume it probably won't.

Quote:
Originally Posted by nevcairiel View Post
I can also look into extracing the embeded stereo downmix from AC3 and TrueHD, which for those codecs should at least remove any concerns about how its mixed. Sadly DTS doesn't seem to have anything comparable.
This would actually be a nice option to have. That said, most stereo downmixing assumes that you are going to play on a low-end system (e.g. TV speakers or a cheap hifi wired up to the TV) and discards the LFE channel as a result.

As I have a higher-end headphone setup that I primarily use, I prefer to keep LFE in the mix.

I could be mistaken, but I believe the embedded downmix only specifies the level of the surround channels, as they may have designed the mix around 0.5 or 1.0 rather than 0.71, so perhaps it could be integrated to only adjust the surround level, rather than set the entire mix? (so you can have the correct surround level and incorporate LFE)

Last edited by 6233638; 23rd February 2013 at 19:50.
6233638 is offline   Reply With Quote
Old 23rd February 2013, 20:40   #14233  |  Link
supercoolman
Registered User
 
Join Date: Feb 2008
Posts: 15
Is it possible to always show subtitle selection in splitter menu even if there is only one subtitle in the container (MKV/MP4...etc) available? I believe audio and video stream selection are always shown even if there is only one for each.
supercoolman is offline   Reply With Quote
Old 23rd February 2013, 20:44   #14234  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
The selection is always shown, even if there is only one sub. In fact, there can never be only one sub, either there is zero, or there is one real sub stream, and the virtual "no subtitles" stream.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 23rd February 2013, 21:57   #14235  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 693
Does my soundcard (fully) support 24-bit output?

Although I have a 2.1 speaker setup myself, by accident I noticed something odd when LAV Audio Decoder processes multichannel lossy audio formats (ac3,dts,ogg,opus, etc). With default settings, all channels are sort of downmixed to stereo, with the surround left and right channels almost inaudible. Normally I still use FFDShow for movie soundtracks, which doesn't have this issue. I quickly noticed, with all integer output formats enabled, by default LAV Audio Decoder converts the input (32-bit float) to 24-bit int, whereas FFDShow converts it to 16-bit int. Why 24-bit int?
If I only enable 16-bit int in LAV Audio Decoder, all is fine.

Playing a multichannel lossy audio format with LAV Audio Decoder through Avisynth (DirectShowSource) results in FFDShow Audio Processor being added to the graph for a PCM 24-bit int to PCM 16-bit int conversion. If I disable the FFDShow Audio Processor, I can't even play the audio file (through Avisynth).
Is this a sign my soundcard (rather soundchip nowadays) doesn't support 24-bit output? But if so, why then do all stereo lossy audio formats (also 32-bit float to 24-bit int) play fine here?
Does anyone have an answer to this?

Btw, why does LAV Audio Decoder process all lossy audio formats in 32-bit float, while all lossless audio formats are processed in 16-bit int? Or is this ffmpeg/libavcodec by design?
__________________
My hobby website
Reino is offline   Reply With Quote
Old 23rd February 2013, 22:07   #14236  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
Quote:
Originally Posted by CoRoNe View Post
I quickly noticed, with all integer output formats enabled, by default LAV Audio Decoder converts the input (32-bit float) to 24-bit int, whereas FFDShow converts it to 16-bit int. Why 24-bit int?
24-bit is preferred over 16-bit when converting from 32-bit float, because it can hold the 32-bit float precision better (32-bit float is about 24-bits mantissa + the exponent)

Quote:
Originally Posted by CoRoNe View Post
Playing a multichannel lossy audio format with LAV Audio Decoder through Avisynth (DirectShowSource) results in FFDShow Audio Processor being added to the graph for a PCM 24-bit int to PCM 16-bit int conversion. If I disable the FFDShow Audio Processor, I can't even play the audio file (through Avisynth).
Its certainly possibly that AviSynth doesn't accept 24-bit audio, i've personally no experience with AviSynth for audio processing.
However, LAV always offers a 16-bit fallback for all formats, but i don't know how smart the AviSynth graph building is, maybe it just doesn't notice that its available as a second media type from the audio decoder.

Quote:
Originally Posted by CoRoNe View Post
Is this a sign my soundcard (rather soundchip nowadays) doesn't support 24-bit output? But if so, why then do all stereo lossy audio formats (also 32-bit float to 24-bit int) play fine here?
If you are on XP, then your audio driver is responsible for downmixing, and as such its very likely that it just doesn't do 24-bit downmixing well, which explains your troubles. Since I've never heard of such oddities on Vista/7, i'm assuming that you in fact are on XP.

Quote:
Originally Posted by CoRoNe View Post
Btw, why does LAV Audio Decoder process all lossy audio formats in 32-bit float, while all lossless audio formats are processed in 16-bit int? Or is this ffmpeg/libavcodec by design?
Nearly all lossy decoders decode natively to 32-bit float. Lossy formats don't have a "bitdepth" as such, and outout floating point values.
Lossless decoders on the other hand do have a bitdepth, and LAV will output it as appropriate. If it outputs 16-bit, then thats what was encoded in the lossless file. There are 24-bit files as well, and some formats even support 32-bit integer, however thats very rare in the real world.

LAV is by default setup to output untouched audio if possible. On XP 32-bit float output is however disabled by default, because a lot of XP audio drivers have serious issues with float audio.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 24th February 2013, 00:18   #14237  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 693
You're right, I'm still on WinXP. In fact I'm still using an AMD Athlon XP 3200+ with an ATI Radeon HD 3850 AGP .
However, the strange thing is that, although 24-bit for LAV and FFDShow is problematic, 32-bit int is not. I guess, especially for that time, the Nvidia SoundStorm (APU) really was top of the notch.
__________________
My hobby website
Reino is offline   Reply With Quote
Old 24th February 2013, 04:14   #14238  |  Link
Mangix
Audiophile
 
Join Date: Oct 2006
Posts: 353
Quote:
Originally Posted by nevcairiel View Post
This clip is MPEG-4 ASP, DXVA2 in LAV does not support this format, CUVID is the only HW implementation which supports it at this time, so its very well possible that the hw decoder is not perfect. MPEG-4 ASP is also disabled by default for HW decoding because it is known to have some issues.
I suggest to turn it off again.
Can't believe I missed that. Thanks.
Mangix is offline   Reply With Quote
Old 24th February 2013, 07:25   #14239  |  Link
supercoolman
Registered User
 
Join Date: Feb 2008
Posts: 15
I can't find the subtitle selection in LAV Splitter menu when there is no subtitle in the container. screenshot attached
Attached Images
 
supercoolman is offline   Reply With Quote
Old 24th February 2013, 07:37   #14240  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
If there is no subtitles, there is no selection. What would there be to select?
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel 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 01:40.


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