0

I want to compress video file while uploading the video. I installed the ffmpeg for this and , I am using the below code.

Code for video stream compression:-

shell_exec($ffmpeg -i test.mp4 -s 320x240 new.mp4);

Video getting compressed. But this takes too much time to compress and I always getting "Maximum execution time of 30 seconds exceeded", error for this.

Please help me to sort out this. I don't want to change my maximum execution time. Is there is any mistake in the above code please help me to rectify it or suggest me another method or code...

Rakhi
  • 1
  • 3
  • How long (e.g. how many frames) is your input test.mp4 file? – Ronald S. Bultje May 12 '15 at 14:15
  • possible duplicate of [Fatal error: Maximum execution time of 30 seconds exceeded](http://stackoverflow.com/questions/5164930/fatal-error-maximum-execution-time-of-30-seconds-exceeded) – aergistal May 12 '15 at 16:34
  • the test file have 1.34 seconds and it is a 44mb file,, – Rakhi May 13 '15 at 04:43
  • I checked this link http://stackoverflow.com/questions/5164930/fatal-error-maximum-execution-time-of-30-seconds-exceeded. But this is not the solution i need. I want the code for video compression, want reduce the size of the video.. Not want to change the maximum execution limit – Rakhi May 13 '15 at 07:37

0 Answers0