My "selfie a day" hobby files.
This is a fork of a fork of a fork.
It's a hobby where a person takes a selfie (photo of him/her) everyday. After a period (years), the pictures are joined to make a timelapse video. The pictures are joined in such a way that the face is centered.
Example video : Hugo Cornellier's AGE 12 to MARRIED
There's also a Reddit community for this hobbyists.
For fun ! Also, it's a lazy way to make a journal.
A picture tells a thousand words eh ? You can figure out the place you where, people you were with and how things were.
This repo contains scripts, instructions to manage your own selfie a day project.
- Make a dedicated folder in your phone to store the pics. Make sure the date is correct and pictures have the correct EXIF date. It would be great if the filename contains the date captured. If the folder name is something like
0PSAD
, it will show up first because of the number at beginning. - Periodically copy this folder from phone to your computer.
- Back it up to a cloud. What I do is take the pictures in the order of their date, split it into 100, zip it and upload. Usage :
mkdir compressed
python3 split-into-chunks.py 0PSAD compressed
- The awesome Photo A Day Aligner tool
- Clone/download this repo
- Download shape_predictor_68_face_landmarks.dat and place it in the cloned repo folder
- Install dependencies :
pip3 install wheel pip3 install dlib pip3 install scipy pip3 install exifread python-resize-image
- Copy pictures to
input
folder - Run
make-input.py
. This'll resize every images ininput
folder to a square which solves this - Edit
pada.conf
according to your need - Run :
python3 pada.py align
Use ffmpeg
for making the video from images in output
folder. Change fps
according to your need using -r
flag :
cat aligned/*.jpg | ffmpeg -f image2pipe -r 20 -vcodec mjpeg -i - -vcodec libx264 out.mp4
I'm gonna add this sound to the video. Sound file name is sound.mp3
:
cat aligned/*.jpg | ffmpeg -f image2pipe -r 10 -vcodec mjpeg -i - -i sound.mp3 -shortest out.mp4
Source :
ffmpeg -i input.mkv -vf "scale=iw/2:ih/2" half_the_frame_size.mkv
ffmpeg -i input.mkv -vf "scale=iw/3:ih/3" a_third_the_frame_size.mkv
ffmpeg -i input.mkv -vf "scale=iw/4:ih/4" a_fourth_the_frame_size.mkv
- Align to the right face in pictures with multiple faces
- Make it faster
- Make the PADA script work for all image resolutions (eliminate
make-input.py
)