Skip to content

New apk stream#25

Merged
vineethvijay merged 7 commits into
mainfrom
new-apk-stream
May 5, 2026
Merged

New apk stream#25
vineethvijay merged 7 commits into
mainfrom
new-apk-stream

Conversation

@vineethvijay
Copy link
Copy Markdown
Owner

No description provided.

… and enhance build scripts for K8s deployment
- Introduced FilterBar for reusable search and filter functionality.
- Added GaugeWidget for displaying system metrics in a circular gauge format.
- Enhanced GlassCard with tap animation and inner shadow effects.
- Implemented MiniPlayerBar for persistent audio/video playback controls.
- Created PaginationBar for simple pagination with navigation controls.
- Developed PlatformBadge for displaying platform-specific badges.
- Added SectionHeader for page headers with icons and action buttons.
- Implemented ShimmerLoader for skeleton loading effects in UI.
- Updated pubspec.yaml to include new dependencies for state management and UI enhancements.
- Refactored widget tests to utilize Riverpod for state management.
- Added a migration script to convert TubeArchivist video files to Pinchflat structure.
…t Tile

- Introduced a new MediaListTile widget for consistent display of video chunks and audio files.
- Updated LibraryScreen to use MediaListTile for rendering chunks and audio files.
- Increased the number of items per page for chunks and audio from 6 to 15 and 8 to 20 respectively.
- Removed unused progress bar logic and related methods.
- Simplified chunk and audio filtering methods by removing unnecessary parameters.
- Enhanced pagination bar to support direct page selection and improved layout.
- Adjusted loading indicators and empty states for better user experience.
- Adjusted Nginx configuration to serve HLS streams on port 8090 and updated health check URL.
- Modified backend application to support HLS directory and path configurations.
- Refactored ClipPusher to emit HLS streams directly from pre-generated chunks, removing RTMP dependency.
- Enhanced chunk generation scripts with improved watermark handling and visual grading.
- Added a new 3D LUT generation script for color grading.
- Updated Flutter frontend to include a button for generating test clips and improved user feedback during the process.
Audio fairness:
- Replace least-total-seconds picker with shuffled round-robin queue:
  every track plays exactly once per cycle before any repeat. Short
  and long tracks now have equal selection probability.
- Avoid back-to-back repeats across cycle boundaries; skip-audio
  rotates the active track to the back of the cycle rather than
  penalising it.

HLS stability:
- Add ffmpeg -hls_flags +temp_file so playlist updates are atomic.
  Fixes ERROR_CODE_PARSING_MANIFEST_MALFORMED retry storms during
  audio rotation.

Idle auto-pause (server hooks; activated by app.py + nginx.conf):
- Start in paused state; push loop spins on _paused without launching
  ffmpeg until wake() is called.
- mark_activity() refreshes the idle timer (called from nginx-mirrored
  HLS requests). After IDLE_TIMEOUT_SEC (default 300) of no activity,
  ffmpeg is terminated and the loop re-enters paused state.
Server (api + nginx):
- POST /api/wake — explicit unpause, restarts ffmpeg. Idempotent.
- GET  /api/_hls_ping — internal endpoint that just refreshes the
  activity timer (returns 204).
- nginx /live/ now mirrors every playlist/segment request to
  /api/_hls_ping fire-and-forget, so the api can track real client
  activity without the player having to call anything explicitly.
- /api/stream-health treats paused state as healthy (returns 200
  with reason=idle_paused) so kubelet doesn't flap the pod while
  it's intentionally idle.

Shield app (MainActivity):
- sendWake() POSTed in onCreate and onStart so cold launch and
  resume-from-background both kick the server out of pause before
  the HLS player connects.
- Hard refresh also wakes for the same reason.

Net effect: ffmpeg / GPU sit at ~0% when nobody is watching; first
HLS request from the app (or the explicit /api/wake) brings the
stream back within ~1-2s.
@vineethvijay vineethvijay merged commit 648d5eb into main May 5, 2026
1 check passed
@vineethvijay vineethvijay deleted the new-apk-stream branch May 5, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant