add post processor
This commit is contained in:
parent
98acdc895b
commit
0c14e2fbe3
4 changed files with 84 additions and 0 deletions
|
@ -483,3 +483,17 @@ class FFmpegMergerPP(FFmpegPostProcessor):
|
|||
self.run_ffmpeg_multiple_files(info['__files_to_merge'], filename, args)
|
||||
return True, info
|
||||
|
||||
|
||||
class FFmpegMediaFixPP(FFmpegPostProcessor):
|
||||
def run(self, info):
|
||||
filename = info['filepath']
|
||||
temp_filename = prepend_extension(filename, 'temp')
|
||||
|
||||
options = ['-vcodec', 'copy', '-acodec', 'copy']
|
||||
self._downloader.to_screen(u'[ffmpeg] Fixing media file "%s"' % filename)
|
||||
self.run_ffmpeg(filename, temp_filename, options)
|
||||
|
||||
os.remove(encodeFilename(filename))
|
||||
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
|
||||
|
||||
return True, info
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue