LA_
LA_

Reputation: 20419

How to make timelapse with ffmpeg from files with date-time names?

I understand how to make timelapse video from the sequence of files. But what if my files have names like YYYYMMDDHHmmSS.jpg? How can I pass them in the correct order? I would prefer not to rename them (there are 55'000 files, almost 10 Gb).

Upvotes: 1

Views: 1447

Answers (2)

LA_
LA_

Reputation: 20419

I just found that there is no much sense to do any additional actions, the files are already sorted in the correct order, so the command below works well:

ffmpeg -framerate 500 -pattern_type glob -i '*.jpg' -c:v libx264 -pix_fmt yuv420p out2.mp4

Upvotes: 2

Lauloque
Lauloque

Reputation: 159

I know there are some bat/shell commands possible for that, but IMHO it makes things more complicated for so little.

In similar cases I prefer using renaming softwares like Ant Renamer.

  1. Drag & drop your files in the main window
  2. In the Actions tab, click Enumeration in the list
  3. You're given a naming scheme (look down the options to see the different schemes available).
        I recommend using the default %name%_%num%%ext%, starting at 1 and with one more digit than your total number of files. Which in your case will result in YYYYMMDDHHmmSS_XXX.jpg
  4. Click the Go button to process.
  5. Once finished, check if the numbers added adequate the original file names (it should since the naming used is already chronological, but do check for safety).

It might not suit you, especially if you really want to do everything from command lines. But for other people, it might be enough.

enter image description here

Upvotes: 1

Related Questions