Repository navigation
feat(clip): Mark this frame opens the frame shown in Annotate - #1688
Open
lightscape-jm wants to merge 1 commit into
Open
lightscape-jm wants to merge 1 commit into
lightscape-jm wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.For the user
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.
<video> <time> Annotated.pngnext 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 nozscale,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 toolbarruns past the window's edge and Music is cut off.
Type of change
How was it tested?
dotnet format --verify-no-changes --severity warndotnet test, all suites:zscale): Core 1,757 passed; Engines 4,023 passed, 9 failed; App3,225 passed, 2 failed. Every failure also fails on
main(the same tests, run on the commit this branch startsfrom): Homebrew's missing encoders (four MediaTests), the still-video MediaTest,
FolderIso632Tests,Udf1443Tests(2),SizeLimitTests, the Engines page render test andDonutHighlightTests. Also onmainonmacOS: the Windows installer suite (
Filee.Setup.Tests, 71) and one CLI zip-to-ISO test.mcr.microsoft.com/dotnet/sdk:10.0-noblewith Ubuntu's FFmpeg 6.1 (zscalepresent) 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
mainin that container: root in a container (2), Udf (2), ISO, CAD, CSV, the annotation text-colour test, andnine media tests that need decoders or encoders Ubuntu's FFmpeg 6.1 lacks (including two
ClipTests, which needapple_apac). CI's twoExactSeekTestssteps, 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 andthen passed 40 times alone and in 8 more full Core runs on this branch, as on
main.FILEE_TEST_FFMPEG=required): Core 1,752 passed; Engines 3,938passed, 5 failed; App 3,233 passed, 0 failed. The same 5 fail on
mainin that VM:FolderIso632Tests,Udf1443Tests(2, 7-Zip not set up there),SizeLimitTestsand the still-video MediaTest. x64 Windows iscovered only by CI.
and one Japanese string. After them, the affected tests ran again: Linux,
ExactSeekTests135 passed and 1skipped 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 theretoo),
ExactSeekTests120 passed and 16 skipped (the tests whose stand-in FFmpeg is a Unix script), and the sameApp tests 413 passed.
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
zscaleexists (its pixels differ clearlyfrom 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
zscaleis missing.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.
showing its number. Start at 4.7 s showed frame 141; F opened Annotate on
Site walk 0m04.700s.png, frame 141. Endshowed frame 299; the button added it as "1 of 2". Saved with an arrow:
Site walk 0m04.700s Annotated.pngnext tothe 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
src/Filee.App/Assets/i18n/*.jsonfiles (6 new: five for the button and itsmessages, and the keys line with F, shown only where there is a frame to mark; the keys line without it is as on
main)THIRD-PARTY-NOTICES.md(none added)🤖 Generated with Claude Code