App for timelapse video compilation from images.
How it works:
- Analyzes sizes of all images in folder using exiv2 and takes largest
- Resizes smaller images to largest using ImageMagic.mogrify
- Generates subtitles with datetime got from filenames
- Compiles images to video and overlay subtitles
Folder structure:
DATA:
- FOLDER_NAME1:
- date_time1.jpg
- IMG_date_time2.jpg
- ...
- FOLDER_NAME2:
- ...
- video
- FOLDER_NAME1.mp4
- ...
- (once) organize your data as mentioned above
- (once) build container (if not yet)
podman build -t rokiden/timelapse_compiler:latest -t rokiden/timelapse_compiler:$(date +%Y%m%d_%H%M%S) .
- run container (pass data, envs, folder, gpu, quotas)
podman run --rm -t --cpus=8 --device=/dev/dri/renderD128 -v /path/to/DATA:/data -e TL_VIDEO_H=1080 rokiden/timelapse_compiler:latest FOLDER_NAME
- your video placed at DATA/video/FOLDER_NAME.mp4
Configuration ENVs available in Dockerfile
- Image based on linuxserver/ffmpeg
- Subtitles generated by python script, TL_SUB_FPS(must be divider of TL_FPS).
FFMPEG pipeline:
CPU: transparent_background -> render_subtitles -> crop -> upload_to_GPU
GPU: subtitles_from_cpu ---------------------v
GPU: *.jpg -> mjpeg_qsv -> scale_qsv -> overlay_qsv -> h264_qsv
- Main stream fully hardware processed by Intel Quick Sync.
- Subtitles rendered by CPU, but it is easy task.
- Developed and tested on i5-1240P.