projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e3f7e05
)
Split a couple of lines to make the code more readable
author
Ricardo Garcia
<sarbalap+freshmeat@gmail.com>
Tue, 15 Mar 2011 19:04:20 +0000
(20:04 +0100)
committer
Ricardo Garcia
<sarbalap+freshmeat@gmail.com>
Tue, 15 Mar 2011 19:04:20 +0000
(20:04 +0100)
youtube-dl
patch
|
blob
|
history
diff --git
a/youtube-dl
b/youtube-dl
index cbfbdca9cd29b28b6ba1915e5b7d60369362592d..b2cd5e87f464393d7d294c36282de9ac5826ae5e 100755
(executable)
--- a/
youtube-dl
+++ b/
youtube-dl
@@
-2620,8
+2620,8
@@
class FFmpegExtractAudioPP(PostProcessor):
@staticmethod
def get_audio_codec(path):
try:
@staticmethod
def get_audio_codec(path):
try:
- handle = subprocess.Popen(['ffprobe', '-show_streams', '--', path],
-
stderr=file(os.path.devnull, 'w'), stdout=subprocess.PIPE)
+ cmd = ['ffprobe', '-show_streams', '--', path]
+
handle = subprocess.Popen(cmd,
stderr=file(os.path.devnull, 'w'), stdout=subprocess.PIPE)
output = handle.communicate()[0]
if handle.wait() != 0:
return None
output = handle.communicate()[0]
if handle.wait() != 0:
return None
@@
-2638,8
+2638,8
@@
class FFmpegExtractAudioPP(PostProcessor):
@staticmethod
def run_ffmpeg(path, out_path, codec, more_opts):
try:
@staticmethod
def run_ffmpeg(path, out_path, codec, more_opts):
try:
- ret = subprocess.call(['ffmpeg', '-y', '-i', path, '-vn', '-acodec', codec] + more_opts + ['--', out_path],
-
stdout=file(os.path.devnull, 'w'), stderr=subprocess.STDOUT)
+ cmd = ['ffmpeg', '-y', '-i', path, '-vn', '-acodec', codec] + more_opts + ['--', out_path]
+
ret = subprocess.call(cmd,
stdout=file(os.path.devnull, 'w'), stderr=subprocess.STDOUT)
return (ret == 0)
except (IOError, OSError):
return False
return (ret == 0)
except (IOError, OSError):
return False