limited_video_recorder 0.0.1
limited_video_recorder: ^0.0.1 copied to clipboard
A Flutter plugin for video recording with file size, duration, resolution, and bitrate limits.
limited_video_recorder #
๐ฅ A Flutter plugin to record videos with customizable limits on file size, duration, resolution, bitrate, and frame rate.
โ Android supported
โณ iOS support planned
๐ง Designed for control and simplicity
๐ Features #
- ๐ฆ Limit maximum file size (e.g., 10 MB)
- โฑ๏ธ Limit recording duration (e.g., 30 seconds)
- ๐๏ธ Set video resolution (width ร height)
- โก Control bitrate and frame rate
- ๐ Records video with audio
- ๐ Clean controller-based API
- ๐ฑ Preview camera with
AndroidView - ๐ Access to recorded video file path
- โน๏ธ Extract video file metadata (orientation, duration, size)
๐ฆ Installation #
Add to your pubspec.yaml:
dependencies:
limited_video_recorder:
git:
url: https://github.com/sgsm74/limited_video_recorder.git
ref: main
Then run:
flutter pub get
๐งช Quick Example #
final recorder = LimitedVideoRecorderController();
final config = RecordingConfig(
videoWidth: 1280,
videoHeight: 720,
maxFileSize: 15 * 1024 * 1024, // 15 MB
maxDuration: 10 * 1000, // 10 seconds
videoBitRate: 5_000_000,
frameRate: 30,
);
await recorder.start(config: config);
// ... wait or perform UI updates ...
final path = await recorder.stop();
print("Video saved at: $path");
Use onRecordingComplete((path) { ... }) to get the final path automatically.
๐ฑ Android Permissions #
Add the following to your AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
If targeting Android 13+, add runtime permission handling.
๐งฉ Example App UI #
- Preview camera using AndroidView
- Start / Stop buttons
- Show final video using
video_player - Display file size, duration, orientation after recording
๐ฅ Planned Features #
- โ iOS support
- โ Flash toggle
- โ Pause/Resume recording
- โ Manual focus / exposure controls
- โ Thumbnail generation
๐งโ๐ป Author #
Developed by Saeed Ghasemi
Feel free to contribute, suggest features, or report bugs!
๐ License #
MIT License ยฉ 2025 Saeed Qasemi