Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Karim Newsgroups: comp.lang.python Subject: Re: movie from pictures Date: Sat, 11 Jun 2016 19:26:46 +0200 Lines: 39 Message-ID: References: <7e57c662-a6c2-441d-a46e-49458439250f@googlegroups.com> <16301530-a24b-42c6-bcf6-007c4eb85aca@googlegroups.com> <575C49D6.5020204@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de AKk7E3fTwcR5Va1S75R7nQbJmEnRu1R47deV2SfXREow== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.037 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'preferable': 0.09; 'python': 0.10; '2016': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subprocess': 0.16; 'wrote:': 0.16; 'string': 0.17; 'alex': 0.18; 'variable': 0.18; '>>>': 0.20; 'skip:" 30': 0.20; 'arguments': 0.22; 'pass': 0.22; 'tried': 0.24; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'command': 0.26; 'separate': 0.27; 'cases.': 0.29; 'command-line': 0.29; 'wright': 0.29; 'code:': 0.29; 'url:mailman': 0.30; 'work.': 0.30; 'useful': 0.33; 'url:python': 0.33; 'lets': 0.33; 'message-id:@gmail.com': 0.34; 'skip:- 10': 0.34; 'url:listinfo': 0.34; 'file': 0.34; 'list': 0.34; 'received:google.com': 0.35; 'skip:c 30': 0.35; 'list:': 0.35; 'path': 0.35; 'something': 0.35; 'received:74.125.82': 0.35; 'reply.': 0.35; 'but': 0.36; 'should': 0.36; 'url:org': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'method': 0.37; 'names': 0.38; 'thank': 0.38; 'why': 0.39; 'subject:from': 0.39; 'received:192': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'your': 0.60; 'charset:windows-1252': 0.62; 'more': 0.63; 'otten': 0.84; 'received:74.125.82.47': 0.84; 'hand,': 0.97 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=kHGji7oMuFoqgZI3ugKnxi6X7Y2wtO8BqeB7ayxxESw=; b=gCVQSgrUKXbQpxmerr55gJ7ED7qBPF8SCLG+gXpmkQbLEuzG4xk4hV9AVt2W+fVACe dsL+/3lLyO3ZUmuzpu4Nsfm5iYYU29orp8o1S80u0ds1NASfb8YkU/ghsD7BJ/QEW2xL Z8bc1rIwJGgSNEGpHnaKd0JnznbtxXPUeS34rJjaNcELgj8fty+fwh2Ixj63vc4Os2EV j7VxjfZIV82hTiO0eQYdqfFz6SlZGKvq/fUZMlzn15ERnfvxizpFIqkMTwT8A9aoj2tj 0xTFSnD8pxPueSAz+8dkyszvrQMZzrg3ClY0WuVNBuAMoVcCSDafRdRvRh+1uxjVMlpL py6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=kHGji7oMuFoqgZI3ugKnxi6X7Y2wtO8BqeB7ayxxESw=; b=PkFEKlApr/Hei5S0Pv2Pqp9zrl7wsY8sGaO8zjcK477ASqff3YF4nc2zhfZTUce9MR tQdgUfgo5K3eQA0IgbqcrWZ9VDLE5iTHyKiZA4mWWSoRoclQrHlSpsMvNaWI35EtoiU1 rS1e9Oi9DIAhQIFx/+D9IjQXJzNs8xXZd/14PIjYHZSYRSvs1ckFvFdezrHiahfzsbEc txFcjuEOP2YHoI5iO0hL0q5UFqYAuJ+Mls7QV4GrrZ6pszX9Dqj3CyTiuWRve/csKtBD R7L3sZBYO0GV3k1fSaYC+CQoEBBUv3xjLKzh53enUDQMKPoBdsMsujxVKCI/o54R7KIo /9wQ== X-Gm-Message-State: ALyK8tK8JCyU0z0oPNR8cLhqzBYgmo1UCM5emszDR2SKav5gUiarnAKk5uTWG2t0IYLnUA== X-Received: by 10.194.23.232 with SMTP id p8mr7063027wjf.166.1465666008141; Sat, 11 Jun 2016 10:26:48 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <575C49D6.5020204@gmail.com> X-Mailman-Original-References: <7e57c662-a6c2-441d-a46e-49458439250f@googlegroups.com> <16301530-a24b-42c6-bcf6-007c4eb85aca@googlegroups.com> Xref: csiph.com comp.lang.python:109822 On 10/06/2016 23:31, alex wright wrote: > I find shlex.split to be most useful to make my arguments a list in these > cases. > On Jun 9, 2016 3:28 PM, "MRAB" wrote: > >> On 2016-06-09 19:58, Peter Otten wrote: >> >>> Nev wrote: >>> >>> Thank you for your reply. I tried something like this in python code: >>>> from subprocess import call >>>> call(["ffmpeg -framerate 4/1 -start_number 1 -i >>>> C:\\Projects\\data2\\img_%05d.png -c:v libx264 -r 30 -pix_fmt yuv420p >>>> C:\\Projects\\data2\\movie.mp4"]) >>>> >>>> But it did not work. I get FileNotFoundError: [WinError 2] The system >>>> cannot find the file specified.. >>>> >>> You have to pass the command-line arguments as separate items in the list: >>> >>> call(["ffmpeg", >>> "-framerate", "4/1", >>> "-start_number", "1", >>> "-i", "C:\\Projects\\data2\\img_%05d.png", >>> ... # and so on >>> ]) >>> >>> You should also give it the full path of ffmpeg. >> On the other hand, in-loop solution would be more preferable since it lets >>>> me to use variable names of the images and paths.. >>>> >> -- >> https://mail.python.org/mailman/listinfo/python-list >> Why not use the split() method on the string of the command line. Karim