- fmt = {
- 'format_id': format_id,
- 'preference': quality(format_id),
- }
- if video_url.startswith('rtmp'):
- m = re.search(r'^(?P<url>rtmp://[^/]+/(?P<app>[^/]+))/(?P<playpath>.+)$', video_url)
- if not m:
- continue
- fmt.update({
- 'ext': 'flv',
- 'url': m.group('url'),
- 'app': m.group('app'),
- 'play_path': m.group('playpath'),
- })
+ ext = determine_ext(video_url)
+ if ext == 'f4m':
+ formats.extend(self._extract_f4m_formats(
+ update_url_query(video_url, {
+ 'hdcore': '3.5.0',
+ 'plugin': 'aasp-3.5.0.151.81'
+ }), video_id, f4m_id='hds', fatal=False))
+ elif ext == 'm3u8':
+ formats.extend(self._extract_m3u8_formats(
+ video_url, video_id, 'mp4', 'm3u8_native',
+ m3u8_id='hls', fatal=False))