Create time lapse video from images: Difference between revisions

From WickyWiki
Created page with "Category:Ubuntu Category:Ubuntu Images Category:Ubuntu Video Category:201903 Install ffmpeg: <syntaxhighlight lang=bash> sudo apt install ffmpeg </syntaxhig..."
 
mNo edit summary
Line 10: Line 10:
</syntaxhighlight>
</syntaxhighlight>


Create timelapse file-index
Create timelapse indexfile:


Format:
Format of the indexfile:


   file '/full/path/to/file1.jpg'
   file '/full/path/to/file1.jpg'
Line 18: Line 18:
   ...
   ...


Create:
Create the indexfile:


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
Line 25: Line 25:
</syntaxhighlight>
</syntaxhighlight>


Create video:
Create the video:


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
ffmpeg -f concat -safe 0 -i "${sourcedir}/../files.txt" -r 25 -vcodec libx264 -crf 22 "${sourcedir}/../out.mp4"
ffmpeg -f concat -safe 0 -i "${sourcedir}/../files.txt" -r 25 -vcodec libx264 -crf 22 "${sourcedir}/../out.mp4"
</syntaxhighlight>
</syntaxhighlight>

Revision as of 16:46, 15 March 2019


Install ffmpeg:

sudo apt install ffmpeg

Create timelapse indexfile:

Format of the indexfile:

 file '/full/path/to/file1.jpg'
 file '/full/path/to/file2.jpg'
 ...

Create the indexfile:

sourcedir=$HOME/Pictures/timelapse
find "${sourcedir}" -iname "*.jpg" -type f | sort | sed "s/\(.*\)/file '\1'/g"  > "${sourcedir}/../files.txt"

Create the video:

ffmpeg -f concat -safe 0 -i "${sourcedir}/../files.txt" -r 25 -vcodec libx264 -crf 22 "${sourcedir}/../out.mp4"