projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[screenwavemedia] Improve formats sorting
[youtube-dl]
/
youtube_dl
/
postprocessor
/
ffmpeg.py
diff --git
a/youtube_dl/postprocessor/ffmpeg.py
b/youtube_dl/postprocessor/ffmpeg.py
index d3d9d4f1da13be926b05714f04f801ce0f664613..380bc6f292f2390fdf5dabd131a20184ba8334df 100644
(file)
--- a/
youtube_dl/postprocessor/ffmpeg.py
+++ b/
youtube_dl/postprocessor/ffmpeg.py
@@
-392,7
+392,7
@@
class FFmpegMetadataPP(FFmpegPostProcessor):
options.extend(['-metadata', '%s=%s' % (name, value)])
# https://github.com/rg3/youtube-dl/issues/8350
options.extend(['-metadata', '%s=%s' % (name, value)])
# https://github.com/rg3/youtube-dl/issues/8350
- if info
['protocol'] == 'm3u8_native'
:
+ if info
.get('protocol') == 'm3u8_native' or info.get('protocol') == 'm3u8' and self._downloader.params.get('hls_prefer_native', False)
:
options.extend(['-bsf:a', 'aac_adtstoasc'])
self._downloader.to_screen('[ffmpeg] Adding metadata to \'%s\'' % filename)
options.extend(['-bsf:a', 'aac_adtstoasc'])
self._downloader.to_screen('[ffmpeg] Adding metadata to \'%s\'' % filename)
@@
-508,8
+508,8
@@
class FFmpegSubtitlesConvertorPP(FFmpegPostProcessor):
with io.open(srt_file, 'wt', encoding='utf-8') as f:
f.write(srt_data)
with io.open(srt_file, 'wt', encoding='utf-8') as f:
f.write(srt_data)
+ old_file = srt_file
- ext = 'srt'
subs[lang] = {
'ext': 'srt',
'data': srt_data
subs[lang] = {
'ext': 'srt',
'data': srt_data
@@
-517,12
+517,14
@@
class FFmpegSubtitlesConvertorPP(FFmpegPostProcessor):
if new_ext == 'srt':
continue
if new_ext == 'srt':
continue
+ else:
+ sub_filenames.append(srt_file)
self.run_ffmpeg(old_file, new_file, ['-f', new_format])
with io.open(new_file, 'rt', encoding='utf-8') as f:
subs[lang] = {
self.run_ffmpeg(old_file, new_file, ['-f', new_format])
with io.open(new_file, 'rt', encoding='utf-8') as f:
subs[lang] = {
- 'ext': ext,
+ 'ext':
new_
ext,
'data': f.read(),
}
'data': f.read(),
}