aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/postprocessor
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2015-04-18 11:44:42 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2015-04-18 11:44:42 +0200
commit14523ed9695975704fae441a3518daf8b0e382fe (patch)
tree6c10f28bc45ef6be5b208a604f8bd4f6926a949a /youtube_dl/postprocessor
parent592e97e8550389e22b716eb33c30584aa3a8d656 (diff)
downloadyoutube-dl-14523ed9695975704fae441a3518daf8b0e382fe.tar.xz
FFmpegEmbedSubtitlePP: remove the subtitle files if '--keep-video' is not given (closes #5435)
Diffstat (limited to 'youtube_dl/postprocessor')
-rw-r--r--youtube_dl/postprocessor/ffmpeg.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py
index 4cdbfce63..852dc3e44 100644
--- a/youtube_dl/postprocessor/ffmpeg.py
+++ b/youtube_dl/postprocessor/ffmpeg.py
@@ -513,7 +513,8 @@ class FFmpegEmbedSubtitlePP(FFmpegPostProcessor):
sub_langs = list(subtitles.keys())
filename = information['filepath']
- input_files = [filename] + [subtitles_filename(filename, lang, sub_info['ext']) for lang, sub_info in subtitles.items()]
+ sub_filenames = [subtitles_filename(filename, lang, sub_info['ext']) for lang, sub_info in subtitles.items()]
+ input_files = [filename] + sub_filenames
opts = [
'-map', '0',
@@ -535,7 +536,7 @@ class FFmpegEmbedSubtitlePP(FFmpegPostProcessor):
os.remove(encodeFilename(filename))
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
- return [], information
+ return sub_filenames, information
class FFmpegMetadataPP(FFmpegPostProcessor):