video creation api, creating a video incl. subtitles and audio, given a script
2.3K
https://github.com/JustinGuese/docker-video-audio-generator-api
Similar to https://github.com/harry0703/MoneyPrinterTurbo/blob/main/README-en.md, I want to generate a Video with subtitles and voiceover given a script.
Example Result:
MoneyPrinterTurbo did some things inefficiently, so I want to improve upon it.
For starters, the videos are cached on disk, instead of loading them from pixabay every time.
copy the .env.example to .env and fill in the PIXABAY_API_KEY. you can get it for free at https://pixabay.com
docker-compose up
image: https://hub.docker.com/repository/docker/guestros/video-generation-api/
poetry install
for the api
poetry run uvicorn main:app --reload
for the python script have a look at src/createVideo.py
e.g. poetry run python src/createVideo.py
i have included a vscode launch.json in which you can switch between file and api (uvicorn) mode easily.
fill in the .env file as described above, and generate the pixybay secret with:
kubectl create namesapce video-creator
kubectl create secret generic pixabay-secret --from-env-file=.env -n video-creator
and then apply the k8s files with
kubectl apply -f kubernetes/
the app allows to create videos in two ways. one is using the api, and the other is using the python script.
The api is accessible at http://localhost:8000/docs
OpenApi Spec: openapi.json

check out src/createVideo.py for an example of how to use the api.
script = """Adobe is set to enhance video editing with the upcoming Firefly Video Model, streamlining creative workflows in Premiere Pro. Mistral's launch of the Pixtral 12B multimodal model marks a significant advance in AI capabilities, particularly for those looking to integrate image and text processing."""
createFullVideo("ApnJY3tXITXxQg", script, "technology")
it will create three folders
Content type
Image
Digest
sha256:72d8b2f8c…
Size
376.5 MB
Last updated
about 2 years ago
docker pull guestros/video-generation-api