aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/PostProcessor.py
diff options
context:
space:
mode:
authorIsmael Mejia <iemejia@gmail.com>2013-08-22 23:29:36 +0200
committerIsmael Mejia <iemejia@gmail.com>2013-08-22 23:29:36 +0200
commit18b4e04f1c663e0ea695f6501b860f85af9d7ca1 (patch)
treed60ebbf51b8c50f808c6c251fc6c02547052a9dc /youtube_dl/PostProcessor.py
parentd80a064eff4fe2416f9db36b07f1e2ca641f1334 (diff)
parent1865ed31b955795f9859df5c1c400d172ae9a28a (diff)
downloadyoutube-dl-18b4e04f1c663e0ea695f6501b860f85af9d7ca1.tar.xz
Merge branch 'master' into subtitles_rework
Diffstat (limited to 'youtube_dl/PostProcessor.py')
-rw-r--r--youtube_dl/PostProcessor.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/PostProcessor.py b/youtube_dl/PostProcessor.py
index 8c5e53991..fddf58606 100644
--- a/youtube_dl/PostProcessor.py
+++ b/youtube_dl/PostProcessor.py
@@ -100,7 +100,8 @@ class FFmpegExtractAudioPP(FFmpegPostProcessor):
self._nopostoverwrites = nopostoverwrites
def get_audio_codec(self, path):
- if not self._exes['ffprobe'] and not self._exes['avprobe']: return None
+ if not self._exes['ffprobe'] and not self._exes['avprobe']:
+ raise PostProcessingError(u'ffprobe or avprobe not found. Please install one.')
try:
cmd = [self._exes['avprobe'] or self._exes['ffprobe'], '-show_streams', encodeFilename(self._ffmpeg_filename_argument(path))]
handle = subprocess.Popen(cmd, stderr=compat_subprocess_get_DEVNULL(), stdout=subprocess.PIPE)
@@ -208,7 +209,7 @@ class FFmpegExtractAudioPP(FFmpegPostProcessor):
try:
os.utime(encodeFilename(new_path), (time.time(), information['filetime']))
except:
- self._downloader.to_stderr(u'WARNING: Cannot update utime of audio file')
+ self._downloader.report_warning(u'Cannot update utime of audio file')
information['filepath'] = new_path
return self._nopostoverwrites,information