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.
This commit is contained in:
Jaime Marquínez Ferrándiz 2014-01-04 13:13:51 +01:00
parent a7c26e7338
commit 6350728be2
2 changed files with 47 additions and 6 deletions

View file

@ -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