Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'anyway.': 0.05; 'result,': 0.07; 'input,': 0.09; 'inserts': 0.09; 'subject:command': 0.09; 'subject:module': 0.09; 'subject:using': 0.09; 'cc:addr:python- list': 0.11; 'ah,': 0.16; 'bash,': 0.16; 'concat': 0.16; 'finney': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'parentheses': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'file,': 0.19; 'command': 0.22; 'input': 0.22; 'putting': 0.22; 'saying': 0.22; 'cc:addr:python.org': 0.22; 'creating': 0.23; 'sorry,': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'chris': 0.29; 'am,': 0.29; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'easier': 0.31; 'that.': 0.31; 'writes:': 0.31; 'file': 0.32; 'probably': 0.32; 'figure': 0.32; 'actual': 0.34; 'subject:with': 0.35; 'case,': 0.35; 'received:google.com': 0.35; 'ben': 0.38; 'pm,': 0.38; 'rather': 0.38; 'does': 0.39; 'bad': 0.39; 'then,': 0.60; 'no.': 0.61; 'name': 0.63; 'temporary': 0.65; 'replicate': 0.84; 'to:none': 0.92; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=ID5otsnTyrvxwUO+o0elZ9JlQJY4dyeMdAcqGbAAioo=; b=PU1TRIysLvkWX+OrDvctQqb8HyonToCFaD37auDWH2z8wBnjfEqA09t9ifz2si6FOA LGug2JaKcCDPQuY3byUXnRQfcDe44OPX5V485ABNddBimSlBM00bT44RfXPYKZID8i3P ViLfpQidIXcRZxPE4KdN8EPrDwadvNcZlTPeXYRAP0E2puA+qH07CFosp9ovQ3lyhNoJ PEvsUosqUlg+NNJS6HL3BYfDLyVhH0VVrBDyP1HtKbiM6xF5TwVi2EZFJrzC9AWCchrC Xz9BhQSPX7Ka3FBYFmFcZBnFpF84BDjG7khP17lTOqR7dNiwlTEN5Xpx7cm1UyEFQ2xY micg== MIME-Version: 1.0 X-Received: by 10.66.102.39 with SMTP id fl7mr71142911pab.43.1386019501505; Mon, 02 Dec 2013 13:25:01 -0800 (PST) In-Reply-To: <7wzjojne7a.fsf@benfinney.id.au> References: <7wzjojne7a.fsf@benfinney.id.au> Date: Tue, 3 Dec 2013 08:25:01 +1100 Subject: Re: using ffmpeg command line with python's subprocess module From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386019510 news.xs4all.nl 15949 [2001:888:2000:d::a6]:33067 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:60887 On Tue, Dec 3, 2013 at 8:19 AM, Ben Finney wrote: > Chris Angelico writes: > >> On Mon, Dec 2, 2013 at 10:34 PM, iMath wrote: >> > ffmpeg -f concat -i <(for f in ./*.wav; do echo "file '$f'"; done) -c copy output.wav >> > ffmpeg -f concat -i <(printf "file '%s'\n" ./*.wav) -c copy output.wav >> > ffmpeg -f concat -i <(find . -name '*.wav' -printf "file '%p'\n") -c copy output.wav >> >> In bash, the <(...) notation is like piping: it executes the command >> inside the parentheses and uses that as standard input to ffmpeg. > > Not standard input, no. What it does is create a temporary file to > contain the result, and inserts that file name on the command line. This > is good for programs that require an actual file, not standard input. Ah, sorry, my bad - bit rusty on my arcane bashisms. In any case, the general point of what I was saying is: Figure out what's happening, and replicate that. In this case, that means creating a file, then, rather than putting it on stdin - that's probably actually easier anyway. ChrisA