when i run
exec("ffmpeg -i $flv -y -f mjpeg -ss 00:00:05 -s 120x90 -vframes 1 -an thumb.jpg",$error);
$error return’s empty value
but when i run this command using cron job
this one send a notification email to me which contain informations like
FFmpeg version 0.5.2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: –prefix=/usr –libdir=/usr/lib64 –shlibdir=/usr/lib64 –mandir=/usr/share/man –incdir=/usr/include –disable-avisynth –extra-cflags=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC –enable-avfilter –enable-avfilter-lavf –enable-libdirac –enable-libfaac –enable-libfaad –enable-libfaadbin –enable-libmp3lame –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libtheora –enable-libx264 –enable-gpl –enable-nonfree –enable-postproc –enable-pthreads –enable-shared –enable-swscale –enable-vdpau –enable-version3 –enable-x11grab
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 1 / 52.20. 1
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jun 13 2010 23:44:18, gcc: 4.1.2 20080704 (Red Hat 4.1.2-48)
I need to be able to get those errors in php so i can know if the thumb was created or not
Thanks.
Redirect the output with
2>&1exec("ffmpeg -i $flv -y -f mjpeg -ss 00:00:05 -s 120x90 -vframes 1 -an thumb.jpg 2>&1",$error);