Skip to main content

Video Killed The Radio Star

Project description

Video Killed The Radio Star Open In Colab

Requirements

FAQ

What is this?

TLDR: Automated music video maker, given an mp3 or a youtube URL

How does this animation technique work?

For each text prompt you provide, the notebook will...

  1. Generate an image based on that text prompt (using stable diffusion)
  2. Use the generated image as the init_image to recombine with the text prompt to generate variations similar to the first image. This produces a sequence of extremely similar images based on the original text prompt
  3. Images are then intelligently reordered to find the smoothest animation sequence of those frames
  4. This image sequence is then repeated to pad out the animation duration as needed

The technique demonstrated in this notebook was inspired by a video created by Ben Gillin.

How are lyrics transcribed?

This notebook uses openai's recently released 'whisper' model for performing automatic speech recognition. OpenAI was kind of to offer several different sizes of this model which each have their own pros and cons. This notebook uses the largest whisper model for transcribing the actual lyrics. Additionally, we use the smallest model for performing the lyric segmentation. Neither of these models is perfect, but the results so far seem pretty decent.

The first draft of this notebook relied on subtitles from youtube videos to determine timing, which was then aligned with user-provided lyrics. Youtube's automated captions are powerful and I'll update the notebook shortly to leverage those again, but for the time being we're just using whisper for everything and not referencing user-provided captions at all.

Something didn't work quite right in the transcription process. How do fix the timing or the actual lyrics?

The notebook is divided into several steps. Between each step, a "storyboard" file is updated. If you want to make modifications, you can edit this file directly and those edits should be reflected when you next load the file. Depending on what you changed and what step you run next, your changes may be ignored or even overwritten. Still playing with different solutions here.

Can I provide my own images to 'bring to life' and associate with certain lyrics/sequences?

Yes, you can! As described above: you just need to modify the storyboard. Will describe this functionality in greater detail after the implementation stabilizes a bit more.

This gave me an idea and I'd like to use just a part of your process here. What's the best way to reuse just some of the machinery you've developed here?

Most of the functionality in this notebook has been offloaded to library I published to pypi called vktrs. I strongly encourage you to import anything you need from there rather than cutting and pasting function into a notebook. Similarly, if you have ideas for improvements, please don't hesitate to submit a PR!

Dev notes

installing unreleased package in colab:

!pip install --upgrade setuptools build
!git clone --branch hf https://github.com/dmarx/video-killed-the-radio-star/
!cd video-killed-the-radio-star;  python -m build; python -m pip install .[api,hf]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vktrs-0.1.6.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

vktrs-0.1.6-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file vktrs-0.1.6.tar.gz.

File metadata

  • Download URL: vktrs-0.1.6.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for vktrs-0.1.6.tar.gz
Algorithm Hash digest
SHA256 bad44500ab9079c3fc63eb875d7e1848166e8cd9cfd808a215ba42c3bc532735
MD5 2412df742916d8f7b6debf4a4e90e584
BLAKE2b-256 eb7cbea274762a3c212361b9fb6adc49a294ec0226e5ab64ce8a6d29aedee8a1

See more details on using hashes here.

File details

Details for the file vktrs-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: vktrs-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for vktrs-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ea9ddba98f68e17b689caca53ecd0d7509f1f34e73108bfa0312a17ca0b9acec
MD5 81af4f918530115994779db7e7804962
BLAKE2b-256 cde4aa3defa80cd81070d3dfe796a866a80c3950feb6bc4149e2f0dc59185818

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page