youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 4eb7f1d12e512fa69f90d98b2e6e97fa0c04e7a5
parent b4cdc245cf0af0672207a5090cb6eb6c29606cdb
Author: Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Date:   Sat, 12 Oct 2013 13:49:27 +0200

FFmpegPostProcessor: print the command line used if the --verbose option is given

Diffstat:
Myoutube_dl/PostProcessor.py | 2++
Myoutube_dl/utils.py | 5+++++
2 files changed, 7 insertions(+), 0 deletions(-)

diff --git 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.py @@ -9,6 +9,7 @@ import io import json import locale import os +import pipes import platform import re import 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))