Adds server-side image safety check to ensure users upload pet photos instead
of human images. Uses NudeNet with 0.5 confidence threshold and fail-open
behavior. Frontend shows loading state during analysis and error UI when
humans are detected.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add profanity detection using better-profanity library with:
- Real-time API validation during typing (500ms debounce)
- Defense-in-depth server-side validation on form submission
- Visual feedback with red borders and warning message
- Submit button disabled when profanity detected
- Fail-open behavior on API errors to not block users
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Allows frontend to access the MP3 audio URL as soon as download
completes, even while video generation is still in progress.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove process_pending_queue and check_credits scheduled tasks
- Add check_submission_timeout task for per-submission timeout handling
- Modify send_to_sonauto to schedule timeout check after successful API call
- Reduce check_timeouts frequency to 30min (safety net only)
- Update submissions endpoint to use apply_async with better error logging
- Remove unused config settings (QUEUE_PROCESSOR_INTERVAL, CREDITS_CHECK_INTERVAL)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Route create_video task to dedicated 'video' queue with concurrency=2.
Default worker now has concurrency=10 for all other tasks.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change frame format from PNG to JPEG (quality 85) for faster encoding
- Use mjpeg input codec instead of png for FFmpeg
- Change preset from 'faster' to 'superfast' for quicker encoding
Trade-off: ~20-30% larger file size for significantly faster generation.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add composite PNG generation (vinyl record + pet photo with transparent
background, no needle) saved to storage/images/. The results API now
returns record_image_url pointing to the composite or default-record.png
for submissions without a user photo.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Users can now submit the form without uploading a photo. When no photo is
provided, the video will display the default "Pet Love Songs" record instead
of a pet image in the vinyl center.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Triggers send_to_sonauto.delay() right after creating a submission,
eliminating up to 60 seconds of wait time. The periodic task remains
as a fallback for edge cases (Celery unavailable, immediate dispatch fails).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace communicate() with stderr.read() + wait() after manually
closing stdin. communicate() tries to flush stdin internally which
fails when stdin is already closed.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace backend proxy streaming endpoint with direct access to
Sonauto's public streaming URL (api-stream.sonauto.ai). This
simplifies the architecture and reduces latency.
- Update waiting.php to use task_id from status API response
- Add autoplay attribute to audio element per Sonauto docs
- Remove stream.py proxy router (no longer needed)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>