A feature-rich command-line audio/video downloader
FFmpegPostProcessor: print the command line used if the --verbose option is given
Jaime Marquínez Ferrándiz4eb7f1d12e51
diff --git a/youtube_dl/PostProcessor.py b/youtube_dl/PostProcessor.pyindex fbf8a7f98f..0479591f00 100644--- a/youtube_dl/PostProcessor.py+++ b/youtube_dl/PostProcessor.py@@ -83,6 +83,8 @@ class FFmpegPostProcessor(PostProcessor):+ opts +[encodeFilename(self._ffmpeg_filename_argument(out_path))])+ if self._downloader.params.get('verbose', False):+ self._downloader.to_screen(u'[debug] ffmpeg command line: %s' % shell_quote(cmd))p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)stdout,stderr = p.communicate()if p.returncode != 0:diff --git a/youtube_dl/utils.py b/youtube_dl/utils.pyindex 82a1daeb90..0457f3dedb 100644--- a/youtube_dl/utils.py+++ b/youtube_dl/utils.py@@ -9,6 +9,7 @@ import ioimport jsonimport localeimport os+import pipesimport platformimport reimport socket@@ -927,3 +928,7 @@ class locked_file(object):def read(self, *args):return self.f.read(*args)+++def shell_quote(args):+ return ' '.join(map(pipes.quote, args))