Mukul Kashyap
Mukul Kashyap

Reputation: 11

Video created via shell_exec() does not play, but video created via terminal does

I am creating a video from single audio and single image and it is fine when the audio length less than 10 seconds but when the audio length exceeds 10 seconds then video not playing. I am using FFmpeg to create video using shell_exec(). The video is fine when I directly runs the FFmpeg command on the terminal but the only issue comes with the shell_exec command.

This command I am using -

ffmpeg -loop 1 -f image2 -i $this->img_url -i  $this->audio_url -vf scale=1920*1080 -pix_fmt yuv420p -vcodec libx264 -shortest ".$video_local_dir.$video_name;

Upvotes: 0

Views: 73

Answers (1)

Mukul Kashyap
Mukul Kashyap

Reputation: 11

I have found a solution of it as i was pushing a job and when the shell_exec takes time more than 5 minutes then it discards the running job due to which the video was not completely processed.

After that i increased my job ttr(time to run) to max 1 hour and the problem gets fixed now.

Thanks for commenting here.

Good Bye

Happy Coding!

Upvotes: 1

Related Questions