mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-06 22:46:07 +02:00
[common] lower proto_preference of rtsp formats
Most of the time the RtspFD fail to download videos but it report success of the download with this output: [mpv] 0 bytes [download] 100% of 0.00B
This commit is contained in:
parent
6bb0fbf9fb
commit
8b40854529
@ -916,7 +916,8 @@ def _formats_key(f):
|
|||||||
if f.get('ext') in ['f4f', 'f4m']: # Not yet supported
|
if f.get('ext') in ['f4f', 'f4m']: # Not yet supported
|
||||||
preference -= 0.5
|
preference -= 0.5
|
||||||
|
|
||||||
proto_preference = 0 if determine_protocol(f) in ['http', 'https'] else -0.1
|
protocol = f.get('protocol') or determine_protocol(f)
|
||||||
|
proto_preference = 0 if protocol in ['http', 'https'] else (-0.5 if protocol == 'rtsp' else -0.1)
|
||||||
|
|
||||||
if f.get('vcodec') == 'none': # audio only
|
if f.get('vcodec') == 'none': # audio only
|
||||||
preference -= 50
|
preference -= 50
|
||||||
|
Loading…
Reference in New Issue
Block a user