mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-01-09 13:00:10 +09:00
Merge 2c40837609
into c5098961b0
This commit is contained in:
commit
c7eb61dc88
@ -607,6 +607,7 @@ class FFmpegSubtitlesConvertorPP(FFmpegPostProcessor):
|
||||
return [], info
|
||||
self._downloader.to_screen('[ffmpeg] Converting subtitles')
|
||||
sub_filenames = []
|
||||
temp_srt_filenames = []
|
||||
for lang, sub in subs.items():
|
||||
ext = sub['ext']
|
||||
if ext == new_ext:
|
||||
@ -640,7 +641,7 @@ class FFmpegSubtitlesConvertorPP(FFmpegPostProcessor):
|
||||
if new_ext == 'srt':
|
||||
continue
|
||||
else:
|
||||
sub_filenames.append(srt_file)
|
||||
temp_srt_filenames.append(srt_file)
|
||||
|
||||
self.run_ffmpeg(old_file, new_file, ['-f', new_format])
|
||||
|
||||
@ -650,4 +651,7 @@ class FFmpegSubtitlesConvertorPP(FFmpegPostProcessor):
|
||||
'data': f.read(),
|
||||
}
|
||||
|
||||
for f in temp_srt_filenames:
|
||||
os.remove(encodeFilename(f))
|
||||
|
||||
return sub_filenames, info
|
||||
|
Loading…
Reference in New Issue
Block a user