Compare commits

...

3 Commits

Author SHA1 Message Date
blankie
dd88be3983
Merge 55cc0d5bf4 into 4b5eec0aaa 2024-11-25 20:57:57 +05:30
Jakob Kruse
4b5eec0aaa
[ie/chaturbate] Fix support for non-public streams (#11624)
Fix bug in 720b3dc453

Closes #11623
Authored by: jkruse
2024-11-24 22:20:30 +00:00
blank X
55cc0d5bf4
[ffmpeg] Set default subtitles regardless of container 2022-05-12 08:37:15 +07:00
2 changed files with 9 additions and 8 deletions

View File

@ -59,16 +59,15 @@ class ChaturbateIE(InfoExtractor):
'Accept': 'application/json', 'Accept': 'application/json',
}, fatal=False, impersonate=True) or {} }, fatal=False, impersonate=True) or {}
status = response.get('room_status')
if status != 'public':
if error := self._ERROR_MAP.get(status):
raise ExtractorError(error, expected=True)
self.report_warning('Falling back to webpage extraction')
return None
m3u8_url = response.get('url') m3u8_url = response.get('url')
if not m3u8_url: if not m3u8_url:
self.raise_geo_restricted() status = response.get('room_status')
if error := self._ERROR_MAP.get(status):
raise ExtractorError(error, expected=True)
if status == 'public':
self.raise_geo_restricted()
self.report_warning(f'Got status "{status}" from API; falling back to webpage extraction')
return None
return { return {
'id': video_id, 'id': video_id,

View File

@ -648,6 +648,8 @@ class FFmpegEmbedSubtitlePP(FFmpegPostProcessor):
# Don't copy the existing subtitles, we may be running the # Don't copy the existing subtitles, we may be running the
# postprocessor a second time # postprocessor a second time
'-map', '-0:s', '-map', '-0:s',
# Mark the first subtitle track as default
'-disposition:s:0', 'default',
] ]
for i, (lang, name) in enumerate(zip(sub_langs, sub_names)): for i, (lang, name) in enumerate(zip(sub_langs, sub_names)):
opts.extend(['-map', f'{i + 1}:0']) opts.extend(['-map', f'{i + 1}:0'])