hi,
I want to convert my video using ffmpeg when node saved.
I created ffmpegRule, triggered when "After saving new content".
I choose PHP->Execute custom PHP code
I entered the code
if( isset($node->field_video)&& isset($node->field_video[0])&& ($node->field_video[0]['fid']>0) ) {
$out=array();
exec("ffmpeg -an -ss 00:00:10 -an -r 1 -s cif -vcodec mjpeg -vframes 1 -y /home/nerkn/sarkisozu.web.tr/ffmpeg%d.jpg -i \"/home/nerkn/sarkisozu.web.tr/{$node->$node->field_video[0]['filename]}\"", $out);
exec("mv /home/nerkn/sarkisozu.web.tr/ffmpeg1.jpg /home/nerkn/sarkisozu.web.tr/{$node->nid}.jpg", $out);
$out=implode("<br />", $out);
watchdog('content', '@type: ffmpeg %title, %out', array('@type' => $node->type, '%title' => $node->title, '%out'->$out));
}
But I cant save this code!
I get 503 Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Can any one guess what going on?
Comments
Comment #1
nerkn commentedIt was about my hosting! Sorry
[Sun Oct 11 03:46:53 2009] [error] [client 88.230.146.69] mod_security: Access denied with code 503. Pattern match "(chr|fwrite|fopen|system|echr|passthru|popen|proc_open|shell_exec|exec|proc_nice|proc_terminate|proc_get_status|proc_close|pfsockopen|leak|apache_child_terminate|posix_kill|posix_mkfifo|posix_setpgid|posix_setsid|posix_setuid|phpinfo)\\\\(.*\\\\)\\\\;" at POST_PAYLOAD [severity "EMERGENCY"] [hostname "sarkisozu.web.tr"] [uri "/admin/rules/rules/rules_1/add/action/3?destination=admin%2Frules%2Frules%2Frules_1"] [unique_id "h-xtLdBhsgQAAD7JeIQAAAAE"]