Add YouTube Shorts tab (C# port of amigadb-short.sh)
New "Video | Shorts" tab strip on the main page. The existing Video tab and its render pipeline are unchanged; Shorts is a new, independent workflow sharing the same render-progress/log/output controls. - Services/ShortsPipeline.cs: C# port of amigadb-short.sh rather than shelling out to bash — end users on plain Windows don't have bash/WSL, and shipping this as a native part of the app keeps distribution self-contained. All 19 visual style filtergraphs (brand, pixel, mirror, crop, workbench, blur, crt, copper, stars, grid, tiles, scan, starfield, plasma, rasterbars, vhs, monitor, split, spectrum) are copied verbatim from the bash heredocs. Per explicit decision, kept parity with the script's actual behavior where the brand-style HOOK_BOX_Y/INFO_BOX_Y/font-size variables are computed but never actually used in the final filter (dead code in the original) rather than "fixing" it and changing rendered output. Reuses ToolExtractor/MediaProbe/ProcessRunner exactly as RenderPipeline does, so FFmpeg resolution and NVENC fallback behave identically. - Models/ShortSettings.cs: job parameters + ShortStyle enum. - AppSettings gains sticky Shorts defaults (style, hook, website, font, background image, CRF, preset) alongside the existing Video defaults. - MainPage: Video/Shorts tab buttons toggle two content panels; the background-image field auto-hides for non-brand styles; font field defaults to the first bold system font found (Segoe UI Bold, Segoe UI Semibold, Arial Bold, Calibri Bold); blank output path is auto-derived from the input filename and style, matching the script's default. - 13 new unit tests (escaping order, meta-line joining, validation, every style producing a non-empty filter, the drawtext trailer's timing gates). Full run is 72/72 passing. - Fixed a bug caught during manual testing: MainPage.Resources["PrimaryButtonStyle"] looked in the Page's own (empty) resource dictionary instead of Application.Current.Resources, throwing on every tab switch. Verified end-to-end: rendered a real Short from an existing video through the actual running app (not just unit tests) and inspected extracted frames — hook/title/meta/website text overlays appear and disappear at the correct timestamps with correct styling. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,22 +4,38 @@ AmiReel is a Windows desktop app for turning Amiga (or any) screen recordings in
|
||||
|
||||
- a 4K 50 FPS final video,
|
||||
- PNG/JPG thumbnails,
|
||||
- an animated WebP preview.
|
||||
- an animated WebP preview,
|
||||
- a vertical (1080×1920, 50 FPS) YouTube Short with a styled title card.
|
||||
|
||||
Built with **WinUI 3** on the Windows App SDK, driving FFmpeg under the hood.
|
||||
Built with **WinUI 3** on the Windows App SDK, driving FFmpeg under the hood. The app has two
|
||||
tabs — **Video** (the full-length render pipeline above) and **Shorts** (see below) — sharing
|
||||
the same render progress, log, and output controls.
|
||||
|
||||
## Features
|
||||
|
||||
### Video tab
|
||||
- Multiple ordered video inputs — `.avi`, `.mp4`, `.m4v`, `.mov`, `.mkv`, `.webm`, `.wmv`, `.flv`, `.mpg`, `.mpeg`, `.ts`, `.3gp`
|
||||
- Drag-and-drop or file-picker source selection
|
||||
- 3840×2160 output at 50 FPS
|
||||
- NVIDIA NVENC with automatic CPU `libx264` fallback
|
||||
- Configurable trim, fade, end-card hold, and thumbnail interval
|
||||
- Optional end-card image
|
||||
- Optional move of source recordings into `originals/` in the output folder
|
||||
|
||||
### Shorts tab
|
||||
- Turns one source video into a vertical YouTube Short with an opening hook, title/group/year/
|
||||
type card, and closing website call-to-action, all as timed text overlays
|
||||
- 19 visual styles ported from `amigadb-short.sh` — `brand` (title card image), `pixel`,
|
||||
`mirror`, `crop`, `workbench`, `blur`, `crt`, `copper`, `stars`, `grid`, `tiles`, `scan`,
|
||||
`starfield`, `plasma`, `rasterbars`, `vhs`, `monitor`, `split`, `spectrum` (needs audio)
|
||||
— see [`Services/ShortsPipeline.cs`](Services/ShortsPipeline.cs) for the exact FFmpeg filtergraphs
|
||||
- Configurable clip start/duration, CRF, and x264 preset
|
||||
- Style, font, background image, hook, and website text are sticky across launches
|
||||
|
||||
### Shared
|
||||
- NVIDIA NVENC with automatic CPU `libx264` fallback
|
||||
- Live render progress with frame counters and FFmpeg log output
|
||||
- Source and final-render preview (built-in or a custom player)
|
||||
- Dark and light themes
|
||||
- Optional move of source recordings into `originals/` in the output folder
|
||||
- Optional custom `ffmpeg.exe` / `ffprobe.exe` paths, with automatic detection from `PATH`
|
||||
- Self-contained single-file publish for easy distribution
|
||||
|
||||
@@ -37,11 +53,13 @@ app.manifest Win32 manifest (DPI awareness, OS compatibility)
|
||||
Assets/ Packaged app icons and tiles (all required sizes)
|
||||
branding/ Source artwork the Assets/ tiles are generated from
|
||||
Models/
|
||||
AppSettings.cs Persisted user settings
|
||||
RenderSettings.cs Render job parameters
|
||||
AppSettings.cs Persisted user settings (Video + Shorts defaults)
|
||||
RenderSettings.cs Video render job parameters
|
||||
ShortSettings.cs Shorts render job parameters, ShortStyle enum
|
||||
SupportedVideoFormats.cs Accepted input file extensions
|
||||
Services/
|
||||
RenderPipeline.cs Main render workflow (FFmpeg orchestration)
|
||||
RenderPipeline.cs Video render workflow (FFmpeg orchestration)
|
||||
ShortsPipeline.cs Shorts render workflow; the 19 style filtergraphs live here
|
||||
ProcessRunner.cs FFmpeg process execution and progress parsing
|
||||
FfmpegProgressParser.cs Parses time=/frame=/fps=/speed= from FFmpeg output lines
|
||||
FfmpegOutputFilter.cs Shared FFmpeg banner/boilerplate line filtering
|
||||
@@ -55,6 +73,7 @@ Properties/
|
||||
launchSettings.json
|
||||
PublishProfiles/ win-x64/x86/arm64 publish profiles
|
||||
AmiReel.Tests/ Unit tests (MSTest), mirrors Models/ and Services/
|
||||
amigadb-short.sh Original bash/FFmpeg script that ShortsPipeline.cs is a C# port of
|
||||
ThirdParty/ Embedded ffmpeg.exe / ffprobe.exe (not checked in, see below)
|
||||
publish-win-x64.ps1 Publish script
|
||||
```
|
||||
@@ -85,7 +104,8 @@ dotnet run --project .\AmiReel.csproj
|
||||
|
||||
Unit tests live in `AmiReel.Tests/` (MSTest), covering the pure logic in `Models/` and
|
||||
`Services/` — settings normalization, supported-format detection, FFmpeg output parsing/
|
||||
filtering, render-settings validation, and moving source files into `originals/`.
|
||||
filtering, render-settings validation, moving source files into `originals/`, and the Shorts
|
||||
filtergraph/escaping/validation logic.
|
||||
|
||||
```powershell
|
||||
dotnet test .\AmiReel.Tests\AmiReel.Tests.csproj
|
||||
@@ -151,8 +171,9 @@ User settings are stored in:
|
||||
```
|
||||
|
||||
This includes: output folder, end-card path, FFmpeg/preview-player paths, theme, encoder
|
||||
selection, timing settings, and whether source videos are moved into `originals/` after a
|
||||
successful render.
|
||||
selection, timing settings, whether source videos are moved into `originals/` after a
|
||||
successful render, and the Shorts tab's sticky defaults (style, font, background image, CRF,
|
||||
preset, hook, and website text).
|
||||
|
||||
## Notes for Distribution
|
||||
|
||||
|
||||
Reference in New Issue
Block a user