mirror of
https://github.com/soimort/you-get.git
synced 2025-01-24 05:55:02 +03:00
[extractor] download best-quality DASH stream if FFmpeg is installed
This commit is contained in:
parent
cff5fb4529
commit
12de1b482f
@ -194,6 +194,12 @@ class VideoExtractor():
|
|||||||
stream_id = kwargs['stream_id']
|
stream_id = kwargs['stream_id']
|
||||||
else:
|
else:
|
||||||
# Download stream with the best quality
|
# Download stream with the best quality
|
||||||
|
from .processor.ffmpeg import has_ffmpeg_installed
|
||||||
|
if has_ffmpeg_installed():
|
||||||
|
itags = sorted(self.dash_streams,
|
||||||
|
key=lambda i: -self.dash_streams[i]['size'])
|
||||||
|
stream_id = itags[0]
|
||||||
|
else:
|
||||||
stream_id = self.streams_sorted[0]['id'] if 'id' in self.streams_sorted[0] else self.streams_sorted[0]['itag']
|
stream_id = self.streams_sorted[0]['id'] if 'id' in self.streams_sorted[0] else self.streams_sorted[0]['itag']
|
||||||
|
|
||||||
if 'index' not in kwargs:
|
if 'index' not in kwargs:
|
||||||
|
Loading…
Reference in New Issue
Block a user