diff --git a/src/echonest/remix/video.py b/src/echonest/remix/video.py index 8349f28..32c58c2 100644 --- a/src/echonest/remix/video.py +++ b/src/echonest/remix/video.py @@ -301,7 +301,7 @@ def sequencefrommov(mov, settings=None, direc=None, pre="frame-", verbose=True): format = "jpeg" if settings is not None: format = settings.imageformat() - cmd = "en-ffmpeg -i " + mov + " -an -sameq " + os.path.join(direc, pre + "%06d." + format) + cmd = "en-ffmpeg -i \"" + mov + "\" -an -sameq " + os.path.join(direc, pre + "%06d." + format) if verbose: log.info(cmd) out = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) @@ -318,8 +318,8 @@ def sequencetomovie(outfile, seq, audio=None, verbose=True): seq.render(direc, "image-", False) cmd = "en-ffmpeg -y " + str(seq.settings) + " -i " + os.path.join(direc, "image-%06d." + seq.settings.imageformat()) if audio: - cmd += " -i " + audio - cmd += " -sameq " + outfile + cmd += " -i \"" + audio + "\"" + cmd += " -sameq \"" + outfile + "\"" if verbose: log.info(cmd) out = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) @@ -340,7 +340,7 @@ def convertmov(infile, outfile=None, settings=None, verbose=True): raise TypeError("settings arg must be a VideoSettings object") if outfile is None: foo, outfile = tempfile.mkstemp(".flv") - cmd = "en-ffmpeg -y -i " + infile + " " + str(settings) + " -sameq " + outfile + cmd = "en-ffmpeg -y -i \"" + infile + "\" " + str(settings) + " -sameq \"" + outfile + "\"" if verbose: log.info(cmd) out = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)