Choose size, rate and what follows when recording the editor

The editor recording had fixed settings: the canvas size at 60 fps,
always converted and imported. Recording in 4K needs a choice, and the
server shrank every video to 1080p anyway. Start recording... now opens
a dialog, and a recording always goes to the server as it is.

- The dialog holds name, resolution (Screen, 1080p, 1440p, 4K), fps
  (60 or 30), mouse pointer, sound, Convert and Import after
  conversion. Import is greyed out while Convert is off. The browser
  keeps the last choice, not the name.
- A larger resolution makes the editor draw finer while it records,
  so 4K is sharp, not stretched. It is never below the screen's own
  resolution and goes back after Stop.
- Stop always uploads. Without Convert the file only stays on the
  server. Without Import it is converted but no asset is added. Both
  are found in the video picker.
- The server keeps the original next to each MP4 for every upload, so
  Download in the video tab and the picker gives the original. Videos
  from before have none, they still download their MP4.
- A file left unconverted shows in the picker as not converted, with
  a Convert button. POST videos/{file}/convert queues it, and upload
  takes convert=0.
- The worker now caps a video at 3840x2160 instead of 1920x1080. Videos
  converted before stay as they are.

Tests:
- PHP videos.test.php: 81 checks green, with the original, convert=0,
  a later Convert and the 4K cap.
- Unit recording: 5 new, green. Red without the rule that a recording
  is never below the screen's resolution.
- e2e 67e-ii: the video tab downloads the .source.mkv, a Matroska
  file. 67f: 1440p from a 1280x800 window gives 2304x1440 at 30 fps
  without sound, kept and not imported, then converted in the picker.
  Both red with the MP4 download and without the finer drawing.
- The README names 2045 e2e checks.
- Gate on melektaus-atx: 304 files, 4699 tests green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-10-12 17:01:55 +02:00
1 parent 93190e185c
commit ba01d146e9
26 files changed
+1011 -129

No files matched your search

+4 -4
View File
@@ -7,13 +7,13 @@ declare(strict_types=1);
*
* The target is MP4 with H.264 and AAC, `yuv420p`, at a constant frame rate and with a keyframe
* every 15 frames: the editor seeks to clip starts and loops back to them, and a seek can only land
* on a keyframe quickly. The picture fits into 1920 × 1080 (1080 × 1920 standing up) and is never
* made larger than it came.
* on a keyframe quickly. The picture fits into 3840 × 2160 (2160 × 3840 standing up), so a 4K
* recording of the editor stays 4K, and is never made larger than it came.
*/
final class VideoFormat
{
public const MAX_LONG_SIDE = 1920;
public const MAX_SHORT_SIDE = 1080;
public const MAX_LONG_SIDE = 3840;
public const MAX_SHORT_SIDE = 2160;
public const MAX_FPS = 60;
public const KEYFRAME_EVERY = 15;
/** Used when a file does not say its frame rate at all. */