Skip to content

[FEAT] Implement "Sort by Duration" parameter for efficient video indexing #115

@Aristta

Description

@Aristta

Is your feature request related to a problem? Please describe.
Yes. As Lap grows into a comprehensive media manager, navigating directories heavy with video files becomes cumbersome. Currently, users lack a way to logically order media by time length. When trying to locate a specific long-form recording among dozens of short clips, or when visually identifying duplicated exports, users are forced to manually inspect files. Sorting by "File Size" is an inaccurate proxy, as a short, high-bitrate file can be larger than a lengthy, low-bitrate one.

Describe the solution you'd like
I propose adding a "Duration" metric to the existing sorting parameters (Ascending / Descending).

Technical implementation considerations for a mixed-media library:

  1. Metadata Parsing: The system should utilize the parsed duration metadata (extracted from container headers like the MP4 moov atom).
  2. Handling Images (Windows Explorer Pattern): Since Lap handles both photos and videos, it should mimic the established behavior of the Windows File Explorer. Still images (which inherently have a null or 0 duration) should be cleanly grouped together and placed after the video files in the sorted list. This ensures the visual hierarchy of video files remains predictable and intuitive for desktop users.

Describe alternatives you've considered

  • Sorting by File Size: Rejected. As mentioned, variations in codecs and bitrates make file size a completely unreliable indicator of a video's actual length.
  • Manual Inspection: Hovering over or opening each file to check the duration badge is unscalable for large archives.

Additional context
"Sort by Duration" is not just a feature of professional DAM systems and video platforms (like YouTube), but a native, baseline capability of the Windows File Explorer. Replicating this native OS behavior inside Lap will significantly accelerate the culling and organizational workflows for users, keeping them within the application rather than forcing them to fall back to the system explorer to find a specific video.

Metadata

Metadata

Assignees

Labels

featNew feature or requestfixed

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions