@ -520,8 +520,7 @@ class FFmpegEmbedSubtitlePP(FFmpegPostProcessor):
temp_filename = prepend_extension ( filename , ' temp ' )
self . to_screen ( ' Embedding subtitles in " %s " ' % filename )
self . run_ffmpeg_multiple_files ( input_files , temp_filename , opts )
os . remove ( encodeFilename ( filename ) )
os . rename ( encodeFilename ( temp_filename ) , encodeFilename ( filename ) )
os . replace ( temp_filename , filename )
files_to_delete = [ ] if self . _already_have_subtitle else sub_filenames
return files_to_delete , information
@ -628,8 +627,7 @@ class FFmpegMetadataPP(FFmpegPostProcessor):
itertools . chain ( self . _options ( info [ ' ext ' ] ) , * options ) )
if chapters :
os . remove ( metadata_filename )
os . remove ( encodeFilename ( filename ) )
os . rename ( encodeFilename ( temp_filename ) , encodeFilename ( filename ) )
os . replace ( temp_filename , filename )
return [ ] , info
@ -673,8 +671,7 @@ class FFmpegFixupPostProcessor(FFmpegPostProcessor):
self . to_screen ( f ' { msg } of " { filename } " ' )
self . run_ffmpeg ( filename , temp_filename , options )
os . remove ( encodeFilename ( filename ) )
os . rename ( encodeFilename ( temp_filename ) , encodeFilename ( filename ) )
os . replace ( temp_filename , filename )
class FFmpegFixupStretchedPP ( FFmpegFixupPostProcessor ) :
@ -866,9 +863,7 @@ class FFmpegThumbnailsConvertorPP(FFmpegPostProcessor):
if thumbnail_ext != ' webp ' and self . is_webp ( thumbnail_filename ) :
self . to_screen ( ' Correcting thumbnail " %s " extension to webp ' % thumbnail_filename )
webp_filename = replace_extension ( thumbnail_filename , ' webp ' )
if os . path . exists ( webp_filename ) :
os . remove ( webp_filename )
os . rename ( encodeFilename ( thumbnail_filename ) , encodeFilename ( webp_filename ) )
os . replace ( thumbnail_filename , webp_filename )
info [ ' thumbnails ' ] [ idx ] [ ' filepath ' ] = webp_filename
info [ ' __files_to_move ' ] [ webp_filename ] = replace_extension (
info [ ' __files_to_move ' ] . pop ( thumbnail_filename ) , ' webp ' )