youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 08d13955dd56027d8ca61b70c6cbab6925367fb4
parent a17c95f5e43284dda42ee0dd4002c618de2ea044
Author: Philipp Hagemeister <phihag@phihag.de>
Date:   Wed,  1 Jan 2014 20:23:47 +0100

[wistia] Prefer original video format above all others

We could also set up a formula which would weigh filesize/bitrate and vcodec/acodec (say, 1GB h264 < 3 GB MPEG2 < 2 GB h264), but that would get really messy real soon.

Diffstat:
Myoutube_dl/extractor/common.py | 3++-
Myoutube_dl/extractor/wistia.py | 1+
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py @@ -69,7 +69,8 @@ class InfoExtractor(object): download, lower-case. "http", "https", "rtsp", "rtmp" or so. * preference Order number of this format. If this field is - present, the formats get sorted by this field. + present and not None, the formats get sorted + by this field. -1 for default (order by other properties), -2 or smaller for less than default. url: Final video URL. diff --git a/youtube_dl/extractor/wistia.py b/youtube_dl/extractor/wistia.py @@ -44,6 +44,7 @@ class WistiaIE(InfoExtractor): 'height': a['height'], 'filesize': a['size'], 'ext': a['ext'], + 'preference': 1 if atype == 'original' else None, }) self._sort_formats(formats)