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 5th May 2020, 18:39   #23881  |  Link
pankov
Registered User
 
Join Date: Mar 2002
Location: Sofia, Bulgaria
Posts: 661
nev, clsid,
I trust and admire the knowledge that both of you have but as a "simple" user this time I must disagree.
In my past experience some TV shows (don't remember which) ware utterly unwatchable if decoded by LAV instead of by my AVR just because the dialog level was very low. I usually use my AVR at almost the same level (day and night) and having such a discrepancy in the decoded level between different shows and other content was very inconvenient. Also having in mind that most if not all AVRs directly "obey" the Dialog Norm level encoded in the AC3 stream without even giving the users an option to avoid it I must say that this is the "normal" thing to do and this should also be the default behavior for software decoders.
And finally - this AC3 option/level was set by some real life sound engineers and who am I to argue with them if it was correct or not.

Of course LAV is your own "baby" and you can do whatever you want with it - I'm just sharing my experience and why decided to take the bitstreaming path.
__________________
Z370M Pro4 | i3-8100 | 16GB RAM | 256GB SSD + 40TB NAS
NVIDIA GTX 1060 6GB (385.28) | LG OLED65B7V
Win 10 64bit 1803 + Zoom Player v14
pankov is offline   Reply With Quote
Old 5th May 2020, 18:57   #23882  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,342
AVRs also like to apply various degrees of Dynamic Range Compression by default, because it makes stuff sound louder and therefor "better" to a certain crowd, so an argument of "default elsewhere" is not necessarily worth much.
Its also fairly likely that its that what you are hearing. Dialog Normalization is basically a built-in volume knob, it does not affect speech alone, despite its name.

Incidentally, Dialog Normalization in AC3 will only *reduce* the volume of playback. Its not designed to increase it, because increasing can cause clipping. The default value when Dialnorm is not set is -31dBFS, which is the value at which no volume adjustment is being performed. Any value higher then that indicates that the dialog in a program is louder then that default, and to compensate for that, the decoder would reduce the volume to reach that same level again. So a DIALNORM value of -27dB (which is the most common) would mean the volume of the entire track gets reduced by 4dB to get back to the -31dB reference.

Of course you can compensate for this by simply increasing the overall volume of playback, but it my exacerbate issues with uneven volume between different formats.

Here is a good article that explains Dialog Normalization in AC3:
https://hometheaterhifi.com/volume_7...on-6-2000.html

The jist of it is that most content will be reduced in volume when its being handled. Its primary purpose is to unify dialog volume across different programs, not to boost dialog. To avoid you having to reach for your volume control.
Boosting speech alone is more likely a function of DRC (which boosts quiter parts and reduces louder parts)
__________________
LAV Filters - open source ffmpeg based media splitter and decoders

Last edited by nevcairiel; 6th May 2020 at 11:56.
nevcairiel is online now   Reply With Quote
Old 9th May 2020, 18:18   #23883  |  Link
tehax1
Registered User
 
Join Date: May 2020
Location: Neukirchen-Vluyn, Germany
Posts: 7
Hello,
i am new to this forum so sorry if i ask already known things. So, i want to know how i get a second pgs subtitle selected by rule. Maybe by rule: if there are two German pgs subtitle then select the second one, for only foreign spoken language. Forced subtitle do not work and if i select a language i only get the first pgs active which shows complete German subtitle. Enclosed screenshot shows second subtitle selected.
tehax1 is offline   Reply With Quote
Old 9th May 2020, 18:48   #23884  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
There is no rule to make this possible with LAV Splitter.
sneaker_ger is offline   Reply With Quote
Old 9th May 2020, 18:50   #23885  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,342
Positional rules are also a weird concept to me. There is no guarantee that any file or another file agree about any sort of positional importance. All other rules rely on metadata, flags, language, or even the title - all things you can deliberately control and have a deliberate meaning. The position is just.. potentially arbitrary?
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is online now   Reply With Quote
Old 9th May 2020, 19:21   #23886  |  Link
tehax1
Registered User
 
Join Date: May 2020
Location: Neukirchen-Vluyn, Germany
Posts: 7
Understand. It was just an idea because i noted that if there are two German pgs subtitle tracks it is usually the second. Hm, maybe by pgs file size? Am i the first who have this issue with this and how make PowerDVD such things to work? Nevertheless thanks for help.
tehax1 is offline   Reply With Quote
Old 9th May 2020, 21:45   #23887  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,642
It is likely that in practice the order is always similar, defined by the behavior of the ripping tool.

You could for example allow a "2" in the rule definition. Rule is first matched same way as it is now. So initially matching the first of those two subs. Then because of "2" hint, it will check if subsequent sub has exact same metadata, and if so, selects that one instead.

More than 2 identical cases are not common, so any other numbers don't need to be supported.

You might not be interested in supporting this atypical case. But I have seen it before in the wild a couple of times.
clsid is offline   Reply With Quote
Old 9th May 2020, 22:45   #23888  |  Link
tehax1
Registered User
 
Join Date: May 2020
Location: Neukirchen-Vluyn, Germany
Posts: 7
I think now that it is impossible to auto select the correct subtitle stream. Today i wached Midway UHD and it has three German pgs streams all with the same name. In that case stream no.3 was the right one.
Is there a way that e.g. MPC BE shows only German subtitles? Tried several things but always all tracks were shown.
tehax1 is offline   Reply With Quote
Old 10th May 2020, 10:51   #23889  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by clsid View Post
It is likely that in practice the order is always similar, defined by the behavior of the ripping tool.
How would the ripping tool know what LAV doesn't? Different DVDs/Blu-Rays are authored differently - that's just the way it is. If the user wants consistent playback behavior for all his rips he needs to manually adjust (re-order tracks, name and tag them) every rip he does.
sneaker_ger is offline   Reply With Quote
Old 10th May 2020, 10:53   #23890  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by tehax1 View Post
Am i the first who have this issue with this and how make PowerDVD such things to work?
PowerDVD works with the original DVD/Blu-Ray that still has the menus and their programming. Basically it's software written be the DVD authoring houses that takes care of the correct stream selection and filtering of non-forced lines. When you rip to mkv, mp4 or just stand-alone m2ts you lose that software. A different problem is that the concept of forced lines does not map into Matroska which has the concept of forced tracks.

Last edited by sneaker_ger; 10th May 2020 at 10:55.
sneaker_ger is offline   Reply With Quote
Old 10th May 2020, 11:24   #23891  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,342
Quote:
Originally Posted by sneaker_ger View Post
A different problem is that the concept of forced lines does not map into Matroska which has the concept of forced tracks.
That information is not lost. Which is what drives the automatic forced subtitle stream in LAV. You just need to know which stream to look in - which is the information that may be lost.

Although a much better experience is when you just split out the forced lines during ripping, which eg. MakeMKV will happily do for you. Just remember to also flag the stream as forced.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is online now   Reply With Quote
Old 10th May 2020, 12:03   #23892  |  Link
aufkrawall
Registered User
 
Join Date: Dec 2011
Posts: 1,812
May I ask if you wanted to make VP9 work with AMD's driver and their faulty D3D11VA/DXVA2 checking capabilities, would you do this in LAV Filters or ffmpeg upstream?
I don't have access to such an AMD GPU anymore, but I suppose this is still not fixed and thus they more or less expect developers to implement dirty workarounds for anything that isn't MF/browsers.
aufkrawall is offline   Reply With Quote
Old 10th May 2020, 13:32   #23893  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
just for the record this is still the case even on the newest driver.

edit: and decoding is still encode.
huhn is offline   Reply With Quote
Old 10th May 2020, 13:39   #23894  |  Link
tehax1
Registered User
 
Join Date: May 2020
Location: Neukirchen-Vluyn, Germany
Posts: 7
If i rip a movie i do it only complete and into iso format without any converting or something else and i do not want to do it. And even my Blu-Rays and UHD Blu-Rays have often two or three subtitle tracks with same name. As i understand there is no way to auto select the wished subtitle type and i have to do it always manual, ok.
Does anybody know how to fade out all subtitles beside German with LAV and MPC-BE?
tehax1 is offline   Reply With Quote
Old 11th May 2020, 20:02   #23895  |  Link
tiresias
Registered User
 
Join Date: Apr 2004
Posts: 22
I have a question about the difference in behaviour of the LAV Splitter when a MOV/MP4 file contains AVC or HEVC video.

When LAV Splitter opens a MOV/MP4 file that has AVC video, the output pin's media type has dwSequenceHeader set to the SPS and PPS (both prefixed by a 2-byte length value). This agrees with Microsoft's description in

https://docs.microsoft.com/en-us/win...64-video-types

So for HEVC I was expecting the dwSequenceHeader to contain the VPS, SPS and PPS structures. But instead LAV Splitter copies the entire HEVCDecoderConfigurationRecord to dwSequenceHeader.

Is there a specification that says that for HEVC the dwSequenceHeader should contain the whole HEVCDecoderConfigurationRecord ?

If not, what is the reason for this?

Would the LAV Decoder be happy if it was provided with an input media type that contained only the VPS, SPS and PPS structures instead of the whole HEVCDecoderConfigurationRecord ?
tiresias is offline   Reply With Quote
Old 13th May 2020, 10:13   #23896  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,342
The reason it is done like this is simply that its not documented to be done anyway else, and this is what is contained in relevant containers (MP4, MKV), so its a sensible choice to just pass it on - and it contains all relevant information.

There is only two things LAV accepts:
- MEDIASUBTYPE_HEVC, with the bitstream in MP4 format and with a proper hvcC configuration record
- MEDIASUBTYPE_H265, with the bitstream in AnnexB format and the extradata containing any number of AnnexB NALUs of relevance

This matches the way H264 is setup broadly (AVC1 vs H264), except without the custom formatted extradata not found anywhere else in that form. For H264 I would break down the MP4-style extradata in the splitter and then re-assemble it in the decoder. That just seems utterly unnecessary if you get to define your own format since MS forgot about DirectShow anyway.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is online now   Reply With Quote
Old 14th May 2020, 12:37   #23897  |  Link
tiresias
Registered User
 
Join Date: Apr 2004
Posts: 22
Thanks, that makes good sense.

The only other place I've seen HEVC dwSequenceHeader implemented is in the MPC-BE source code which just seems to copy the VPS/SPS/PPS arrays into dwSequenceHeader

https://github.com/jeeb/mpc-be/blob/...ideoParser.cpp

but it doesn't really matter either way.

Last edited by tiresias; 14th May 2020 at 12:44.
tiresias is offline   Reply With Quote
Old 29th May 2020, 17:29   #23898  |  Link
KoD
Registered User
 
Join Date: Mar 2006
Posts: 567
Hi nevcariel, I have a question. I remember it was said that there is some support for passing HDR metadata to the video renderer. Do you have any tips on where can the video renderer read it from? A hint on where to look for in the lav source files for how this data is packed would help too.
KoD is offline   Reply With Quote
Old 29th May 2020, 17:53   #23899  |  Link
amichaelt
Guest
 
Posts: n/a
Quote:
Originally Posted by KoD View Post
Hi nevcariel, I have a question. I remember it was said that there is some support for passing HDR metadata to the video renderer. Do you have any tips on where can the video renderer read it from? A hint on where to look for in the lav source files for how this data is packed would help too.
Maybe this helps as a start?

https://github.com/Nevcairiel/LAVFil...ediaSideData.h
  Reply With Quote
Old 29th May 2020, 22:21   #23900  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,342
This is correct, the IMediaSample the renderer receives implement IMediaSideData, which contains those structures. Note that if the renderer provides the allocator (it typically does for software frames), it also needs to implement this interface if it wants this data.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is online now   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 12:13.


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