placid <[EMAIL PROTECTED]> wrote:
> >>> import subprocess
> >>> p = subprocess.Popen(["ffmpeg.exe -i video.mpg", "-f mjpeg  -ss 5 
> >>> -vframes 1 -s 160x120 -an video.gif"], shell=True, stdout=subprocess.PIPE)
> 
>  but the ffmpeg complains about the input file being corrupter, whereas
>  when i run the same command via the command shell (cmd.exe) it works.
>  Does anyone know what the problem is?

Here is an idea to try: I would say you've mixed up the two styles of
passing arguments, either pass

  args = "ffmpeg.exe -i video.mpg -f mjpeg  -ss 5 -vframes 1 -s 160x120 -an 
video.gif"
  p = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE)

or

  args = ['ffmpeg.exe', '-i', 'video.mpg', '-f', 'mjpeg', '', '-ss', '5', 
'-vframes', '1', '-s', '160x120', '-an', 'video.gif']
  p = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE)

If you mix the two styles then you are probably heading for trouble
with argument quoting.

-- 
Nick Craig-Wood <[EMAIL PROTECTED]> -- http://www.craig-wood.com/nick
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to