{"id":29996719,"url":"https://github.com/djaus2/mauimediarecordervideoandroidapp","last_synced_at":"2025-08-05T02:54:15.896Z","repository":{"id":292995371,"uuid":"978758436","full_name":"djaus2/MauiMediaRecorderVideoAndroidApp","owner":"djaus2","description":"An Android phone app that uses a .NET MAUI library for Android video recording library (available on Nuget) using MediaRecorder with Camera Preview and Stabilization features","archived":false,"fork":false,"pushed_at":"2025-07-16T13:04:45.000Z","size":548,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-17T05:14:27.092Z","etag":null,"topics":["community-toolkit","csharp","maui","maui-apps","maui-library","mediarecorder","video","videocapture"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/djaus2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-06T13:17:18.000Z","updated_at":"2025-07-16T13:04:49.000Z","dependencies_parsed_at":"2025-07-16T09:21:50.080Z","dependency_job_id":"fbbc1f40-e867-4d66-8c7b-27ee8ffa7572","html_url":"https://github.com/djaus2/MauiMediaRecorderVideoAndroidApp","commit_stats":null,"previous_names":["djaus2/mauimediarecordervideoandroidapp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/djaus2/MauiMediaRecorderVideoAndroidApp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djaus2%2FMauiMediaRecorderVideoAndroidApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djaus2%2FMauiMediaRecorderVideoAndroidApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djaus2%2FMauiMediaRecorderVideoAndroidApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djaus2%2FMauiMediaRecorderVideoAndroidApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djaus2","download_url":"https://codeload.github.com/djaus2/MauiMediaRecorderVideoAndroidApp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djaus2%2FMauiMediaRecorderVideoAndroidApp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268825562,"owners_count":24313264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["community-toolkit","csharp","maui","maui-apps","maui-library","mediarecorder","video","videocapture"],"created_at":"2025-08-05T02:54:15.285Z","updated_at":"2025-08-05T02:54:15.890Z","avatar_url":"https://github.com/djaus2.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# AthsVideoRecording  \n- Note renamed fromMauiMediaRecorderVideoAndroidApp\n\u003e Will change Repository URL to match soon to djaus2/AthsVideoRecording\n\nA test app for the following NuGet package. V3.0.1\n[djaus2_MauiMediaRecorderVideoLib](https://www.nuget.org/packages/djaus2_MauiMediaRecorderVideoLib/)\n\nAlso uses Nuget Package V1.0.6 [djaus2MauiCountdownToolkit](https://www.nuget.org/packages/djaus2MauiCountdownToolkit/)\n\n## NB 2025-05-29\n- See note wrt FPS below\n\n## Updates Summary of late\n- Several options for determining the event start time, wrt the video start time\n\n## Popup Icon issue 2025-07-19\n- Can use Icon from app but not Toolkit embedded versions\n  - 2 Nuget packages tried. Reverting at Version 1.1.6 where app icon works\n## Update 2025-07-19\nMajor bug fix (sorry) in the app that caused the app to crash when trying to run detached from VS.\n- ```EnumEqualsConverter``` went missing! Fixed. \n## Update: 2025-07-16\n- Numerous updates including with 2 NuGet packages it uses.\n  - In TimeFromMode WallClockSelect\n    - These features only show in this mode.\n    - Can auto start video recording after a period\n      - 3 Modes for that:\n        - Soft: Just handled by _VideoKapture as UI less delay\n          - Can be cancelled by pressing video start (white) button.\n          - ***ATM it does this delay in both packages.*** 2Do\n        - Red and Rainbow:  A popup with Cancel button\n          - Red: Popup border is Red. 2Do make color selectable\n          - Rainbow: Rainbow border, as below. _Nice!_\n     - There is a start gun icon. Race times are wrt to this.  \n![Countdown Popup](https://raw.githubusercontent.com/djaus2/MauiCountdownToolkit/master/Popup1.png)\n\n## Update: 2025-07-06\n- Added **TimeFromMode property** to VideoRecorderService to allow for different ways of determining the start time of the event.\n  - Appends a text string for **TimeFromMode** to the video filename.\n  - **AthStitcher** app uses this to determine the start time of the event and parse it to the video file **Title** property, removing that text from the filename.\n  - For **WallClock** mode, the gun time is also appended that AthStitcher parses to gun WallClock time and sets as Video file **Comment** property, _also_ removing that text from the filename.\n  - Note: Gun only shows if **TimeFromMode** is set to **WallClock** when ready to record. \n    - Can be pressed before or during video recording.\n- _2Do Insert those properties in the capture library so that the video file has those properties set._\n- Text appended: (Note: _ is added before and after each text string:\n```cs\n        TimeFromMode.FromVideoStart =\u003e \"VIDEOSTART\",\n        TimeFromMode.FromGunSound =\u003e \"GUNSOUND\",\n        TimeFromMode.FromGunFlash =\u003e \"GUNFLASH\",\n        TimeFromMode.ManuallySelect =\u003e \"MANUAL\",\n        TimeFromMode.WallClockSelect =\u003e \"WALLCLOCK\"\n```\n\n## Update: 2025-05-14\n\n- **Found that it works in Release mode if AOT is disabled!  \n_Both Bundle AND APK builds_**  \nBundle-No AOT config here for Release config.\n\n## Uses Nuget Package\n[NuGet: MauiMediaRecorderVideoLib](https://www.nuget.org/packages/djaus2_MauiMediaRecorderVideoLib)\n, a .NET MAUI library for Android video recording using MediaRecorder with Camera Preview and Stabilization features.\n\n---\n\n## About MauiMediaRecorderVideoLib\n\n\u003e Nb: Video is stored /Movies folder. Filename is juxtaposed with date. Can optionally also optionally \nstart time to the the video filename which this app can parse and use.\n\nA .NET MAUI library for Android video recording using MediaRecorder with camera preview and stabilization features.\n\nLatest Version: 2.0.1\n\n\u003e Nb This is a work in progress. The library is functional but the test app is not yet fully working in Release mode. _(Debug works)._\n\n## The Test App  _(here)_\n\nClone this repository, build and deploy to an Android phone.  \n_(Was tested on a Pixel 6 phone)_\n\nChange the UI as you wish.\n\n---\n\n### About the library\nThe library is being developed to target a sporting Photoiming app. See [djaus2/PhotoTimingDjaus](https://github.com/djaus2/PhotoTimingDjaus)\n\n### Features\n\n- Full-screen camera preview\n- Video recording with MediaRecorder\n  - No audio recording\n- Image stabilization options (Standard or Locked)\n- Camera rotation support (0, 90, 180, 270 degrees)\n- Configurable video FPS (30, 60, or default)\n   - Note for 60 FPS with Google Pixel phone need to:\n      - Camera Settings\n      - Advanced\n      - Turn off Store videos efficiently\n      - _Probably best to do that for 30 FPS as well otherwise get dynamic FPS_\n- Support for pausing and resuming recording\n- Proper handling of Android permissions\n- Screen dimensions detection for optimal preview\n\n### Usage with a MAUI Android Phone App\n\n#### Installation\n\nStart by creating a new .NET MAUI project or using an existing one.\n\nInstall the package via NuGet:\n\n```shell\ndotnet add package MauiMediaRecorderVideoLib\n```\n\nAlso need to install the following NuGet package:\n\n```shell\ndotnet add package CommunityToolkit.Maui.Camera\n```\n\n\u003e **Nb:** CommunityToolkit.Maui.Camera is in the library but needs a reference in \nthe App as it uses the Toolkit Preview.\n\n\n#### Basic Setup\n\n \n 1. Add the required permissions to your Android Manifest:  \n\n\n```xml\n\u003cuses-permission android:name=\"android.permission.CAMERA\" /\u003e\n```\n\n\u003e **Note:** In app Android//MainActivity calls permissions setup via static \nmethod in library that iterates through in-app Android/Manifest permissions.\n\n### The following needs updating (2Do).\n\n  2. Initialize the video recorder service:\n\n  ```csharp\n  using MauiMediaRecorderVideoLib;\n\n// Initialize the service\nvar videoRecorderService = new AndroidVideoRecorderService();\nawait videoRecorderService.InitializeAsync();\n```\n\n 3. Start the camera preview:\n```csharp\n// Assuming you have a GraphicsView named 'cameraPreview' in your XAML\nvideoRecorderService.SetPreviewSurface(cameraPreview);\n```\n\n 4. Start recording:\n\n```csharp\n// Configure recording options\nvideoRecorderService.SetVideoFPS(30); // Optional: Set FPS\nvideoRecorderService.SetImageStabilization(StabilizationMode.Locked); // Optional: Set stabilization\n\n// Start recording\n\nstring outputFilePath = Path.Combine(FileSystem.CacheDirectory, \"myVideo.mp4\");\nawait videoRecorderService.StartRecordingAsync(outputFilePath);\n```\n 5. Control recording:\n```csharp\n// Pause recording\nawait videoRecorderService.PauseRecordingAsync();\n\n// Resume recording\nawait videoRecorderService.ResumeRecordingAsync();\n\n// Stop recording\nawait videoRecorderService.StopRecordingAsync();\n```\n 6. Clean up resources:\n ```csharp\n // Release resources when done\nawait videoRecorderService.CleanupAsync();\n```\n\n### Requirements\n\n- .NET MAUI project targeting Android\n- Android API level 21 or higher\n- Requires Android device with camera\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjaus2%2Fmauimediarecordervideoandroidapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjaus2%2Fmauimediarecordervideoandroidapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjaus2%2Fmauimediarecordervideoandroidapp/lists"}