Hello, I'm trying to run mencoder command line utility to encode videos. When I use these two command in terminal (through SSH), everything works fine. But when I run them from PHP script with system command, it doesn't work. The commands are: First pass: -------------------- system("/usr/local/bin/mencoder -vf scale=448:-3,expand=448:336 -sws 9 -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=250:trell:v4mv:mv0:mbd=2:cbp:aic:cmp=3:subcmp=3:vpass=1 -frames 800 -ofps 24000/1001 -oac mp3lame -lameopts abr:br=64:mode=0 -channels 1 -srate 22050 -of lavf -lavfopts format=flv -o ".$outputFile." /home/re/ff/logo7.avi ".$inputFile); -------------------- Second pass: -------------------- system("/usr/local/bin/mencoder -vf scale=448:-3,expand=448:336 -sws 9 -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=250:trell:v4mv:mv0:mbd=2:cbp:aic:cmp=3:subcmp=3:vpass=1 -frames 800 -ofps 24000/1001 -oac mp3lame -lameopts abr:br=64:mode=0 -channels 1 -srate 22050 -of lavf -lavfopts format=flv -o ".$outputFile." /home/re/ff/logo7.avi ".$inputFile); -------------------- And the output is: -------------------- MEncoder dev-SVN-r25703-4.1.2 (C) 2000-2008 MPlayer Team CPU: Intel(R) Celeron(R) D CPU 3.20GHz (Family: 15, Model: 6, Stepping: 5) CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1 Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 success: format: 0 data: 0x0 - 0x206e57e AVI file format detected. [aviheader] Video stream found, -vid 0 [aviheader] Audio stream found, -aid 1 VIDEO: [] 448x336 24bpp 23.976 fps 86617.4 kbps (10573.4 kbyte/s) [V] filefmt:3 fourcc:0x0 size:448x336 fps:23.98 ftime:=0.0417 ========================================================================== Opening audio decoder: [mp3lib] MPEG layer-2, layer-3 AUDIO: 44100 Hz, 2 ch, s16le, 320.0 kbit/22.68% (ratio: 40000->176400) Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3) ========================================================================== OK, exit Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1 Opening video filter: [expand w=448 h=336] Expand: 448 x 336, -1 ; -1, osd: 0, aspect: 0.000000, round: 1 Opening video filter: [scale w=448 h=-3] ========================================================================== Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDec: using BGR 24-bit as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDec: using BGR 24-bit as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Packed YUY2) VDec: using Packed YUY2 as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Unknown 0x32565559) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Packed UYVY) VDec: using Packed UYVY as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Planar 444P) VDec: using Planar 444P as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Planar 422P) VDec: using Planar 422P as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Planar YV12) VDec: using Planar YV12 as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [hmblck] Hauppauge Macroblock/NV12/NV21 Decoder VDec: vo config request - 448 x 336 (preferred colorspace: Unknown 0x0000) VDec: using Planar YV12 as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [hmblck] Hauppauge Macroblock/NV12/NV21 Decoder VDec: vo config request - 448 x 336 (preferred colorspace: Unknown 0x0000) VDec: using Planar YV12 as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [hmblck] Hauppauge Macroblock/NV12/NV21 Decoder VDec: vo config request - 448 x 336 (preferred colorspace: Unknown 0x0000) VDec: using Planar YV12 as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Planar I420) VDec: using Planar I420 as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Planar YVU9) VDec: using Planar YVU9 as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Read DOCS/HTML/en/codecs.html! ========================================================================== Exiting... MEncoder dev-SVN-r25703-4.1.2 (C) 2000-2008 MPlayer Team CPU: Intel(R) Celeron(R) D CPU 3.20GHz (Family: 15, Model: 6, Stepping: 5) CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1 Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 success: format: 0 data: 0x0 - 0x206e57e AVI file format detected. [aviheader] Video stream found, -vid 0 [aviheader] Audio stream found, -aid 1 VIDEO: [] 448x336 24bpp 23.976 fps 86617.4 kbps (10573.4 kbyte/s) [V] filefmt:3 fourcc:0x0 size:448x336 fps:23.98 ftime:=0.0417 ========================================================================== Opening audio decoder: [mp3lib] MPEG layer-2, layer-3 AUDIO: 44100 Hz, 2 ch, s16le, 320.0 kbit/22.68% (ratio: 40000->176400) Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3) ========================================================================== OK, exit Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1 Opening video filter: [expand w=448 h=336] Expand: 448 x 336, -1 ; -1, osd: 0, aspect: 0.000000, round: 1 Opening video filter: [scale w=448 h=-3] ========================================================================== Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDec: using BGR 24-bit as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDec: using BGR 24-bit as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Packed YUY2) VDec: using Packed YUY2 as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Unknown 0x32565559) VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Packed UYVY) VDec: using Packed UYVY as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Planar 444P) VDec: using Planar 444P as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Planar 422P) VDec: using Planar 422P as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Planar YV12) VDec: using Planar YV12 as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [hmblck] Hauppauge Macroblock/NV12/NV21 Decoder VDec: vo config request - 448 x 336 (preferred colorspace: Unknown 0x0000) VDec: using Planar YV12 as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [hmblck] Hauppauge Macroblock/NV12/NV21 Decoder VDec: vo config request - 448 x 336 (preferred colorspace: Unknown 0x0000) VDec: using Planar YV12 as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [hmblck] Hauppauge Macroblock/NV12/NV21 Decoder VDec: vo config request - 448 x 336 (preferred colorspace: Unknown 0x0000) VDec: using Planar YV12 as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Planar I420) VDec: using Planar I420 as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: Planar YVU9) VDec: using Planar YVU9 as output csp (no 0) Opening video filter: [flip] Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (448x336 fourcc=31564c46 [FLV1]) [VE_LAVC] High quality encoding selected (non-realtime)! VDecoder init failed :( Opening video decoder: [raw] RAW Uncompressed Video VDec: vo config request - 448 x 336 (preferred colorspace: BGR 24-bit) VDecoder init failed :( Read DOCS/HTML/en/codecs.html! ========================================================================== Exiting... -------------------- I wonder how to fix it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php