Skip to main content

Automated Korean short-form history videos: topic selection, Korean narration, TTS, and 1080x1920 ffmpeg rendering.

Project description

araboja-shorts (아라보자 쇼츠)

Python CI CodeQL License: MIT Release downloads

araboja-shorts is a Python pipeline for generating Korean short-form videos about ancient artifacts, archaeological sites, and ancient-civilization mysteries — from topic selection to a finished, subtitled 1080x1920 video.

Formerly published as shorts_test. Renamed after the original araboja shorts project it grew out of; old links redirect here.

The script builds a roughly 60-second vertical video by selecting a topic from public web sources, drafting a Korean narration with OpenAI, collecting public-source imagery, generating TTS audio, rendering scenes with ffmpeg, burning subtitles, and cleaning intermediate files.

flowchart LR
    A[Topic selection<br/>Wikipedia / trends] --> B[Korean script<br/>OpenAI]
    B --> C[Images<br/>Wikimedia Commons]
    B --> D[TTS narration<br/>OpenAI]
    C --> E[ffmpeg render<br/>1080x1920 + subtitles + BGM]
    D --> E
    E --> F[final.mp4<br/>+ attribution metadata]

Demo

A sample araboja shorts video, in the format this pipeline produces:

Sample araboja shorts video

What It Does

  • Selects archaeology and ancient-mystery topics from Wikipedia and trend sources.
  • Generates a Korean short-form script with scene-level narration.
  • Collects images from Wikimedia Commons, with optional Pexels and Pixabay fallback.
  • Creates OpenAI TTS narration.
  • Renders 1080x1920 video scenes with title overlays, zoom/pan motion, subtitles, and BGM.
  • Keeps the final output, generated script, and source images while cleaning temporary media files.

Requirements

  • Python 3.10+
  • ffmpeg and ffprobe available on PATH, or pass --ffmpeg_path
  • An OpenAI API key
  • A local BGM file at bgm_no_attrib/mystery.mp3
  • Optional API keys for Pexels and Pixabay image fallback

Install as a package (provides the araboja-shorts command):

python -m pip install git+https://github.com/drchamchi2-oss/araboja-shorts

Or from a local checkout:

python -m pip install .

Or install only the runtime dependencies:

python -m pip install -r requirements.txt

For development and CI-equivalent checks:

python -m pip install -r requirements-dev.txt

Create a local .env file from the example:

copy .env.example .env

Then edit .env and add your own keys. Do not commit .env.

Usage

araboja-shorts run --verbose

Or run the module directly from a source checkout:

python main_gpt.py run --verbose

To check topic and script generation without rendering video, audio, or images:

python main_gpt.py run --dry_run --verbose

If ffmpeg is not on PATH:

python main_gpt.py run --ffmpeg_path C:\ffmpeg\bin\ffmpeg.exe --verbose

Generated files are written under out_araboza/. Full runs write final.mp4, script.json, media_attribution.json, and selected source images. Dry runs write script.json and media_attribution.json.

Development Checks

Run the local checks before opening a pull request:

python -m py_compile main_gpt.py shorts_media.py shorts_rendering.py scripts/doctor.py
python -m pytest
python -m bandit -r main_gpt.py shorts_media.py shorts_rendering.py scripts -x tests -ll
python -m pip_audit -r requirements.txt

The GitHub Actions workflow runs the same syntax, test, static security, and dependency-audit checks on pull requests and pushes to main.

To check local runtime prerequisites before generating a video:

python scripts/doctor.py

Configuration

Required environment variable:

OPENAI_API_KEY=your_openai_api_key

Optional environment variables:

PEXELS_API_KEY=your_pexels_api_key
PIXABAY_API_KEY=your_pixabay_api_key

The repository intentionally does not include private keys, generated videos, local cache files, or BGM assets. Use only media that you are allowed to use and redistribute.

Media And Licensing

Review docs/media-and-licensing.md before publishing generated videos or adding new media providers.

Releases

Use docs/release-checklist.md before tagging a public release.

Project Status

This project is early-stage OSS. The current goal is to make the single-file workflow reproducible, inspectable, and easier to maintain.

See ROADMAP.md for the current maintenance plan and near-term issues.

Known limitations:

  • The script depends on live web APIs and external media sources.
  • Output quality depends on available images, API responses, and local ffmpeg setup.
  • BGM licensing is the user's responsibility.
  • The generated script should be reviewed before publishing videos publicly.

Security

Never commit API keys, .env, generated credentials, private logs, private datasets, or paid/proprietary media assets. See SECURITY.md for reporting guidance.

Contributing

Focused issues and pull requests are welcome. See CONTRIBUTING.md before opening a PR.

License

MIT. See LICENSE.

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

araboja_shorts-0.2.0.tar.gz (27.9 kB view details)

Uploaded Source

Built Distribution

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

araboja_shorts-0.2.0-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

Details for the file araboja_shorts-0.2.0.tar.gz.

File metadata

  • Download URL: araboja_shorts-0.2.0.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for araboja_shorts-0.2.0.tar.gz
Algorithm Hash digest
SHA256 45f1687dd50155abf4ed885243294e3f4e4cea215e272aae8cf6d95b3657cd9e
MD5 b988f6c14a8b4518534956c7adeee5da
BLAKE2b-256 4152936334942a18b5f394d2b703fead2e68639f4bb4ca31e6f8d68e7f2cc54b

See more details on using hashes here.

Provenance

The following attestation bundles were made for araboja_shorts-0.2.0.tar.gz:

Publisher: pypi-publish.yml on drchamchi2-oss/araboja-shorts

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

File details

Details for the file araboja_shorts-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: araboja_shorts-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 27.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for araboja_shorts-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5cf35efae907e8ab244dc7db75a83a03cfe123990441986f4fe844fc6565ff2
MD5 82297bb7b6acae7ad2625b6fa53861e1
BLAKE2b-256 f01e3c8c0c2a7ec413f14a24abd14a60a6ad795afe5e94800a438a55b92b6b90

See more details on using hashes here.

Provenance

The following attestation bundles were made for araboja_shorts-0.2.0-py3-none-any.whl:

Publisher: pypi-publish.yml on drchamchi2-oss/araboja-shorts

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