fix ffmpeg error, if youtube-dl runs more than once with --embed-thumbnail with same...
authorpulpe <Pulpan3@gmail.com>
Sat, 22 Feb 2014 17:10:07 +0000 (18:10 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Wed, 26 Mar 2014 14:22:52 +0000 (15:22 +0100)
youtube_dl/__init__.py
youtube_dl/postprocessor/__init__.py
youtube_dl/postprocessor/ffmpeg.py

index 490f76dc9fddbfbeac9ffc9d0b1985ee367eb2f8..8b95a6d9bb4eb2f6756703a75b6f50a001d8377b 100644 (file)
@@ -91,7 +91,7 @@ from .version import __version__
 from .YoutubeDL import YoutubeDL
 from .postprocessor import (
     AtomicParsleyPP,
-    FFmpegMediaFixPP,
+    FFmpegAudioFixPP,
     FFmpegMetadataPP,
     FFmpegVideoConvertor,
     FFmpegExtractAudioPP,
@@ -808,7 +808,7 @@ def _real_main(argv=None):
         if opts.xattrs:
             ydl.add_post_processor(XAttrMetadataPP())
         if opts.embedthumbnail:
-            ydl.add_post_processor(FFmpegMediaFixPP())
+            ydl.add_post_processor(FFmpegAudioFixPP())
             ydl.add_post_processor(AtomicParsleyPP())
 
         # Update version
index 9410dcf5b6091fa4f574337a88a115de1ef1b633..08e6ddd00cbfe5691fb14943d6b2217748e96398 100644 (file)
@@ -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',
index 26a70491a084b5dd28c250eb705f47ea6bf55905..75ee87e1a2d853cf00ae00d3ea4dd55ef1145162 100644 (file)
@@ -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))