Body: <p>I'm running this ffmpeg command that does multiple trims on input video and concats those trims to generate output.</p>
  <p><code>ffmpeg -i https://d8r14y803bnlk.cloudfront.net/usetldr/2736037/u/796/st/5a919413ff884892bbfffcd0671687a9/p/67c1a16438bf4bb78b785557f4cef7ef/OJx1SIKTNbbGHmQfKT4C_render.mp4 -filter_complex &quot;[0:v:0]trim=start=0.0:end=4.289,setpts=PTS-STARTPTS,format=yuva420p[0v];[0:v:0]trim=start=4.84:end=1034.7,setpts=PTS-STARTPTS,format=yuva420p[1v];[0v][1v]concat=n=2:v=1:a=0&quot; -crf 18 -an -preset ultrafast -y /tmp/8TZeqB3Z6h.mp4</code></p>
  <p>This command works fine on my M1 mac but hangs EC2 instances (c5.4xlarge).</p>
  <p>I'm using <code>ffmpeg version 6.1-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2023 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6)</code>  on EC2.</p>
  <p>Any idea why this could be happening?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-12-16T00:07:01.397Z
Comments.Text: came across this thread https://video.stackexchange.com/a/27713/20745 where the user recommends using same input file multiple times ( that is, multiple -i switches with same file).
  
  And it seems to work.
  
  Does trim filter store all frames in RAM?
Comments.UserDisplayName: Tejas
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-12-16T00:08:08.537Z
Comments.Text: Is there any cleaner workaround for this?
Comments.UserDisplayName: Tejas
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-12-16T04:47:25.417Z
Comments.Text: There is `split` filter that can be used to write it in cleaner way.
Comments.UserDisplayName: Tejas
Tags: <ffmpeg><video>
Title: machine hangs during ffmpeg command execution
UserDisplayName: Tejas
ThreadText: # machine hangs during ffmpeg command execution
  
  (Asked by: username_0 on 2023-12-15)
  
  I'm running this ffmpeg command that does multiple trims on input video and concats those trims to generate output.
  
  `ffmpeg -i https://d8r14y803bnlk.cloudfront.net/usetldr/2736037/u/796/st/5a919413ff884892bbfffcd0671687a9/p/67c1a16438bf4bb78b785557f4cef7ef/OJx1SIKTNbbGHmQfKT4C_render.mp4 -filter_complex "[0:v:0]trim=start=0.0:end=4.289,setpts=PTS-STARTPTS,format=yuva420p[0v];[0:v:0]trim=start=4.84:end=1034.7,setpts=PTS-STARTPTS,format=yuva420p[1v];[0v][1v]concat=n=2:v=1:a=0" -crf 18 -an -preset ultrafast -y /tmp/8TZeqB3Z6h.mp4`
  
  This command works fine on my M1 mac but hangs EC2 instances (c5.4xlarge).
  
  I'm using `ffmpeg version 6.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2023 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6)` on EC2.
  
  Any idea why this could be happening?
  
  **Tags:** ffmpeg, video
  
  > **Comments:**
  > **username_0**: came across this thread https://video.stackexchange.com/a/27713/20745 where the user recommends using same input file multiple times ( that is, multiple -i switches with same file).  And it seems to work.  Does trim filter store all frames in RAM?  
  > **username_0**: Is there any cleaner workaround for this?  
  > **username_0**: There is `split` filter that can be used to write it in cleaner way.  
  
  ---
  
  ## 0 answers
  
  