diff --git a/README.md b/README.md index 4fabb24..9fdee3e 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,14 @@ OpenShorts leverages state-of-the-art AI to handle the entire content lifecycle: * **Log Streaming**: Follow the technical process with real-time log updates. * **Responsive Design**: A premium, dark-mode glassmorphism interface. +7. **📺 YouTube Studio (Full Publishing Pipeline):** + * **AI Title Generation**: Upload a video and let Gemini analyze the transcript to suggest viral, SEO-optimized titles with AI-ranked top picks. + * **Title Refinement Chat**: Iteratively refine suggested titles via a built-in chat interface — ask for more clickbait, different tone, etc. + * **AI Thumbnail Generation**: Generate professional thumbnails with optional face overlay, custom background, and extra creative instructions. + * **AI Description with Chapters**: Automatically generates a YouTube description with chapter timestamps derived from the Whisper transcript. + * **One-Click YouTube Publishing**: Publish the final video with its title, thumbnail, and description directly to YouTube via Upload-Post integration. + * **Manual Mode**: Skip video analysis and enter your own title to jump straight to thumbnail generation. + --- ## 🛠️ Requirements @@ -113,6 +121,7 @@ Open your browser and navigate to: 5. **Reframing**: AI-powered visual tracking crops clips to vertical format. 6. **Backup**: Automated silent upload of clips and metadata to AWS S3. 7. **Distribution**: One-click posting via Upload-Post API. +8. **YouTube Studio**: Full publishing pipeline — AI titles, thumbnails, descriptions with chapters, and direct YouTube upload. --- diff --git a/dashboard/src/components/ThumbnailStudio.jsx b/dashboard/src/components/ThumbnailStudio.jsx index dd1654b..5d99249 100644 --- a/dashboard/src/components/ThumbnailStudio.jsx +++ b/dashboard/src/components/ThumbnailStudio.jsx @@ -312,12 +312,21 @@ export default function ThumbnailStudio({ geminiApiKey, uploadPostKey, uploadUse }; const handleDownload = async (url) => { - const a = document.createElement('a'); - a.href = getApiUrl(url); - a.download = url.split('/').pop(); - document.body.appendChild(a); - a.click(); - document.body.removeChild(a); + try { + const response = await fetch(getApiUrl(url)); + const blob = await response.blob(); + const blobUrl = URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = blobUrl; + a.download = url.split('/').pop() || 'thumbnail.png'; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + URL.revokeObjectURL(blobUrl); + } catch (e) { + // Fallback: open in new tab if fetch fails + window.open(getApiUrl(url), '_blank'); + } }; // --- Description Generation ---