PROTO_ORDER = ['http', 'rtmp', 'rtsp']
try:
proto_pref = -PROTO_ORDER.index(format_m.group('proto'))
PROTO_ORDER = ['http', 'rtmp', 'rtsp']
try:
proto_pref = -PROTO_ORDER.index(format_m.group('proto'))
abr = int(fnode.find('./audioBitrate').text) // 1000
vbr = int(fnode.find('./videoBitrate').text) // 1000
abr = int(fnode.find('./audioBitrate').text) // 1000
vbr = int(fnode.find('./videoBitrate').text) // 1000
- pref = (is_available, proto_pref, quality_pref, vbr, abr)
+ pref = (is_available, is_supported,
+ proto_pref, quality_pref, vbr, abr)
+
+ format_note = u''
+ if not is_supported:
+ format_note += u'(unsupported)'
+ if not format_note:
+ format_note = None
'acodec': format_m.group('acodec'),
'vcodec': format_m.group('vcodec'),
'abr': abr,
'vbr': vbr,
'width': int(fnode.find('./width').text),
'height': int(fnode.find('./height').text),
'acodec': format_m.group('acodec'),
'vcodec': format_m.group('vcodec'),
'abr': abr,
'vbr': vbr,
'width': int(fnode.find('./width').text),
'height': int(fnode.find('./height').text),
- formats = sorted(map(xml_to_format, format_nodes),
+ formats = sorted(filter(lambda f: f['_available'],
+ map(xml_to_format, format_nodes)),