[PropertiesUtils] Add streams_config property #1250
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR add a new property:
inputstream.adaptive.streams_config
the name a bit generic to allow in future possibile new extensions of these configurations relative to streams without add new properties (if you want suggest a better naming say so)
the values are handled in similar way of a pair values (or something similar of python dict) as follow:
key=value;
more values are so concatenated:
key=value;key2=value2;key3=value3;
inputstream.adaptive.streams_config
Supported configuration keys:
audio_langcode_default
: Set the "default" flag to the audio streams with specified language code (need to match the manifest)audio_langcode_original
: Set the "original" flag to the audio streams with specified language code (need to match the manifest)audio_prefer_stereo
: Can be set totrue
when you want prefeer stereo track as default instead of multichannels (it depends from audio_langcode_default and/or audio_langcode_original)audio_prefer_type
: Can be set tooriginal
to prefer set default streams with original language, orimpaired
to prefer set default streams for impaired, otherwise left empty value for default behaviour.subtitles_langcode_default
: Set the "default" flag to the subtitle streams with specified language code (need to match the manifest)Example:
audio_langcode_default=pt_br;audio_prefer_stereo=true
Motivation and context
Completed fix for #422 for DASH and in more general way,
after the recent parser rework i have improved the behaviour of
AdaptationSet
tag ISA custom attributes:default
,impaired
,forced
,original
where now can be add and used to full override default manifest stream attributes,
the reason is that Kodi stream flags have not always have the same meaning of manifests attributes
and/or there are video services that dont follow exactly the specs and lead to wrong flags set to the audio/subtitle tracks
ofc add these custom ISA attributes needs to implement a proxy on a video add-on not so easy to do for novice devs but also expensive for low end devices, therefore this PR add two new properties that allow to set (and so override) the default stream language and original stream language in easy way
HLS manifest note
This manifest type not always have appropriate language codes and also not always provide right number of audio channels in th metadata, therefore above configurations may fails, strictly depends on the service provider
WIP - i will evaluate this part in the coming days:
i will need to make some more tests
use json for property values
How has this been tested?
Tested with a sample dash
Screenshots (if appropriate):
Types of change
Checklist: