Skip to main content

Clips AIは、長い動画を自動的にクリップに変換するオープンソースのPythonライブラリです(日本語専用版)

Project description

ClipsAI-JP

PyPI version License: MIT

注意: このパッケージはClipsAIの日本語専用フォーク版です。whisperxfaster-whisperに置き換え、依存関係の問題を解決しています。

クイックスタート

Clips AIは、長い動画を自動的にクリップに変換するオープンソースのPythonライブラリです。数行のコードで、動画を複数のクリップに分割し、アスペクト比を16:9から9:16にリサイズできます。

注意: Clips AIは、ポッドキャスト、インタビュー、スピーチ、説教などの音声中心のナラティブ動画向けに設計されています。

完全なドキュメントについては、Clips AI Documentationをご覧ください。 このライブラリで生成されたクリップのUIデモもご確認いただけます。

インストール

前提条件:

  • Python >= 3.9
  • libmagic(Windows: pip install python-magic-bin、Mac: brew install libmagic
  • ffmpeg(Windows: ffmpeg.orgからダウンロード、Mac: brew install ffmpeg

推奨: 依存関係の競合を避けるため、仮想環境(venvなど)の使用を強く推奨します。

pip install clipsai-jp

オプショナル依存関係:

  • GPUメモリ監視: pip install clipsai-jp[gpu]
  • 開発・テスト用: pip install clipsai-jp[dev]

クリップの作成

from clipsai_jp import ClipFinder, Transcriber

transcriber = Transcriber()
transcription = transcriber.transcribe(audio_file_path="/abs/path/to/video.mp4")

clipfinder = ClipFinder()
clips = clipfinder.find_clips(transcription=transcription)

print("StartTime: ", clips[0].start_time)
print("EndTime: ", clips[0].end_time)

文字起こしはfaster-whisperを使用して行われます。

動画のリサイズ

from clipsai_jp import resize

crops = resize(
    video_file_path="/abs/path/to/video.mp4",
    pyannote_auth_token="pyannote_token",
    aspect_ratio=(9, 16)
)

print("Crops: ", crops.segments)

話者分離にPyannoteが使用されるため、Hugging Faceのアクセストークンが必要です(無料)。手順についてはPyannote HuggingFaceページを参照してください。

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

clipsai_jp-1.0.1.tar.gz (74.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clipsai_jp-1.0.1-py3-none-any.whl (80.4 kB view details)

Uploaded Python 3

File details

Details for the file clipsai_jp-1.0.1.tar.gz.

File metadata

  • Download URL: clipsai_jp-1.0.1.tar.gz
  • Upload date:
  • Size: 74.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for clipsai_jp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1116d431ca060cb065edb62137572e7d19ffb90f8ecbbcc5472997e439513cc8
MD5 78caca87ebfd33cc75ca6a0239e640e1
BLAKE2b-256 b96d050685856c80f656608c8dd93178096ec151af62f34f110c428471127ab5

See more details on using hashes here.

Provenance

The following attestation bundles were made for clipsai_jp-1.0.1.tar.gz:

Publisher: python-publish.yml on enprocode/clipsai-jp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clipsai_jp-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: clipsai_jp-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 80.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for clipsai_jp-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 46162000d88ab41aaf336ed94660a6e151694e074a95e39c7632ee8d8401c51e
MD5 450224a30cff78b44b66810974087d1e
BLAKE2b-256 07054e83a7f3bf54386d697b8f910eeab702876a3c0583e889e13c5ebe52e962

See more details on using hashes here.

Provenance

The following attestation bundles were made for clipsai_jp-1.0.1-py3-none-any.whl:

Publisher: python-publish.yml on enprocode/clipsai-jp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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