aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/PostProcessor.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-01-04 13:13:51 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-01-04 13:13:51 +0100
commit6350728be2cb9567c5845fa3d189b94d41d41be4 (patch)
tree0288cc3506766aa64b458e512a094febf245fbf7 /youtube_dl/PostProcessor.py
parenta7c26e7338ceed06b579775f315b078644a7482b (diff)
Allow merging formats (closes #1612)
Multiple formats can be requested using `-f 137+139`, each one is downloaded and then the two are merged with ffmpeg.
Diffstat (limited to 'youtube_dl/PostProcessor.py')
-rw-r--r--youtube_dl/PostProcessor.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/youtube_dl/PostProcessor.py b/youtube_dl/PostProcessor.py
index 097e1a9e4..14471a9ed 100644
--- a/youtube_dl/PostProcessor.py
+++ b/youtube_dl/PostProcessor.py
@@ -508,3 +508,11 @@ class FFmpegMetadataPP(FFmpegPostProcessor):
os.remove(encodeFilename(filename))
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
return True, info
+
+
+class FFmpegMergerPP(FFmpegPostProcessor):
+ def run(self, info):
+ filename = info['filepath']
+ args = ['-c', 'copy']
+ self.run_ffmpeg_multiple_files(info['__files_to_merge'], filename, args)
+ return True, info