title: Convert image sequence to video using ffmpeg and list of files
body: <p>I have a camera taking time-lapse shots every 2–3 seconds, and I keep a rolling record of a few days' worth. Because that's a lot of files, I keep them in subdirectories by day and hour:</p>
  
  <pre><code>images/
      2015-05-02/
          00/
              2015-05-02-0000-02
              2015-05-02-0000-05
              2015-05-02-0000-07
          01/
              (etc.)
      2015-05-03/
  </code></pre>
  
  <p>I'm writing a script to automatically upload a timelapse of the sunrise to YouTube each day. I can get the sunrise time from the web in advance, then go back after the sunrise and get a list of the files that were taken in that period using <code>find</code>:</p>
  
  <pre><code>touch -d "$SUNRISE_START" sunrise-start.txt
  touch -d "$SUNRISE_END" sunrise-end.txt
  find images/"$TODAY" -type f -anewer sunrise-start.txt ! -anewer sunrise-end.txt
  </code></pre>
  
  <p>Now I want to convert those files to a video with <code>ffmpeg</code>. Ideally I'd like to do this without making a copy of all the files (because we're talking ~3.5 GB per hour of images), and I'd prefer not to rename them to something like <code>image000n.jpg</code> because other users may want to access the images. Copying the images is my fallback.</p>
  
  <p>But I'm getting stuck sending the results of <code>find</code> to <code>ffmpeg</code>. I understand that ffmpeg can expand wildcards internally, but I'm not sure that this is going to work where the files aren't all in one directory. I also see a few people using <code>find</code>'s <code>--exec</code> option with <code>ffmpeg</code> to do batch conversions, but I'm not sure if this is going to work with image sequence input (as opposed to, say, converting 1000 images into 1000 single-frame videos).</p>
  
  <p>Any ideas on how I can connect the two—or, failing that, a better way to get files in a date range across several subdirectories into <code>ffmpeg</code> as an image sequence?</p>