Automatic video recording system from Meari camera in a containerized environment.
.
├── android-project/ # Android project with EdgeCloudRecorder app
│ ├── app/ # Application source code
│ ├── gradle/ # Gradle wrapper files
│ ├── build.gradle # Build configuration
│ └── gradlew # Gradle wrapper script
├── recordings/ # Recorded videos (synced from container)
├── docker-compose.yml # Docker configuration for Redroid
├── .env # Centralized configuration
├── setup_redroid.sh # Initial container and app setup
├── watch_logs.sh # Monitor recorder logs
└── set_duration.sh # Change recording duration
Create the .env file with Meari credentials:
MEARI_USERNAME=your_email@example.com
MEARI_PASSWORD=your_password
MEARI_COUNTRY=IT
MEARI_CODE=39
RECORDING_DURATION_MINUTES=1
VIDEO_QUALITY=HD-
Prepare redroid docker and host setup (required for Redroid):
You have to see the docuemntation of Redroid to correct setup the Docker depending on the OS host (https://github.com/remote-android/redroid-doc/blob/master/deploy/debian.md) I do it for debian. -
Start the system:
./setup_redroid.sh
This script:
- Starts the Redroid container (Android 11)
- Compiles and installs the EdgeCloudRecorder app
- Configures Meari credentials
- Starts the recording service
./watch_logs.sh./set_duration.sh 15 # 15 minutes per fileVideos are automatically saved to ./recordings/ from the container.
Configuration:
# Change quality (HD/SD/LOW)
adb -s localhost:5555 shell am broadcast -a com.edgecloudrecorder.SET_QUALITY -n com.edgecloudrecorder/.mearitaskerplugin.recorder.ConfigReceiver --es quality HD
# Show current configuration
adb -s localhost:5555 shell am broadcast -a com.edgecloudrecorder.SHOW_CONFIG -n com.edgecloudrecorder/.mearitaskerplugin.recorder.ConfigReceiverService Control:
# Stop
adb -s localhost:5555 shell am stopservice com.edgecloudrecorder/com.edgecloudrecorder.mearitaskerplugin.recorder.VideoRecorderService
# Start
adb -s localhost:5555 shell am start-foreground-service com.edgecloudrecorder/com.edgecloudrecorder.mearitaskerplugin.recorder.VideoRecorderService- Docker and Docker Compose
- ADB (Android Debug Bridge)
- Setup host and Docker for Redroid
The system uses:
- Redroid: Containerized Android 11
- Meari SDK: IP camera communication
- VideoRecorderService: Android foreground service for continuous recording
- File Rotation: Creates new files every N minutes without streaming interruption
See LICENSE file.