Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 12169 invoked from network); 13 Apr 2010 22:07:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Apr 2010 22:07:54 -0000 Received: (qmail 80687 invoked by uid 500); 13 Apr 2010 22:07:53 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 80586 invoked by uid 500); 13 Apr 2010 22:07:53 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 80575 invoked by uid 99); 13 Apr 2010 22:07:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Apr 2010 22:07:53 +0000 X-ASF-Spam-Status: No, hits=1.8 required=10.0 tests=AWL,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of daolwin@hotmail.com designates 65.55.90.154 as permitted sender) Received: from [65.55.90.154] (HELO snt0-omc3-s15.snt0.hotmail.com) (65.55.90.154) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Apr 2010 22:07:45 +0000 Received: from SNT141-DS17 ([65.55.90.137]) by snt0-omc3-s15.snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 13 Apr 2010 15:07:24 -0700 X-Originating-IP: [93.104.188.137] X-Originating-Email: [daolwin@hotmail.com] Message-ID: From: "Daniel Wamara" To: Subject: Commons Exec not producing the same result as the command line Date: Wed, 14 Apr 2010 00:07:20 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00C8_01CADB66.7356B590" X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8089.726 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8089.726 X-OriginalArrivalTime: 13 Apr 2010 22:07:24.0424 (UTC) FILETIME=[B2572880:01CADB55] ------=_NextPart_000_00C8_01CADB66.7356B590 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Good evening all,=20 I am trying to call ffmpeg via the command exec in order to transcode = some files and the strange thing happening is that the files produced = are not the same as the one I can create when calling the same command = via the command line. This is how I am calling fmpeg and I get a file with a particular codec = in it (strangely not the right one) although launching in the command = line exactly what I have in the sb.toString() which is the command to be = executed, the file created has a correct codec. So to say, the same = command started via Exec and the one started via the command line have = not the same result. Anyone has an idea? Thanks. Daniel Wamara StringBuilder sb =3D new StringBuilder("/home/ect/scripts/transcoding.sh = "); sb.append(" " + source.getAbsolutePath()); sb.append(" " + attributes.getCodec()); sb.append(" " + = String.valueOf(attributes.getSamplingRate().intValue())); sb.append(" " + target.getAbsolutePath()); logDebug("command --> " + sb.toString()); CommandLine commandLine =3D CommandLine.parse(sb.toString()); DefaultExecutor executor =3D new DefaultExecutor(); executor.execute(commandLine); ------=_NextPart_000_00C8_01CADB66.7356B590--