RE: can't get output of exec ('nice -n 19 ffmpeg -i "file"')

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think nice may play games with fork etc and may be confusing php.

Try putting the nice -n 19 ffmpeg -I bit into a mini shell script of its own, and call that.

> -----Original Message-----
> From: Rene Veerman [mailto:rene7705@xxxxxxxxx]
> Sent: Monday, September 29, 2008 1:54 PM
> To: php-general@xxxxxxxxxxxxx
> Subject:  can't get output of exec ('nice -n 19 ffmpeg -i "file"')
>
> Hi, i have the following php statements;
>
> I'm wondering why exec()'s $output remains empty..
> Any help is greatly appreciated..
>
> <?php
>     $cmd = 'nice -n 19 ffmpeg -i "'.$sourcePath.'"';
>     exec ($cmd, $output, $result);
>  return array (
>             'cmd' => $cmd,
>             'output' => $output,
>             'result' => $result
>     );
>
>
> which when executed returns
>
> ["cmd"]=>string(128) "nice -n 19 ffmpeg -i "/data/web/secret/20080929
> 201651/work/MVI_1993.avi""
> ["output"]=>array(0) {
> }
> ["result"]=>int(1)
> }
>
> if i run the same "cmd" on the commandline, it nicely returns:
>
> FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
>   configuration:  --enable-gpl --enable-pp --enable-pthreads
> --enable-vorbis --enable-libogg --enable-a52 --enable-dts
> --enable-libgsm --enable-mp3lame --enable-faad --enable-dc1394
> --disable-debug --enable-shared --prefix=/usr
>   libavutil version: 0d.49.0.0
>   libavcodec version: 0d.51.11.0
>   libavformat version: 0d.50.5.0
>   built on Sep 29 2008 18:43:44, gcc: 4.1.2 20061115 (prerelease)
> (Debian 4.1.1-21)
> Input #0, avi, from
> '/data/web/LIVE_WEBSITES/www/veerman.name/mediaBeez_content/media/uploa
> d/20080929
> 201651/work/MVI_1993.avi':
>   Duration: 00:01:45.6, start: 0.000000, bitrate: 1746 kb/s
>   Stream #0.0: Video: mjpeg, yuvj422p, 320x240, 15.00 fps(r)
>   Stream #0.1: Audio: pcm_u8, 11024 Hz, mono, 88 kb/s
> Must supply at least one output file
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


_______________________________________________________

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux