Video clip tool (v1.8.3-video-mgmt) #13

Merged
ngu-git-admin merged 7 commits from feature-tools into main 2026-09-29 03:38:40 +01:00

Adds Admin → Tools → Video clips (admins and up).

  • Paste a YouTube or Facebook link; the server downloads it with yt-dlp (up to 4 h / 4 GB) and ffmpeg cuts clips.
  • Start/end set while watching or typed; shape as filmed, 16:9, square or 9:16 with a movable crop; MP4 or MP3.
  • One job at a time with progress. Clips are deleted once downloaded unless saved to the media library (which now holds video and audio). Everything is swept after a day.
  • yt-dlp can sign in with cookies (YTDLP_COOKIES or YTDLP_COOKIES_FROM_BROWSER) when YouTube asks.
  • Clear errors when the cookies file, the clips folder or a library save can't be used.

Migration 036. Tags: v1.8.1, v1.8.2, v1.8.3-video-mgmt.

Deploy: install ffmpeg and yt-dlp on the VPS, create /var/lib/ngu/clips, set CLIPS_DIR, add the nginx clips block (docs/video-clips.md).

Not yet checked in a browser.

🤖 Generated with Claude Code

Adds Admin → Tools → Video clips (admins and up). - Paste a YouTube or Facebook link; the server downloads it with yt-dlp (up to 4 h / 4 GB) and ffmpeg cuts clips. - Start/end set while watching or typed; shape as filmed, 16:9, square or 9:16 with a movable crop; MP4 or MP3. - One job at a time with progress. Clips are deleted once downloaded unless saved to the media library (which now holds video and audio). Everything is swept after a day. - yt-dlp can sign in with cookies (YTDLP_COOKIES or YTDLP_COOKIES_FROM_BROWSER) when YouTube asks. - Clear errors when the cookies file, the clips folder or a library save can't be used. Migration 036. Tags: v1.8.1, v1.8.2, v1.8.3-video-mgmt. Deploy: install ffmpeg and yt-dlp on the VPS, create /var/lib/ngu/clips, set CLIPS_DIR, add the nginx clips block (docs/video-clips.md). Not yet checked in a browser. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ngu-git-admin added 7 commits 2026-09-29 03:37:07 +01:00
Tools → Video clips (migration 036, admins and up). Paste a YouTube
or Facebook link and the server downloads it with yt-dlp; then cut
clips: start and end set while watching, a shape (as filmed, 16:9,
square or 9:16 at the sizes the platforms ask for, cropped around a
chosen point shown over the video), and MP4 video or MP3 audio.

Jobs queue and run one at a time with progress. Only YouTube and
Facebook links are accepted, and both tools run with argument lists,
never a shell. A clip's file is deleted once it has been downloaded
in full, unless it's saved to the media library first, which now
holds video and audio (image fields still pick images only).
Everything is swept a day after it's made. Setup is in
docs/video-clips.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When YouTube answers the server with "sign in to confirm you're not a
bot", yt-dlp needs a signed-in account's cookies. YTDLP_COOKIES points
at an exported cookies.txt, copied per download so the original is
never rewritten; YTDLP_COOKIES_FROM_BROWSER passes yt-dlp's
--cookies-from-browser for a browser on the server. Setup, and the
advice to use a separate account, is in docs/video-clips.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Couldn't read the cookies file" covered both a file the service
can't read and a clips folder it can't write its copy into. Each now
has its own message naming the setting (YTDLP_COOKIES or CLIPS_DIR)
and the cause: missing, or not allowed for the service's user.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Save to library could only answer "Something went wrong". Each step
(making the uploads folder, copying the clip in, reading its size,
adding its media row) now names itself and the cause when it fails,
and a half-finished save removes the copied file so the uploads
folder never holds a file without its row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ngu-git-admin merged commit 9d8de0176e into main 2026-09-29 03:38:40 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ngu-git-admin/NGU-Web#13
No description provided.