Skip to content

feat(clip): Mark this frame opens the frame shown in Annotate - #1688

Open
lightscape-jm wants to merge 1 commit into
KnifeLemon:mainfrom
lightscape-jm:feat/mark-frame-1205
Open

lightscape-jm wants to merge 1 commit into
KnifeLemon:mainfrom
lightscape-jm:feat/mark-frame-1205

Conversation

@lightscape-jm

Copy link
Copy Markdown
Contributor

What does this change?

Part of #1205, step 2 of the three agreed there: Mark this frame. In Cut a clip, a Mark this frame (F) button
under the large picture opens the frame shown in Annotate, at the size the video is shown at. The marked copy is saved
next to the video, as Site walk 0m04.700s Annotated.png.

Cut a clip with Mark this frame under the picture, Annotate open on frame 141, and the marked copy saved next to the video

For the user

  1. Find the moment in Cut a clip, at the playhead or on the start or end handle (S, E, P as before).
  2. Click Mark this frame or press F. While the clip plays, it pauses first, on the frame shown.
  3. Annotate opens over the window on that frame, named after the video and the frame's time to the millisecond, so
    frames of variable frame rate video can't be mixed up. Cut a clip stays open: marking another frame while Annotate
    is open adds it as the next picture ("1 of 2"), so the one being marked isn't lost.
  4. Save writes <video> <time> Annotated.png next to the video, by Annotate's own output rules.

The time beside Play now shows the time of the frame in the picture. The label that sat on the picture ("Playhead
1:43.4", "Start 1:35.3") is gone, so nothing covers the frame, which matters most on portrait phone video, where it
covered a large part of it. The time beside Play reads the playhead's time as before, or the start's or end's while
that handle is chosen, tinted like that field. A screen reader still hears "Start 1:35.3", and the tooltip says it
too, so the tint isn't the only sign. For a sound, which has no picture, it stays the playhead's.

The frame. A PNG from the same seek as the window's picture (#1575), so it is the frame shown: square pixels,
turned upright, full size. An HDR video's frame gets ordinary colours as a Live Photo's does, where FFmpeg has
zscale, going straight from the tone map to RGB so it keeps its full colour detail; where FFmpeg has no zscale,
the frame is still taken and Annotate says under it that its colours may look washed out (the "warn" agreed in #1205).

Its file. Each frame is written into a work folder of its own, named like a job's, so the sweep after a crash takes
it. Annotate saves next to the video, not next to the frame, and never treats the frame as an original to replace or
move to the Trash. A frame is deleted once its marked copy is saved, cancelled or skipped, when Annotate closes with it
unsaved, and when Filee quits; one whose save failed stays for Try again until Filee quits. A frame whose folder can't
be deleted yet (on Windows, while a program still has the file open) is tried again, at the latest when Filee quits. A
frame still being taken opens when Save or Skip moves on and after Save on the last video (also once a summary of videos
that failed is closed), and is dropped when the window closes any other way (Esc, the title bar, Cut a clip opened on
another video) or Filee quits. Marking the same frame again under "skip existing files" saves a second copy (" (2)")
rather than dropping the new marks. A very long video name is shortened in the frame's name, by whole characters, so the
marked copy's name fits the 255 bytes a file name may have.

Where the button is. Under the picture, between it and the timeline: on the picture it covered portrait video, and
both toolbars are already full at the smallest window size in long languages. Checked in English, German, Russian,
Japanese, Chinese and Arabic, light and dark, at the smallest window size and with a portrait video.

On purpose. While the start or end handle is chosen, the time beside Play is that handle's, not the playhead's;
the playhead's marker stays on the timeline, and choosing it (P) brings its time back. Not tried with a real screen
reader: the names it is given are checked through Avalonia's automation peers only.

Not in this PR. The tray, timeline ticks, note field, time strip and the PDF / PNG export (step 3 of #1205).
Found along the way, already so on main: at the window's smallest size in long languages (Russian) the top toolbar
runs past the window's edge and Music is cut off.

Type of change

  • Bug fix
  • New feature or improvement
  • New format or engine
  • Translation
  • Documentation
  • Build, CI or dependencies

How was it tested?

  • dotnet format --verify-no-changes --severity warn
  • dotnet test, all suites:
    • macOS (Homebrew FFmpeg 9.0.2, which has no zscale): Core 1,757 passed; Engines 4,023 passed, 9 failed; App
      3,225 passed, 2 failed. Every failure also fails on main (the same tests, run on the commit this branch starts
      from): Homebrew's missing encoders (four MediaTests), the still-video MediaTest, FolderIso632Tests,
      Udf1443Tests (2), SizeLimitTests, the Engines page render test and DonutHighlightTests. Also on main on
      macOS: the Windows installer suite (Filee.Setup.Tests, 71) and one CLI zip-to-ISO test.
    • Linux, mcr.microsoft.com/dotnet/sdk:10.0-noble with Ubuntu's FFmpeg 6.1 (zscale present) and the app's fonts:
      Core 1,756 passed, 3 failed; Engines 3,898 passed, 15 failed; App 3,217 passed, 0 failed. 17 of them fail on
      main in that container: root in a container (2), Udf (2), ISO, CAD, CSV, the annotation text-colour test, and
      nine media tests that need decoders or encoders Ubuntu's FFmpeg 6.1 lacks (including two ClipTests, which need
      apple_apac). CI's two ExactSeekTests steps, which hold the new engine tests: 135 passed and 1 skipped
      (far-apart parts, below 7.0 by design) with Ubuntu's 6.1; 136 passed with Filee's FFmpeg n9.0.2 (linux-arm64).
      The 18th, TrashOriginalTests (two jobs on one file, in Core, which this PR doesn't change), failed once and
      then passed 40 times alone and in 8 more full Core runs on this branch, as on main.
    • Windows 11 ARM64 with the pinned FFmpeg 9.0.2 (FILEE_TEST_FFMPEG=required): Core 1,752 passed; Engines 3,938
      passed, 5 failed; App 3,233 passed, 0 failed. The same 5 fail on main in that VM: FolderIso632Tests,
      Udf1443Tests (2, 7-Zip not set up there), SizeLimitTests and the still-video MediaTest. x64 Windows is
      covered only by CI.
    • The full runs above came before the last review's fixes: test changes, the HDR still keeping its colour detail,
      and one Japanese string. After them, the affected tests ran again: Linux, ExactSeekTests 135 passed and 1
      skipped with Ubuntu's 6.1, 136 passed with Filee's n9.0.2, and the App's Clip, Annotate, marked-frame and
      localization tests 411 passed, 2 skipped; Windows 11 ARM64 (its FFmpeg has zscale, so the HDR check runs there
      too), ExactSeekTests 120 passed and 16 skipped (the tests whose stand-in FFmpeg is a Unix script), and the same
      App tests 413 passed.
  • New tests, each turned off in turn and seen to fail (34 of 34):
    • Engines (ExactSeekTests, in CI's two FFmpeg steps): the marked frame is the frame shown, at the size shown,
      on seven containers including TS, VOB, open-GOP HEVC and AVI with B-frames; wide pixels become square; a phone
      video held upright is upright; an HDR frame gets ordinary colours where zscale exists (its pixels differ clearly
      from the same frame taken without the tone map, and with the tone map switched off the test fails), keeps its full
      colour detail, and says so where zscale is missing.
    • App: F and the button with Start, End and the playhead; marking while playing; the time beside Play and what a
      screen reader hears; a frame that can't be taken; a sound has nothing to mark; a frame still opens after the window
      moves on (F, then Enter) and after Save on the last video, but not after Esc, the window closed any other way, or
      Filee quitting; a closing Annotate takes no more frames, and one showing its summary leaves the next frame to a
      new window; a second marked copy rather than a skip; long names shortened; the keys line naming F only where it
      works; Annotate taking a second frame next; Annotate kept above the clip window only while that window is open
      and frames from it are still to mark, including once its frame is skipped; and
      through the app's own windows and job queue, Annotate opening over the clip window, the copy saved next to the
      video, and the frames deleted.
  • Tried it in the app (macOS, this branch's build): Cut a clip on an H.264 MPEG-TS with B-frames, each frame
    showing its number. Start at 4.7 s showed frame 141; F opened Annotate on Site walk 0m04.700s.png, frame 141. End
    showed frame 299; the button added it as "1 of 2". Saved with an arrow: Site walk 0m04.700s Annotated.png next to
    the video, 640 × 360, frame 141 with the arrow; its frame was deleted, and the unsaved one when Annotate closed. An
    HDR (PQ) HEVC: Annotate showed the washed-out note under the frame (Homebrew's FFmpeg has no zscale).

Screenshots (UI changes)

The picture above, from this branch's build on macOS. The window in every language is in the render test's
screenshots (clip-*.png).

Checklist

  • New UI strings are in all src/Filee.App/Assets/i18n/*.json files (6 new: five for the button and its
    messages, and the keys line with F, shown only where there is a frame to mark; the keys line without it is as on
    main)
  • New third-party code or binaries are listed in THIRD-PARTY-NOTICES.md (none added)
  • The PR does one thing (unrelated changes go in a separate PR)

🤖 Generated with Claude Code

Part of KnifeLemon#1205 (step 2). In Cut a clip, Mark this frame (F), under the picture, takes the frame shown at the playhead
or on the start or end handle, as a full-size PNG from the same seek as the picture, and opens it in Annotate, named
after the video and the frame's time. The marked copy is saved next to the video. HDR frames are tone-mapped where
FFmpeg has zscale, and Annotate says the colours may look washed out where it doesn't. The time beside Play now shows
the time of the frame in the picture, and the label on the picture is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the feature New features label Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant