Ingen beskrivning

Juan Keymer ece6fd8626 Edited README 2 månader sedan
README.md ece6fd8626 Edited README 2 månader sedan

README.md

How to make TimeLapse videos

Simple instructions to make a TimeLapse using HomeScope's Raspberry Pi Linux Shell.

Step 1:

First make a directory using the Linux bash shell command mkdir (here called My_Timelapse).

mkdir My_Timelapse

Get into the directory you just created using the cd command. Do all other steps (commands) in this directory--not anywhere else.

cd My_Timelapse

Step 2:

Take several microscopy pictures with the same time interval between them (DELTA_T) for a total lengh of time (TOTAL_T).

Use the libcamera-still command, and put in the parameters for the total amount of time (-t TOTAL_T, in milliseconds) and the frequency (--timelapse DELTA_T in millisecods) you want to be taking pictures.

Be carefull to do not fill the drive (SD card) with too many pictures as it will crash the system. Make sure the table with your HomeScope is not disturbed with vibrations.

For example , for taking pictures every 10 minutes (DELTA_T = 600000 milliseconds) for a 2 hour period (TOTAL_T = 7200000 ms). We use the pattern PictureN.jpg to name pictures as numbered (N) jpg files (N={0000,...0013}). The numbers are added to the filename by the structure %04d specifying 4 digit number pattern

libcamera-still -t 7200000 --timelapse 600000 --framestart 1 -o Picture%04d.jpg

Step 3:

Make a text file called photos.txt by using the Linux bash shell command ls to list all the pictures files in the directory using the command. To save the list (output of the command) to a file called photos.txt, redirect the output of the command from the standard oputput (the screen) to the filesystem with the command line:

ls *.jpg > photos.txt

Step 4:

Build the final movie stiching all frames together with the command mencoder (maplayer) as follows

mencoder "mf://@photos.txt" -mf fps=1 -o timelapse_video.avi -ovc lavc -lavcopts vcodec=mjpeg:vbitrate=1600 vqmin=3

Step 5:

Play the movie To play the avi file use the mplayer command:

mplayer timelapse_video.avi -fs