Skip to main content

automatically generate clips from VODs!

Project description

automatically generate clips from VODs!

example

pip install auto-highligher

  • you must have ffmpeg installed!
  • python 3.11+
  • free disk space of at least 2GB is recommended

usage

# analyzing a video and generating clips is easy!
auto-highlighter analyze -i "PATH/TO/VIDEO" 
# OR
python -m highlighter analyze -i "PATH/TO/VIDEO"

Use the --help option to see what else you can do! It is very customizable.

adjusting to get the best results

auto-highlighter will highlight moments of a given VOD based on how loud a specific point in the video is. By default, It is set to 85.0dB and if a moment goes past this value it will be highlighted.

However this is different across each video. So if needed, you can adjust the target decibel using -t <DECIBEL> option. If you don't know what target decibel to aim for, using the find-reference command will give you information about the average decibel of the video, and the greatest decibel found.

# find a target decibel
auto-highligher find-reference -i "PATH/TO/VIDEO"
# OR
python -m highlighter find-reference -i "PATH/TO/VIDEO"

TL:DR: use this command if the highlighter is creating too many, or too little clips. this will tell you the recommended target decibel to set.

:O how does it work?

The highlighter works by finding the loudest points of a given video. When a point
of a video exceeds a given target dB (default: 85.0dB), it counts that as a
clip and will compile that into a 30 seconds video.

All generated videos will automatically be outputted to a directory called ./highlights.
This directory will be created in the location where you called the command. You can also specifiy where the highlighter should output videos by using the --output, -o option.

You can also use another detection method with video! The way this method works is by taking the brightest moments of a video and creating a clip out of that too. You can also adjust the target luminance.

the tech behind it

Python 3.11+, Poetry (Package Management), FFMpeg (Video Conversion, and Generation)

Python is the programming language of choice for this project. It was very simple to use and allowed me to make this software very quickly. Poetry is used to easily publish this package to PyPI and use it in a virtual environment. FFMpeg is used on the command line to convert video to audio (for analysis) and to generate clips from highlights.

to-do

  • Optimize decibel algorithm.
  • Implement threading for clip generation.
  • Add watch function, which can be used to create clips from ongoing streams.

ML-Based clip detection (AI)

Using Machine Learning as a means of clip detection can be done. Using my clips and it's luminance and wave data as a means of clip detection. May do this soon.

roadmap

  • I am currently switching to rust as an alternative!
  • GUI support is on the way.
  • Documentation.

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

auto_highlighter_py-0.0.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

auto_highlighter_py-0.0.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file auto_highlighter_py-0.0.1.tar.gz.

File metadata

  • Download URL: auto_highlighter_py-0.0.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Windows/10

File hashes

Hashes for auto_highlighter_py-0.0.1.tar.gz
Algorithm Hash digest
SHA256 22f2881df8137acdbff0f3ab97175051643ea763b0fccfc5fe9126425733769d
MD5 25fa3487211c26818d8971fad20565ed
BLAKE2b-256 e982ffc070eaf6c562845cd31530c65de35a14aa8b0d5b9811f589e0c190a69c

See more details on using hashes here.

File details

Details for the file auto_highlighter_py-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for auto_highlighter_py-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c3d40e183625a92a6b9a468e1ee4653b99262f081745176e872b5302386add0a
MD5 2283edc8d1899b4ec08e1c753c4e84cd
BLAKE2b-256 39a8829d7bb97ab8fbf44b26818e40356b35a1c10a2756d0dc91888d60d2669f

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