Personal open-source project

Twitch Auto Clipper

A local Python application that turns Twitch VOD material into short vertical videos. It is designed for personal automation and runs its processing pipeline on the user's computer.

How it works

  1. Acquire

    Accept a local video, process one finished Twitch VOD on request, or monitor popular English Twitch live streams through the Twitch API and process the VOD after a stream has ended: only its audio and chat replay are downloaded, and each Short reads its few seconds of video from Twitch.

  2. Understand

    Transcribe audio with faster-whisper and retain segment and word timestamps.

  3. Select

    Generate explainable heuristic candidates from the transcript, attach a short chat activity summary, and ask Gemini to choose the best moments.

  4. Render

    Create a 1080x1920 vertical clip with CPU-friendly framing and optional ASS subtitles.

  5. Publish

    Upload generated Shorts to the operator's own YouTube channel through OAuth 2.0, either with an explicit upload command or, when the operator enables it, automatically as private videos. This is the only social publishing integration currently implemented.

YouTube API Services usage

The current application uses the official YouTube Data API v3 only to upload videos to the operator's own channel. The code calls youtube.videos.insert with the snippet and status parts, using a resumable upload. There are two ways to upload:

The video ID returned by YouTube is saved in a local manifest with its URL. A generated local Short is deleted only after YouTube has returned that video ID and it has been recorded; on any failure the file is kept and the error is reported. Source VODs, transcripts and chat files are never deleted by the application.

Authorization uses OAuth 2.0 with https://www.googleapis.com/auth/youtube.upload for uploads. If YOUTUBE_EXPECTED_CHANNEL_ID is configured, the application also requests https://www.googleapis.com/auth/youtube.readonly and uses youtube.channels.list to verify the authorized channel before upload. The first local authorization opens a browser. The application stores the resulting token in a local ignored file and refreshes it when possible. It does not read analytics, comments, likes, subscriptions, or other YouTube resources.

Uploads only happen when the operator runs the upload command or explicitly enables automatic private uploads. The application does not automate views, likes, comments, subscriptions, or other artificial engagement. It uses YouTube API Services subject to the applicable Google and YouTube policies; it is not audited or approved by YouTube.

Official references: YouTube Data API, Developer Policies, API Services Terms, videos.insert, and Quota and compliance audits.

Privacy

Read what the local application processes, stores, and sends to third-party APIs.

Privacy Policy

Terms

Review the conditions for using the software and content rights responsibilities.

Terms of Use

Channel

The intended YouTube destination is LiveActions!.

Contact

For questions about this project or its privacy practices, contact aymeric.leclerre@gmail.com.