mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-10-01 22:08:36 +09:00
fix ffmpeg error, if youtube-dl runs more than once with --embed-thumbnail with same video
This commit is contained in:

committed by
Jaime Marquínez Ferrándiz

parent
0c14e2fbe3
commit
149254d0d5
@@ -1,7 +1,7 @@
|
||||
|
||||
from .atomicparsley import AtomicParsleyPP
|
||||
from .ffmpeg import (
|
||||
FFmpegMediaFixPP,
|
||||
FFmpegAudioFixPP,
|
||||
FFmpegMergerPP,
|
||||
FFmpegMetadataPP,
|
||||
FFmpegVideoConvertor,
|
||||
@@ -12,7 +12,7 @@ from .xattrpp import XAttrMetadataPP
|
||||
|
||||
__all__ = [
|
||||
'AtomicParsleyPP',
|
||||
'FFmpegMediaFixPP',
|
||||
'FFmpegAudioFixPP',
|
||||
'FFmpegMergerPP',
|
||||
'FFmpegMetadataPP',
|
||||
'FFmpegVideoConvertor',
|
||||
|
@@ -484,13 +484,13 @@ class FFmpegMergerPP(FFmpegPostProcessor):
|
||||
return True, info
|
||||
|
||||
|
||||
class FFmpegMediaFixPP(FFmpegPostProcessor):
|
||||
class FFmpegAudioFixPP(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)
|
||||
options = ['-vn', '-acodec', 'copy']
|
||||
self._downloader.to_screen(u'[ffmpeg] Fixing audio file "%s"' % filename)
|
||||
self.run_ffmpeg(filename, temp_filename, options)
|
||||
|
||||
os.remove(encodeFilename(filename))
|
||||
|
Reference in New Issue
Block a user