This script automatically downloads images from the Very Large Array (VLA) observatory webcam, generates a time-lapse video from these images, and adds a soundtrack to the video. It is designed to run continuously, capturing images at random intervals between 15 to 22 seconds. The script handles image download, avoids duplicates through hash checking, and compiles the final images into a video with an accompanying audio track.
- Automated Image Downloads: Downloads images from the VLA observatory webcam.
- Duplicate Avoidance: Uses SHA-256 hashing to prevent saving duplicate images.
- Time-Lapse Video Creation: Generates a time-lapse video from the collected images.
- Audio Track Addition: Adds a soundtrack to the time-lapse video.
- Ubuntu
- Fedora
- Debian
- Python 3.12 or newer
-
Virtual Environment (Recommended): It's recommended to use a virtual environment for this project.
-
Install Required Packages: Install the required Python packages by running:
bash setup.sh
-
Configuration: The script uses a
config.json
file for settings such as proxy configuration (if needed) and the ntfy.sh topic for notifications. On the first run, it will create this file with default settings if it doesn't exist.
To run the script, navigate to the script's directory and execute:
python __main__.py
or
python ../VLA
or
bash vla.sh
The script will start downloading images, logging its activities, and saving the images in a folder named VLA/images
within your home directory. Press Ctrl+C
to stop the image downloading process and start the video creation phase.
You can modify the following in the config.json
file to customize the behavior:
- Image download URL
- Download interval range
- Frames per second for the time-lapse video
- Notification settings
The script logs its activity, including any errors encountered, to a file named time_lapse.log
within a VLA/logging
directory in your home directory.
The generated time-lapse video will be saved in the VLA/video
directory within your home directory, named with the date of creation.
Contributions to improve the script are welcome. Please feel free to submit issues or pull requests on the project repository.
README.md
: This file, containing project documentation and usage instructions.__main__.py
: The main entry point of the script. It orchestrates the overall process of image downloading and video creation.config.json
: Configuration file storing settings such as URLs, paths, and notification preferences.image_dup.py
: Utility script to create duplicate images for testing.requirements.txt
: Lists all Python package dependencies required for the project.setup.sh
: Shell script to set up the project environment and install dependencies.vla.sh
: Shell script to run the main Python script, using tmux.vla_config.py
: Manages loading and parsing of the configuration fromconfig.json
.vla_core.py
: Contains core functionality for image processing, video creation, and audio handling.