I am trying to merge multiple short videos in the container in Cloud Run using the node.js fluent-ffmpeg package. It takes 20 seconds max to merge videos locally. When I am making a request to clour run to merge the videos it processes them very slowly and after 30 minutes just stops (I assume that's because 1800 seconds timeout is set). I tried to allocate to 2 CPUs with 8GB each but that didn't help. Within 30 minutes the video is processed by about 30 % as I can see in the cloud run logs. Any feedback is appreciated!
Asked
Active
Viewed 619 times
2
-
1Please check you have an active request ALL the time while the conversion runs. https://stackoverflow.com/questions/68102462/running-background-process-using-ffmpeg-on-google-cloud-run-stopping-in-middle – Pentium10 Aug 18 '21 at 14:45
-
Can you describe how do you run your job? What's the request lifecycle and the FFMPEG process? – guillaume blaquiere Aug 18 '21 at 18:51
-
Processing video is a compute-intensive task. I would not use Cloud Run for your objective. Either use a service designed for video processing or move your application to Compute Engine. – John Hanley Aug 18 '21 at 20:12