|
|
@ -10,6 +10,7 @@ from .utils import (
|
|
|
|
PostProcessingError,
|
|
|
|
PostProcessingError,
|
|
|
|
shell_quote,
|
|
|
|
shell_quote,
|
|
|
|
subtitles_filename,
|
|
|
|
subtitles_filename,
|
|
|
|
|
|
|
|
prepend_extension,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -496,13 +497,11 @@ class FFmpegMetadataPP(FFmpegPostProcessor):
|
|
|
|
return True, info
|
|
|
|
return True, info
|
|
|
|
|
|
|
|
|
|
|
|
filename = info['filepath']
|
|
|
|
filename = info['filepath']
|
|
|
|
ext = os.path.splitext(filename)[1][1:]
|
|
|
|
temp_filename = prepend_extension(filename, 'temp')
|
|
|
|
temp_filename = filename + u'.temp'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
options = ['-c', 'copy']
|
|
|
|
options = ['-c', 'copy']
|
|
|
|
for (name, value) in metadata.items():
|
|
|
|
for (name, value) in metadata.items():
|
|
|
|
options.extend(['-metadata', '%s=%s' % (name, value)])
|
|
|
|
options.extend(['-metadata', '%s=%s' % (name, value)])
|
|
|
|
options.extend(['-f', ext])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self._downloader.to_screen(u'[ffmpeg] Adding metadata to \'%s\'' % filename)
|
|
|
|
self._downloader.to_screen(u'[ffmpeg] Adding metadata to \'%s\'' % filename)
|
|
|
|
self.run_ffmpeg(filename, temp_filename, options)
|
|
|
|
self.run_ffmpeg(filename, temp_filename, options)
|
|
|
|