Body: <p>I have a directory where new files in jpeg format are periodically emerge.</p>
  <p>How can these files be processed one by one,
  waiting for the next one and convert them to a mp4 file.</p>
  <p>I tried like this</p>
  <pre><code>ffmpeg -framerate 1 -i test%d.jpg -c:v libx264 -r 30 -pix_fmt yuv420p output.mp4
  </code></pre>
  <p>but ffmpeg do not wait for new files and exits.</p>
  <p>Is there a solution?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-05-13T08:24:15.960Z
Comments.Text: Try https://superuser.com/questions/1375257
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-05-13T08:43:22.183Z
Comments.Text: Thanks, interesting information
Comments.UserDisplayName: polymetr
Tags: <ffmpeg><video-recording>
Title: FFmpeg. Processing new jpeg files that appear
UserDisplayName: polymetr
ThreadText: # FFmpeg. Processing new jpeg files that appear
  
  (Asked by: username_0 on 2023-05-13)
  
  I have a directory where new files in jpeg format are periodically emerge.
  
  How can these files be processed one by one,
  waiting for the next one and convert them to a mp4 file.
  
  I tried like this
  
  ```
  ffmpeg -framerate 1 -i test%d.jpg -c:v libx264 -r 30 -pix_fmt yuv420p output.mp4
  
  ```
  
  but ffmpeg do not wait for new files and exits.
  
  Is there a solution?
  
  **Tags:** ffmpeg, video-recording
  
  > **Comments:**
  > **username_1**: Try https://superuser.com/questions/1375257  
  > **username_0**: Thanks, interesting information  
  
  ---
  
  ## 0 answers
  
  