projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1775612
)
[YoutubeDL] Check formats for merge to be opposite (#7786)
author
Sergey M․
<dstftw@gmail.com>
Mon, 7 Dec 2015 17:10:57 +0000
(23:10 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Mon, 7 Dec 2015 17:10:57 +0000
(23:10 +0600)
youtube_dl/YoutubeDL.py
patch
|
blob
|
history
diff --git
a/youtube_dl/YoutubeDL.py
b/youtube_dl/YoutubeDL.py
index 9a8c7da05172e342959d2ec5ffa481ab951fa763..c642a1fbfff6c910fb8ae3f9789209935d0559a2 100755
(executable)
--- a/
youtube_dl/YoutubeDL.py
+++ b/
youtube_dl/YoutubeDL.py
@@
-1110,6
+1110,12
@@
class YoutubeDL(object):
'contain the video, try using '
'"-f %s+%s"' % (format_2, format_1))
return
'contain the video, try using '
'"-f %s+%s"' % (format_2, format_1))
return
+ # Formats must be opposite (video+audio)
+ if formats_info[0].get('acodec') == 'none' and formats_info[1].get('acodec') == 'none':
+ self.report_error(
+ 'Both formats %s and %s are video-only, you must specify "-f video+audio"'
+ % (format_1, format_2))
+ return
output_ext = (
formats_info[0]['ext']
if self.params.get('merge_output_format') is None
output_ext = (
formats_info[0]['ext']
if self.params.get('merge_output_format') is None