/autovideocreation

a short test to combine the creativity of context, picture and video creation

Primary LanguagePythonApache License 2.0Apache-2.0

Autovideocreation

a short test to combine the creativity of context, picture and video creation with ready build tools!

The offered code exemplifies an original method for producing a video with visuals and narration from a given key-word or short sentence. To come up with suggestions for keywords and ideas from DALL-E API calls, it makes also use of OpenAI's GPT-3.5-turbo API. The ElevenLabs API is than used to record narration to go along with the video scenes. After that, the photos and voiceovers are combined in a movie using a zoom effect. Using this method, you may easily generate interesting material for your blog entries, lessons, or presentations.

This code is purely for testing - you need to manually cleanup your directory for the next run. I just want to keep all the old files.

My Example of a sunset on the beach

How to use the Python script:

  1. Install ffmpeg on your system first - I am using a python module which makes use of ffmpeg.

  2. Install Python libraries:

pip install imageio pillow requests pydub openai elevenlabs
  1. in line 12+13 provide your keys:
openai.api_key = "Set-your-OpenAI-API-Key-Here"
set_api_key("Set-Your-Elevenlabs-API-KEy Here")
  1. And do not forget to change you key-word or small phrase:
# Set the creation of the phrase or word
creation = "sunset on the beach"
  1. You may alter the OpenAPI Prompts as you wish :-) - I did a comment in the code. I did not spent too much time in highly sphisticated prompt engineering - it is just a PoC
  2. And than: you are ready to start :-)

Enjoy!!