Skip to content

About

Flutter Android MVP video player

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Player

Android video player with a reference-inspired folder library, settings pages, and landscape playback controls.

Library

  • Local and Me tabs, without the Music/Transfer tabs or top shortcut strip.
  • Only main storage folders appear at the root. Open a folder to browse its immediate subfolders and videos. No synthetic Recent folder.
  • Videos inside a folder are ordered with the sort menu at the top right: Name A–Z, Name Z–A, Date newest first, or Date oldest first (file modification date). The choice persists across launches, search results follow it, and the playback queue matches the displayed order. Folders always remain alphabetical.
  • Android MediaStore scanning, runtime media permission requests, search, list/grid layouts, and lazy thumbnails with a bounded cache. Thumbnails sample later scenes instead of frame zero, retry nearly black frames, and use a silent software decoder when Android cannot extract a frame. Two ordinary thumbnails can be extracted concurrently, while software fallbacks use a separate single-worker queue. Generated previews are saved in a bounded disk cache keyed by video modification time, so reopening the app reuses them. Failed cache entries can be retried, and Clear thumbnail cache clears both disk and memory.

Playback

Playback uses media_kit/libmpv, including software decoding for WMV formats that the previous platform player could not open.

  • HW: MediaCodec with frame copying (mediacodec-copy).
  • HW+: direct MediaCodec rendering (mediacodec).
  • SW: software decoding (no).

Select a decoder in the player or save a default under Settings > Decoder. Hardware modes fall back to software when the device cannot decode a format. Information shows the selected and active decoder. These labels describe this app's backend settings.

Drag horizontally to seek forward/backward. Seeking is exponential: short drags nudge by a second or two, and longer drags accelerate (a full-width swipe covers the video length, bounded to 2–10 minutes). The acceleration steepness is user-tunable (see Playback adjustments). Drag vertically on the left half to change window brightness, or on the right half to change media volume. Brightness returns to the system default on leaving playback. A locked player ignores these gestures.

Pinch with two fingers to zoom the video between 50% and 400%; the point under your fingers stays anchored, and moving both fingers pans the zoomed picture without letting it slide past its edges (a zoomed-out picture stays centred). Releasing within 5% of 100% snaps back to the plain fitted picture. A pinch never seeks, and single-finger drags stay disabled until every finger lifts. Changing the aspect ratio resets the zoom. Zoom state is held per player session, not saved.

Settings > Subtitle > Subtitle Folder opens the Android folder picker. The selection persists across launches. Each video automatically loads a same-name SRT directly from that folder (Movie.wmv -> Movie.srt); filename matching also accepts differences in letter case. Missing files leave playback running, and manual subtitle selection still overrides the automatic choice. Clear subtitle folder disables the lookup. Gesture indicators have a transparent background with lightly shadowed text and icons.

When a video finishes, the player automatically continues with the next item of the playing queue; with shuffle a random item is chosen instead. Loop keeps repeating the current video. Ending on the last queue item stays on the final frame, or returns to the list when Settings > Playback > Back to list is enabled. Completion is detected from mpv's end-of-file event, with a fallback for decoders that stop within the last half second without reporting completion.

Other working actions include queue selection, seek bar, speed, aspect ratio, rotation, mute, loop, shuffle, background audio, sleep timer, night mode, mirror/flip, external subtitles, bookmarks, favourites, and resume position.

Advanced reference features still show availability explanations: equalizer/audio effects, PiP, cutting, sharing, playlists, rename, and several advanced preferences. Background playback is not a persistent Android media service.

Branding

The generated launcher icon is in assets/branding/app-logo.png. Generation details and the exact prompt are in assets/branding/README.md. Regenerate Android icon resources with dart run flutter_launcher_icons.

Verification

flutter analyze
flutter test
flutter build apk --debug

Tests cover folder hierarchy, loading races, decoder preference persistence, simplified navigation, library sorting and its persistence, gesture direction and limits, pinch-zoom anchoring and bounds, seek sensitivity and curve shape, disposal during media lookup, and reference menu layout in both orientations.

Backend references: media_kit, mpv hardware decoding.

Playback adjustments

The subtitle icon is outlined until an external subtitle track loads successfully, then becomes solid and names the loaded file in its tooltip. Matching SRTs must have the same base filename as their video.

Audio sync is available from the player toolbar or More menu. It adjusts audio relative to video from -3 to +3 seconds in 0.05-second increments, applies during playback, and remembers the value per video. Negative values make sound earlier; positive values make sound later. Reset returns to zero.

Seek sensitivity is available in the player More menu and Settings > Player > Controls. The 0.25x to 4x slider and +/-0.05x buttons save adjustments immediately. Reset restores 1x. This multiplier affects horizontal drag distance only.

The same dialog tunes the acceleration curve (0.5 to 8, default 4, in 0.25 steps), which controls the avalanche effect of horizontal drag seeking. The seek offset grows as (e^(k·f) − 1)/(e^k − 1) over the drag fraction f of screen width: lower k is near-linear, higher k keeps short drags fine and then jumps sharply near the end of the drag. Sensitivity scales how far a swipe reaches; the curve only redistributes where along the drag that distance accumulates, so a full-width swipe covers the same ground for any k. Reset restores both defaults, and both settings are saved for all videos.

Library selection

Long-press a folder or video in list or grid view to select it. Tap more entries or Select all, then use the toolbar delete icon. Selected folders include all indexed videos in their subfolders; other files and physical directories are preserved. Android provides the shared-media deletion confirmation without an extra app dialog. Cancelling keeps the remaining selection; only confirmed deletions update the library.

About

Flutter Android MVP video player

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages