|
@ -2620,7 +2620,7 @@ class FFmpegExtractAudioPP(PostProcessor): |
|
|
@staticmethod |
|
|
@staticmethod |
|
|
def get_audio_codec(path): |
|
|
def get_audio_codec(path): |
|
|
try: |
|
|
try: |
|
|
handle = subprocess.Popen(['ffprobe', '-show_streams', path], |
|
|
|
|
|
|
|
|
handle = subprocess.Popen(['ffprobe', '-show_streams', '--', path], |
|
|
stderr=file(os.path.devnull, 'w'), stdout=subprocess.PIPE) |
|
|
stderr=file(os.path.devnull, 'w'), stdout=subprocess.PIPE) |
|
|
output = handle.communicate()[0] |
|
|
output = handle.communicate()[0] |
|
|
if handle.wait() != 0: |
|
|
if handle.wait() != 0: |
|
@ -2638,7 +2638,7 @@ class FFmpegExtractAudioPP(PostProcessor): |
|
|
@staticmethod |
|
|
@staticmethod |
|
|
def run_ffmpeg(path, out_path, codec, more_opts): |
|
|
def run_ffmpeg(path, out_path, codec, more_opts): |
|
|
try: |
|
|
try: |
|
|
ret = subprocess.call(['ffmpeg', '-y', '-i', path, '-vn', '-acodec', codec] + more_opts + [out_path], |
|
|
|
|
|
|
|
|
ret = subprocess.call(['ffmpeg', '-y', '-i', path, '-vn', '-acodec', codec] + more_opts + ['--', out_path], |
|
|
stdout=file(os.path.devnull, 'w'), stderr=subprocess.STDOUT) |
|
|
stdout=file(os.path.devnull, 'w'), stderr=subprocess.STDOUT) |
|
|
return (ret == 0) |
|
|
return (ret == 0) |
|
|
except (IOError, OSError): |
|
|
except (IOError, OSError): |
|
|