MagicMirror module that plays videos from a Google Drive folder using rclone.
No API keys. No Google developer setup. Simple browser-based authentication.
For best performance on Raspberry Pi, videos should be optimized before uploading.
- Resolution: 540p
- Frame rate: 30fps
- Codec: H.264 (yuv420p)
- Keep file sizes as small as possible
ffmpeg -i input.mp4 -vf "scale=-2:540,fps=30" -c:v libx264 -preset veryfast -crf 23 -pix_fmt yuv420p -movflags +faststart -an output.mp4- Plays videos from Google Drive
- Uses rclone with no API keys required
- Automatic background syncing with no cron needed
- Simple setup for non-technical users
- Supports linear and random playback
- Optional sound control
- Touch, swipe, and arrow-based video navigation
Navigate to your MagicMirror modules folder:
cd ~/MagicMirror/modulesClone the repository:
git clone https://github.com/Dresch360/MMM-DriveVideos.gitMake the setup script executable:
chmod +x MMM-DriveVideos/connectAdd this to your config.js:
{
module: "MMM-DriveVideos",
position: "fullscreen_above",
config: {
driveRemote: "drive:mirror-videos",
videoPath: "/home/pi/MagicMirror/modules/MMM-DriveVideos/public/videos",
updateInterval: 2 * 60 * 1000,
playMode: "linear", // "linear" or "random"
muted: true, // true or false
showArrows: true, // show left/right navigation arrows
arrowOpacity: 0.3, // controls arrow visibility (0.0 to 1.0)
arrowFontSize: 40, // controls arrow size in pixels
objectFit: "cover", // "cover" or "contain"
enableSwipe: true, // enable swipe navigation
enableTapPause: true // tap to pause/resume playback
}
},| Option | Description | Default |
|---|---|---|
driveRemote |
Google Drive folder to sync from | "drive:mirror-videos" |
updateInterval |
How often to sync videos (ms) | 2 * 60 * 1000 |
playMode |
Playback order for videos | "linear" |
muted |
Start videos muted or with sound | true |
showArrows |
Show or hide left/right navigation arrows | true |
arrowOpacity |
Controls arrow visibility (0.0 to 1.0) | 0.3 |
arrowFontSize |
Controls arrow size in pixels | 40 |
objectFit |
Video fit mode ("cover" or "contain") |
"cover" |
enableSwipe |
Enable swipe navigation between videos | true |
enableTapPause |
Tap to pause/resume video playback | true |
linear= plays videos in orderrandom= randomizes the next videocover= fills screen (may crop)contain= shows full video (may have borders)
-
Minimize MagicMirror
Press:Ctrl + m -
Open Terminal
-
Run:
~/MagicMirror/modules/MMM-DriveVideos/connect
- Follow prompts:
- Type
yto authenticate - A browser window will open. Sign into your Google account
- Return to Terminal
- Type
nfor Shared Drive
MagicMirror will restart automatically
- Open the Google Drive app
- Open the folder: mirror-videos
- Tap + then Upload
- Select your videos
Videos will appear automatically within a few minutes.
- Go to https://drive.google.com
- Open the folder: mirror-videos
- Drag and drop your videos
- The Google Drive folder mirror-videos is created automatically during setup
- Folder name must be exactly mirror-videos in lowercase
- Only MP4 files are supported (H.264 recommended)
- Recommended for best performance: 540p, 30fps
- Videos autoplay
- Playlist updates apply after the current video ends
- Updates happen automatically about every 2 minutes
To remove videos and disconnect Google Drive:
rm -rf ~/MagicMirror/modules/MMM-DriveVideos/public/videos/*
rm -f ~/.config/rclone/rclone.conf
pm2 restart MagicMirrorMIT License
