https://github.com/healeycodes/py-looper
Create long videos from a loopable audio track and a static image - resulting in a video file that dynamically stretches to never cut off your track :heart:.
https://github.com/healeycodes/py-looper
Last synced: about 1 year ago
JSON representation
Create long videos from a loopable audio track and a static image - resulting in a video file that dynamically stretches to never cut off your track :heart:.
- Host: GitHub
- URL: https://github.com/healeycodes/py-looper
- Owner: healeycodes
- License: mit
- Created: 2018-07-28T21:49:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-21T13:00:22.000Z (over 7 years ago)
- Last Synced: 2024-10-05T17:42:32.326Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 120 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## py-looper
Create long videos from a loopable audio track and a static image - resulting in a video file that dynamically stretches to never cut off your track :heart:.
### Pre-installation
python - https://www.python.org. Tested with Python v3.6.5 (and assumed to not work with versions prior to this). Python is packaged with Mac OS X and Linux but not Windows. Check your Python version if you run into issues (`python -v`).
ffmpeg - https://www.ffmpeg.org/ - is required but should be installed automatically if not present. It's also packaged with some OSes and other programs often require it.
pip - https://pip.pypa.io/en/stable/installing/ - is required. It's the standard Python package manager and is sometimes installed during Python's installation.
### Installation
Navigate to the py-looper folder via terminal or cmd `cd py-looper`
Install dependencies via `pip install -r requirements.txt`.
### Running
`cd py-looper`
`python main.py [image] [audio] [min_length] [movie_name]`
e.g., `python main.py my_image.png my_audio.mp3 1.0 my_movie` creates `[movie_name].mp4` in the py-looper directory.
The resulting video file will have the same dimensions as the supplied `[image]`.
Spaces in these arguments will require the argument to be passed with `'` single quote marks on most terminals. E.g., `'My Image File.png'`. Remember you can use tab to autocomplete image/audio filenames and locations.
#### `[image]`
Any picture file (png, tiff, jpeg, etc.)
#### `[audio]`
Any audio file that loops perfectly.
#### `[min_length]`
Formatted as `Minutes.Seconds`. One minute is `1.0`. Thirty seconds is `0.30`. Note: the preceding `0.` is required when specifiying a time less than one minute.
The program will loop the audio file until the resulting video is at least as long as the min_length parameter.
#### `[movie_name]`
Any string, e.g., `hello` or `test-123`. The file will be saved as MP4.
#### `[location]` (not required)
`python main.py [image] [audio] [min_length] [movie_name] [location]`
A directory path to save the video to. E.g., `C:/videos`. Can be set to an empty string like `''` or `""`. Folders will be created recursively. This argument is not required to create videos but without it the files will be saved whereever you launched the script from.