Skip to content

Add sample video generator, website CLI/local server, and HLS publish fallback with tests - #1

Merged
Bowenislandsong merged 2 commits into
mainfrom
codex/create-working-prototype-with-tests
Apr 2, 2026
Merged

Add sample video generator, website CLI/local server, and HLS publish fallback with tests#1
Bowenislandsong merged 2 commits into
mainfrom
codex/create-working-prototype-with-tests

Conversation

@Bowenislandsong

Copy link
Copy Markdown
Member

Motivation

  • Provide a small synthetic MP4 generator and scripts for publishing and locally serving website preview content for prototype validation.
  • Improve website publisher resilience by preferring HLS playlists but falling back to MP4 or copying the original when conversion isn't available.
  • Expose CLI utilities and ensure tests exercise video tooling and publisher fallback behavior.

Description

  • Added a tiny synthetic video tool at src/studio/tools/generate_sample_video.py and a script scripts/publish_sample_movie.py that generates a sample clip and publishes it via the website publisher API.
  • Added a local static server script scripts/run_website_local.py to serve the generated website/public directory for previews.
  • Added src/studio/website/cli.py providing publish and list subcommands for interacting with the MoviePublisher from the command line.
  • Updated src/studio/website/publisher.py to prefer hls/stream.m3u8, then hls/stream.mp4, and finally copy the direct source video if neither HLS output is present.
  • Added top-level package marker src/__init__.py and updated pyproject.toml to include . in pytest pythonpath for tests.
  • Added automated tests: tests/test_sample_video_tool.py, tests/test_website_publisher.py, and tests/test_media_video.py to cover generation and publisher fallback logic.

Testing

  • Ran the test suite with pytest -q targeting the added tests tests/test_sample_video_tool.py, tests/test_website_publisher.py, and tests/test_media_video.py.
  • All added tests passed successfully.

Codex Task

@Bowenislandsong
Bowenislandsong merged commit 96427b9 into main Apr 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant