Skip to content

Commit

Permalink
Re-enable Opus audio by default, but only use it with Kodi v21+
Browse files Browse the repository at this point in the history
- Closes #537
- Underlying issue fixed by xbmc/xbmc#24748
  • Loading branch information
MoojMidge committed Apr 17, 2024
1 parent 11aa5a6 commit 9c9e448
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,8 @@ def use_inputstream_adaptive(self):
'ttml': loose_version('20.0.0'),
# audio codecs
'vorbis': loose_version('2.3.14'),
# unknown when Opus audio support was implemented
'opus': loose_version('19.0.0'),
# Opus audio enabled in Kodi v21+ which fixes stalls after seek
'opus': loose_version('21.0.0'),
'mp4a': True,
'ac-3': loose_version('2.1.15'),
'ec-3': loose_version('2.1.15'),
Expand Down
14 changes: 7 additions & 7 deletions resources/lib/youtube_plugin/youtube/helper/yt_setup_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,40 +373,40 @@ def process_performance_settings(_provider, context, step, steps):
},
'1080p30_avc': {
'max_resolution': 4, # 1080p
'stream_features': ('avc1', 'vorbis', 'mp4a', 'filter'),
'stream_features': ('avc1', 'vorbis', 'opus', 'mp4a', 'filter'),
'num_items': 10,
'settings': (
(settings.client_selection, (2,)),
),
},
'1080p30': {
'max_resolution': 4, # 1080p
'stream_features': ('avc1', 'vp9', 'vorbis', 'mp4a', 'ssa', 'ac-3', 'ec-3', 'dts', 'filter'),
'stream_features': ('avc1', 'vp9', 'vorbis', 'opus', 'mp4a', 'ssa', 'ac-3', 'ec-3', 'dts', 'filter'),
'num_items': 20,
},
'1080p60': {
'max_resolution': 4, # 1080p
'stream_features': ('avc1', 'vp9', 'hfr', 'vorbis', 'mp4a', 'ssa', 'ac-3', 'ec-3', 'dts', 'filter'),
'stream_features': ('avc1', 'vp9', 'hfr', 'vorbis', 'opus', 'mp4a', 'ssa', 'ac-3', 'ec-3', 'dts', 'filter'),
'num_items': 30,
},
'4k30': {
'max_resolution': 6, # 4k
'stream_features': ('avc1', 'vp9', 'hdr', 'hfr', 'no_hfr_max', 'vorbis', 'mp4a', 'ssa', 'ac-3', 'ec-3', 'dts', 'filter'),
'stream_features': ('avc1', 'vp9', 'hdr', 'hfr', 'no_hfr_max', 'vorbis', 'opus', 'mp4a', 'ssa', 'ac-3', 'ec-3', 'dts', 'filter'),
'num_items': 50,
},
'4k60': {
'max_resolution': 6, # 4k
'stream_features': ('avc1', 'vp9', 'hdr', 'hfr', 'vorbis', 'mp4a', 'ssa', 'ac-3', 'ec-3', 'dts', 'filter'),
'stream_features': ('avc1', 'vp9', 'hdr', 'hfr', 'vorbis', 'opus', 'mp4a', 'ssa', 'ac-3', 'ec-3', 'dts', 'filter'),
'num_items': 50,
},
'4k60_av1': {
'max_resolution': 6, # 4k
'stream_features': ('avc1', 'vp9', 'av01', 'hdr', 'hfr', 'vorbis', 'mp4a', 'ssa', 'ac-3', 'ec-3', 'dts', 'filter'),
'stream_features': ('avc1', 'vp9', 'av01', 'hdr', 'hfr', 'vorbis', 'opus', 'mp4a', 'ssa', 'ac-3', 'ec-3', 'dts', 'filter'),
'num_items': 50,
},
'max': {
'max_resolution': 7, # 8k
'stream_features': ('avc1', 'vp9', 'av01', 'hdr', 'hfr', 'vorbis', 'mp4a', 'ssa', 'ac-3', 'ec-3', 'dts', 'filter'),
'stream_features': ('avc1', 'vp9', 'av01', 'hdr', 'hfr', 'vorbis', 'opus', 'mp4a', 'ssa', 'ac-3', 'ec-3', 'dts', 'filter'),
'num_items': 50,
},
}
Expand Down
3 changes: 1 addition & 2 deletions resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,11 @@
<level>0</level>
<!--
All selections enabled except:
- Opus audio
- no HFR at max quality
- no fractional framerate hinting
- no framerate hinting
-->
<default>avc1,vp9,av01,hdr,hfr,vorbis,mp4a,ssa,ac-3,ec-3,dts,filter</default>
<default>avc1,vp9,av01,hdr,hfr,vorbis,opus,mp4a,ssa,ac-3,ec-3,dts,filter</default>
<constraints>
<options>
<option label="30727">avc1</option>
Expand Down

0 comments on commit 9c9e448

Please sign in to comment.