Close
0%
0%

Mini-PI Media Server

Mini-PI Media Server for use on home network or as a wifi access point to stream media from

Similar projects worth following
A Swiss Army knife media server on a £15 Raspberry Pi Zero 2 W

A lightweight media appliance designed around the principle that a full home streaming system should not require a NAS or high-power mini PC — just efficient use of low-cost hardware.

DLNA streaming to any device on the network
Cloud sync (Google Drive / MEGA / OneDrive) — upload once, all Mini-Pi servers sync down automatically
Family media distribution network for the cost of a Pi Zero class device
Auto MKV → MP4 conversion with hardware encoding
Torrent downloading with Transmission (seeding-aware)
Client-side EQ and audio effects
Wi-Fi access point mode (fully portable)
Power-loss recovery
Web interface
Optional CD / DVD ripping (Pi 4 and above)

Runs on a Raspberry Pi Zero 2 W and scales up to Pi 5 hardware.

Mini-Pi Media Server: Pro-Grade Media on a £15 Computer

Mini-Pi Media Server turns a Raspberry Pi Zero 2 W into a low-power, self-hosted media appliance. Designed to run a full media stack on minimal hardware, it provides streaming, syncing, automation, and remote access without the need for a NAS or high-power mini PC.

Most media server stacks scale up in hardware requirements. Mini-Pi takes the opposite approach: start with a Raspberry Pi Zero 2 W and optimise everything around efficiency, low RAM usage, and simplicity.

It is designed for home networks, portable setups, hotel rooms, or even keeping a car full of passengers entertained — delivering a seamless media experience with zero subscription services required.

1. Core Media & Download Engine

  • Universal Streaming: Powered by a tuned MiniDLNA setup, streaming music, photos, and video up to 1080p HD to Smart TVs, game consoles, and mobile devices. Designed for smooth playback on low-power hardware rather than high-bitrate 4K streaming. Streaming Via Web browser too.
  • Integrated Downloads: Optional Transmission support allows direct downloads into the media library with seeding-aware handling.
  • Unified Storage: A consistent directory structure keeps DLNA, Samba, and the Web UI fully synchronised with no broken paths or mismatched views.
  • Optional CD/DVD Ripping (PI 4b and above): (Requires USB CD / DVD drive + powered hub)
    • Audio CDs are converted to MP3 and stored in the Music library
    • DVDs are backed up and transcoded to MP4 for the Video library

2. Cloud Sync & Family Media Network

Mini-Pi can be configured with a shared Google Drive, MEGA, or OneDrive account to create a distributed media system:

  • Upload media once from anywhere
  • All Mini-Pi nodes using the same account automatically sync within ~30 minutes
  • Cloud-synced content is preserved exactly as-is (no encoding pipeline interference)
  • Enables pre-configured deployment: set up a Pi, ship it to a family member, and they instantly share the same media library

3. Automation & Intelligence

  • Smart MKV Watcher: systemd + inotify service automatically detects new MKV or VOB files and triggers encoding immediately
  • Hardware Encoding: H.264 streams are remuxed instantly (no quality loss). HEVC and other formats are transcoded using the Pi Zero 2 W VideoCore GPU, with fallback to software encoding on Pi 5
  • Power-Loss Recovery: incomplete encodes are automatically cleaned up on reboot and resumed safely
  • USB Auto-Sync: plugging in a USB drive with standard media folders automatically syncs content into the library via rsync
  • Nightly Rotational Sync: optionally pulls only recent media from a NAS, keeping storage use low on SD cards

4. Web Interface & User Experience

  • Customisable backgrounds (including user uploads via Samba), uses the Pictures folder.
  • QR-code onboarding for instant device pairing and WiFi setup
  • Rich media library UI with posters, synopses, IMDb ratings, and Rotten Tomatoes scores via nightly metadata scraping
  • Cross-device resume playback (TV → tablet → phone)
  • Lock-screen music controls for high-fidelity playback
  • Direct uploads from any device into Music, Pictures, or Video folders
  • Client-side EQ and audio effects (zero CPU load on the Pi)

5. Networking & Deployment

  • WiFi Access Point Mode: creates a standalone wireless network for fully self-contained deployments, routing internet via Ethernet when available (with a USB to ethernet adapter on a pi zero 2 w)
  • Cockpit Management: full web-based admin interface including terminal, file system access, and service control without SSH
  • One-command install & upgrade: preserves all existing configuration and user data during updates

Demo

Demo video of the web server :-

  • 1 × Flirc case for Pi Zero 2 w A nice case to finish the project off
  • 1 × SanDisk 128GB Extreme PRO microSDXC card High performance SD card. dont cheap out. although the Kioxia Exceria Plus U3 is also a good card
  • 1 × Micro USB lead well you do want to power the device, right ?
  • 1 × SanDisk Ultra 256GB Dual Drive A USB and Micro USB pen drive to transfer your videos and music from a pc onto the PI but you can copy media across the network via samba to the Pi server
  • 1 × Micro Usb to Ethernet Lan Adapter With 3 USB Ports for Raspberry Pi Zero - White USB to Ethernet with 3x usb ports. Can be purchased from amazon for around £15

View all 8 components

  • Version 7.5 is available to download

    diddy07/31/2026 at 16:15 0 comments

    v7.5 Release Notes

    Version 7.5 brings legal public-domain movie downloading directly into the Mini-Pi Media Server. Browse over 20,000 classic films from the Internet Archive, Wikimedia Commons and Public Domain Torrents, then download them directly into your media library with a simple menu interface.

    Fixed: Full screen keyboard controls losing focus Seek and pause via keyboard were solid in windowed mode but would lose focus in full screen, meaning key presses stopped registering until you clicked back into the player. Both modes now handle keyboard seek and pause reliably, windowed and full screen alike.

    New: Archive Movie Downloader Added a new menu option, surfaced to the user at the end of setup, for pulling legal public-domain feature films straight into the media library. It searches Internet Archive, Wikimedia Commons, and Public Domain Torrents together from a single dialog UI — search by title/keyword/actor, browse by decade, or browse by genre. Internet Archive and Wikimedia results download immediately with a live progress gauge (percent, speed, size); Public Domain Torrents results get handed off to Transmission and queued in the background since those can take a while depending on seeders. Results are ranked and sorted by file size regardless of source, so the biggest (usually best quality) versions surface first.

    to run the archive movie downloader, ssh into the pi or use cockpit and open the terminal view.

    Then cd ./pi-setup

    then ./archive-movie-downloader.sh

    You can download / upgrade the mini-pi media server by running the following on the Raspberry Pi (either SSH into the Pi or on the actual Pi) :-

    wget -qO- https://raw.githubusercontent.com/diddy-boy/mini-pi-media-server/main/install.sh | bash

  • Version 7.4 is now available

    diddy07/25/2026 at 09:39 0 comments

    Bug Fix Release

    Installer

    • Fixed a bug in the mini-pi-setup installer that crashed on first run on a clean system (upgrades were unaffected)
    • A second run would complete previously — this is now fixed on the first attempt

    Media Encoding

    • Reworked the media encoding structure to encode fastest media files first, deferring H265 10-bit files to last, as these take the longest to encode (the Raspberry Pi only supports software encoding for H265 10-bit media into mp4)

    Server Sync

    • Fixed a mounting bug in rotating server sync that would not mount on first creation until a reboot had been performed
    • Fixed a bug in the configure-server-sync script that would sometimes error while rsyncing from a server, skipping some media files

    Disc Handler

    • Fixed a locking bug in disc-handler that removed the lock on startup even when there was a valid reason for it to be present (e.g. an active DVD or CD rip)
    • This now guards against a second instance attempting to rip the same media simultaneously

    Overall this release should be very stable

    You can download / upgrade by running the following on the Raspberry Pi (either SSH into the Pi or on the actual Pi) :-

    wget -qO- https://raw.githubusercontent.com/diddy-boy/mini-pi-media-server/main/install.sh | bash

  • Version 7.3 is out

    diddy06/28/2026 at 07:22 0 comments

    Mini-Pi Media Server 7.3

    This release focuses on system optimisation and stability improvements across the core media stack, with reduced memory usage and several bug fixes in the installer and subtitle configuration system.

    Performance & Optimisation

    • Reduced idle RAM usage from ~220 MB → ~154 MB on Raspberry Pi Zero 2 W
    • Optimised Apache configuration for lower baseline memory footprint
    • Tuned Samba configuration to reduce background resource usage

    Bug Fixes

    • Fixed issue when entering OpenSubtitles credentials (API key, username, password)
    • Resolved minor installer setup bug affecting initial configuration flow

    Notes

    This release maintains all existing features while improving system efficiency and overall stability.

    You can download / upgrade by running the following on the Raspberry Pi (either SSH into the Pi or on the actual Pi) :-

    wget -qO- https://raw.githubusercontent.com/diddy-boy/mini-pi-media-server/main/install.sh | bash

  • Version 7.2 is now available

    diddy06/21/2026 at 08:54 0 comments

    Version 7.2 adds CD and DVD Ripping.

    CD & DVD Ripping Support

    The Mini Pi Media Server can now rip physical discs directly, triggered automatically when a CD or DVD is inserted into the drive. The new disc-handler.sh script is invoked on disc insertion and handles detection, ripping, and handoff to the rest of the pipeline — no manual steps required.

    The user is asked if they want to enable this feature during install / upgrade time, then the extra software is installed and the disc-handler.sh is installed along with support for a popup status in the main web page when ripping a CD or a DVD.

    Note: this feature requires a Pi 4B or above. Disc ripping (especially DVD/vobcopy) is CPU and I/O intensive, and isn't supported on Pi Zero 2W or earlier boards.

    How it works

    Disc detection — On insertion, the script probes the drive's filesystem type to determine whether it's an audio CD or a DVD, and routes to the appropriate ripping path.

    Audio CDs are ripped using abcde, with CDDB lookups (via gnudb) used to identify artist/album/track metadata automatically. If a disc can't be identified, it's saved into a uniquely timestamped "Unknown Album" folder rather than overwriting any previous unidentified rip.

    DVDs are ripped using vobcopy. The script mounts the disc, copies the raw VIDEO_TS structure, identifies the main feature (the title set with the most VOB parts — i.e. not menus or extras), and joins those VOB parts into a single .vob file using cat (not ffmpeg — VOB parts are designed to be concatenated at the byte level per the DVD spec). The disc is ejected as soon as vobcopy finishes, freeing the drive before the (potentially lengthy) VOB join takes place.

    Movie title lookup — As a best-effort step, the script tries to identify the actual movie title rather than relying on the disc's volume label. It pulls the main feature's runtime via lsdvd, searches Wikipedia for candidate titles based on a cleaned-up version of the disc label, and matches against each candidate's infobox runtime. If a match is found within an 8-minute tolerance, that title is used; otherwise, the original disc-label-derived name is kept. This lookup never blocks or fails the rip itself — worst case, it just falls back silently.

    Handoff to the conversion pipeline

    Once a DVD's VOB file lands in the video library, it's picked up automatically by the existing mkv-watcher.sh service, which converts it into a browser-friendly MP4 just like any other inbound MKV file.

    Known limitations

    CDDB/Wikipedia-based identification is convenience-only, not guaranteed — it's quite weak in practice. For audio CDs, this means track and album metadata may come back incomplete or simply unmatched. For DVDs, if the disc isn't labelled close to the actual movie title, the Wikipedia runtime-matching may not find a confident match either. In both cases, manual renaming of the resulting media file after conversion may be needed to get clean naming/metadata in the library.

    NOTE: the pi will not provide enough power to power a USB CD / DVD drive, you WILL need a powered USB hub that then connects to a Raspberry pi in order to use.

    So what hardware works ?

    I ordered these from Amazon and it does work

    USB CD / DVD drive

    https://www.amazon.co.uk/dp/B0GLNTCD7T?

    Powered USB hub

    https://www.amazon.co.uk/dp/B00TPMEOYM?th=1

    Some countries have legal issues about backing up your own CD / DVD collection so please check your countries laws first. I accept no legal issues, I just provide the tool.

    You can download / upgrade by running the following on the Raspberry Pi (either SSH into the Pi or on the actual Pi) :-

    wget -qO- https://raw.githubusercontent.com/diddy-boy/mini-pi-media-server/main/install.sh | bash

  • Version 7.1 is now available

    diddy06/14/2026 at 06:37 0 comments

    Per-film playback progress bars 

    The film browser now shows a progress bar on each video card, giving you an at-a-glance view of how far through each film you've watched. On page load, the UI makes a single bulk request to the new get_progress_bulk.php helper (self-installed automatically by index.php, consistent with the project's zero-dependency philosophy) which returns percentage-watched data for all video files in the current directory in one go. The bars are rendered as a thin overlay along the bottom of each card. If the request fails for any reason, it degrades silently — the bars are cosmetic and won't break anything.

    Amazon Silk / Fire TV browser optimisations 

    Silk is detected via its user-agent string at page load, and a CSS class (is-silk) is added to the document body, enabling a tailored performance mode. Optimisations include: stripping GPU-heavy CSS effects (backdrop blur, transitions, gradients) from the file list and preview panel; flattening the progress bar to a solid colour instead of a CSS gradient; forcing a grid reflow on initial paint to fix a Silk bug where the container width is miscalculated, causing a brief two-column flash; and enlarging touch targets for the audio scrubber thumb. The Fire TV D-pad navigation already present in previous versions continues to work unchanged.

    Desktop and mobile versions of this web page still have the full effects (backdrop blur, transitions, gradients).

    USB sync permissions fix Resolved a minor permissions issue affecting USB media syncing.

    H.265 / HEVC conversion support 

    The MKV conversion pipeline (mkv-convert.sh) now processes H.265 content rather than skipping it. Plain 8-bit H.265 (yuv420p) was already handled silently; this update adds support for 10-bit and 12-bit H.265 (yuv420p10le / yuv420p12le), which are increasingly common in modern media files. High bit-depth content is automatically routed to a software encode with pixel format downconversion to 8-bit H.264, ensuring the output is playable in all web browsers and DLNA clients. A warning is logged when this path is taken, as software encoding of high bit-depth content is slow on low-power hardware — on a Pi Zero 2W a feature-length film may take several hours. Pi 4B and Pi 5 users will see more reasonable times. If browsers ever add native H.265 support in future, the pipeline can be switched to a near-instant remux instead.

    Conversion pipeline logging improvements 

    Pipeline log output (encode progress, completion, errors) was previously lost regardless of how the pipeline was triggered. Whether kicked off by the boot-time sweep, the periodic sweep, or an inotify file arrival event, output was either silently dropped for background calls or appeared only under the generic bash service identifier with no useful context. All pipeline output is now routed through logger, which writes to the systemd journal line by line under the identifier mkv-pipeline. This means live encode progress, per-file probe results, completion summaries (including encode speed and output file size), metadata scrape results, and any errors are all visible in real time via:

    journalctl -t mkv-pipeline -f

    journalctl -u mkv-watcher.service -f

    All of these logs can be viewed from the systemd service named mkv-watcher under services in cockpit

    You can download / upgrade by running the following on the Raspberry Pi (either SSH into the Pi or on the actual Pi) :-

    wget -qO- https://raw.githubusercontent.com/diddy-boy/mini-pi-media-server/main/install.sh | bash

  • Version 7.0 is now available

    diddy06/07/2026 at 11:28 0 comments

    Mini Pi Media Server v7.0.0 Release Notes

    🚀 TL;DR: What's New at a Glance

    • Cross-Device Watch Resume: Watch positions are now saved server-side on your Pi, allowing seamless switching between your phone, laptop, and TV.
    • Ground-Up Subtitle Engine Rewrite: Replaced dead dependencies with direct OpenSubtitles REST API integration, complete with smart backlog queueing to respect daily free quotas. NOTE: You will need an account for subtitles to download for Opensubtitles.org.
    • Modular Pipeline Refactor: Split the monolithic mkv-2-mp4.sh script into 4 highly focused, specialised scripts managed by a central orchestrator.
    • Bulletproof Concurrency: Upgraded to atomic mkdir locking to entirely eliminate race conditions when multiple files finish processing at once.
    • Advanced Filename Robustness: Transitioned to null-delimited processing and proper array handling to natively support spaces and special characters.
    • Deep Systemd Logging: Exposed comprehensive processing metrics—including codecs, bitrates, hardware encoders, and full ffmpeg outputs—directly to the systemd journal.

    📺 Watch Resume Across Devices via the web browser

    Your watch position is now saved back to the server as you stream, rather than being stored locally in the browser.

    • Start watching on your phone, continue from the same point on your TV or laptop.
    • Works across any device on your home network without any setup.
    • Falls back to local browser storage automatically if the server is unreachable.
    • No accounts, no cloud — everything stays local on your Pi.

    🎬 Media Scraper — Subtitle Engine Rewrite

    subliminal-based approach was found to be silently failing across all providers.

    • Podnapisi was confirmed dead (DNS no longer resolves globally).
    • OpenSubtitles v1 XML-RPC API was shut down in 2023.
    • subliminal has been removed as a dependency entirely.

    Subtitles now use the OpenSubtitles REST API directly, which is more reliable, faster, and requires no third-party library. Search is completely free and requires no account.

    Note on Subtitle Downloads: Downloads require a free OpenSubtitles account (20 downloads/day, resets at midnight UTC). The installer now walks you through setting up your credentials if you want subtitles, or you can skip it entirely — everything else works without an account.

    • Smart Authentication: Login happens once per script run and the session token is reused, so a library of 100 films only authenticates once.
    • Quota Preservation: Films that already have a .srt file (including those bundled with torrent downloads) are skipped automatically — no wasted quota.
    • Progressive Backlog Clearing: For large existing libraries, subtitles download progressively at 20 per day until the backlog is cleared. Since the media scraper runs every day at 5am, this will cleanly handle large libraries over a few days.
    • Wikipedia Canonical Checking: A sanity check now validates Wikipedia canonical titles before using them for subtitle searches, preventing wrong matches like "2010" searching as "1984 in film".
    • Ambiguous Resolution: Ambiguous film titles (e.g. 2010 (1984).mp4) are now correctly resolved to their full canonical title (2010: The Year We Make Contact) using the Wikipedia page title.
    • Quiet Warnings: If no credentials are configured, a single warning is logged at the start of the media scraper run and subtitles are silently skipped for all subsequent films — no per-film error spam.

    Developer Note on v7.0.0 Testing: While the core pipeline has been heavily tested for a week, the strict 20-download API limit means intensive multi-day backlog testing hasn't been simulated at scale. The scraper logs beautifully, but if you notice any edge-case bugs over the next few days, please open a GitHub issue!

    Media Scraper — IMDB Rating Removed

    IMDB bot detection now aggressively blocks automated scraping, so the IMDB rating has been removed. The Rotten Tomatoes score scraped from Wikipedia remains unaffected.

    ⚙️ MKV and SRT Conversion Pipeline Refactor...

    Read more »

  • Version 6.2 is available

    diddy05/28/2026 at 19:04 0 comments

    Version 6.2 update adds amazon fire stick full support via Silk web browser

    “No app install required”

    “Optimised for low-memory streaming devices”

    “Living room friendly UI”

    Yet the web page UI still works from mobile phones up to desktop pc web browsers too.

    Simply open the built in Silk web browser and browse to:

    http://mini-pi.local

    or enter the media server IP address directly.

    Amazon FireStick Support

    • Play/Pause button controls video and audio playback directly
    • D-pad navigation works natively through Silk cursor mode
    • Back button exits fullscreen playback
    • forward and backwards buttons supported for seeking through video
    • Second Back press returns to the main interface

    Idle Screensaver Mode

    To improve long-term display safety and give the UI a cleaner “home theater” feel:

    • After 2 minutes of inactivity:
      • titles
      • controls
      • status popups fade away automatically
    • Only the background remains visible
    • Any remote input, mouse movement, or screen tap instantly restores the UI
    • Helps reduce OLED/LCD image retention and burn-in risk

    MP4 Background & Playback Improvements

    A major optimisation was added for FireStick devices using animated MP4 backgrounds.

    New behaviour:

    • When playback starts, the looping background video is fully unloaded from memory
    • Prevents stuttering and failed playback starts on lower-memory devices

    Additional improvements:

    • A cinema-themed fallback image is shown during playback
      • 5 seconds after pausing
      • or automatically when playback ends

    Static backgrounds unaffected

    Users using JPEG or PNG backgrounds are completely unaffected by this change.

    MKV to MP4 Conversion optimisation tweak for software encoding

    Better reporting on average conversion frame rate in the logs for mkv-watcher under the service in systemd

    Also added guarding around Mkv-watcher and mkv-2-mp4.sh conversion scripts to stop new conversion files being missed

    You can download / upgrade by running the following on the Raspberry Pi (either SSH into the Pi or on the actual Pi) :-

    wget -qO- https://raw.githubusercontent.com/diddy-boy/mini-pi-media-server/main/install.sh | bash

    Mini-Pi Server via Silk browser on an Amazon Fire Stick on a 40 inch TV

  • Version 6.1 is now available

    diddy05/22/2026 at 22:49 0 comments

    Added .vtt subtitle support in a web browser for media files - now web viewing users can have English subtitles whilst watching media. Only English subtitles at this time.

    Dependant upon the DLNA client (Smart TV), .srt subtitles can be viewed across the network whilst watching media locally via dlna.
    Scraper now pulls down .srt subtitles for media if there is no present .srt file at 5am scan, as well as movie art, movie synopsis, IMDB rating and Rotten Tomato score.

    All .srt files and .vtt files are named the same as the media file.

    mkv-2-mp4 conversion now promotes not just the mkv file but also the .srt subtitle file from transmission directories and re-encode mkv to mp4 and also convert .srt to .vtt subtitles as well. keeping the .srt file.

    So each 'media file' will have a .mkv that gets converted to .mp4, .srt and end up with a .vtt file generated from the .srt file.

    Mkv-Watcher now logs less but more relevant info into the system log for the systemd service.
    Added screen aspect ratio for viewing media. this is remembered by the web browser
    Fixed upload file button with a progress bar popup when adding a new media file

    You can download / upgrade by running the following on the Raspberry Pi (either SSH into the Pi or on the actual Pi) :-

    wget -qO- https://raw.githubusercontent.com/diddy-boy/mini-pi-media-server/main/install.sh | bash

  • Version 6.0 is out

    diddy04/28/2026 at 15:12 0 comments

    Version 6 Update :

    • Midnight systemd encoding timer replaced by a mkv-watcher service  — encoding now triggers the moment a file is ready via inotify if a file changes in the /var/lib/minidlna/Video folder and sub folders or if a 5 minute mark is reached and the files are not locked. Users no longer have to wait until midnight for encoding media to start
    • Transmission seeding aware — won't encode until the user stops seeding after downloading
    • Power-loss recovery — mkv 2 mp4 encoder picks up where it left off on reboot and removes the part completed file and restarts encoding.
    • Client-side EQ and audio effects — zero load on the Pi, per-client settings in the web browser. screen shot below

    mkv-watcher.sh

    A persistent systemd service that monitors /var/lib/minidlna/Video for new video files.

    Triggers:

    • inotify — fires instantly when a new MKV lands in the Video folder directly or in a Transmission subfolder via close_write or moved_to events
    • Boot-time sweep — on startup, immediately checks for any unprocessed MKVs left over from a previous interrupted session
    • Periodic sweep — every 5 minutes checks subfolders for files no longer held open by Transmission (seeding finished), acting as a catch-all for anything inotify cannot detect

    Guards against:

    • Transmission incomplete downloads (.part files ignored)
    • Files still being written or seeded (stability check — 3 consecutive size-stable passes before triggering)
    • Double conversion (lock file check before triggering)
    • Stuck PROMOTING_ files from a previous power loss (cleaned on startup)
    • inotify process death (systemd Restart=on-failure with RestartSec=10)

    File stability check: Before triggering conversion, the watcher confirms the file is fully written by checking it is not held open by any process (lsof), passes 3 consecutive size-stable checks 30 seconds apart, and passes ffprobe validation.

    mkv-2-mp4.sh

    A one-shot conversion script triggered by the watcher (or manually via systemctl start mkv-conversion).

    Phase 1 — Promote: Scans all subfolders under the Video directory for completed Transmission downloads and moves them up to the root Video folder ready for conversion. Skips the protected Web folder (Google Drive sync). Only promotes subfolders containing exactly one video file — multiple files are left for manual review. Uses a PROMOTING_ prefix during the move for power-loss protection.

    Phase 2 — Convert: Processes every *.mkv in the Video folder sequentially:

    • Detects video codec, audio codec, and source bitrate via ffprobe
    • H264 source — stream copy (remux only, very fast, no quality loss)
    • HEVC/other source — re-encodes using hardware encoder (h264_v4l2m2m) on a Pi Zero 2 w with VideoCore GPU, with adaptive bitrate scaled to 70% of source (clamped 1.5Mbps–4Mbps)
    • Hardware fallback — if hardware encoding is not present like on a pi 5, automatically falls back to software (libx264) encoding.
    • Audio — copies AAC streams as-is, transcodes everything else to AAC 128k
    • All output files include -movflags +faststart for browser streaming compatibility
    • Uses a CONVERTING_ prefix during encode for power-loss protection — partial files are cleaned up on next run

    On completion logs:

    • Output file frame rate (content fps)
    • Encoding speed (encoder fps and realtime multiplier)
    • Output file size

    Post-conversion:

    • Resets permissions (775, minidlna:minidlna)
    • Restarts MiniDLNA to index new files
    • Lock file released, allowing the next 5-minute sweep to pick up any queued files

    You can download / upgrade by running the following on the Raspberry Pi (either SSH into the Pi or on the actual Pi) :-

    wget -qO- https://raw.githubusercontent.com/diddy-boy/mini-pi-media-server/main/install.sh | bash

  • Version 5.2 is now available

    diddy04/26/2026 at 12:11 0 comments

    Project Update: Enhanced Media Automation & Robust Transcoding

    The mkv-2-mp4.sh script, which runs as a scheduled midnight systemd task, has been overhauled to improve automation, reliability, and hardware efficiency. This script acts as the "cleanup crew" for the Mini Pi Media Server, ensuring all new downloads are standardized for DLNA streaming.

    Key Features of this Update:

    • Intelligent "Promotion" Phase: The script now automatically scans Transmission download subfolders. If a folder contains exactly one video file, it "promotes" it to the main library, deletes the leftover clutter (NFOs, samples, etc.), and removes the empty directory.
    • Power-Loss Protection: To prevent file corruption during a power failure, the script now uses a PROMOTING_ or CONVERTING_ prefix for temporary files. The final filename is only applied upon successful completion of the move or transcode.
    • Adaptive Hardware Encoding: It leverages the Raspberry Pi's hardware acceleration (h264_v4l2m2m). The script now calculates an adaptive bitrate—aiming for 70% of the source quality—to balance file size and visual fidelity dynamically.
    • Smart Fallback Logic: If the hardware encoder fails , busy or running on a Raspberry Pi 5, the script automatically falls back to a multi-threaded software encode (libx264) with a specialized mobile-friendly resolution (960x540) to ensure the task finishes.
    • Automated Library Maintenance: After processing, the script handles the "housekeeping" by resetting permissions for the minidlna user and restarting the service to trigger an immediate library re-index.

    Workflow Logic:

    1. Locking: Prevents multiple instances from running simultaneously.
    2. Stream Copying: If the source is already H.264/AAC, it copies the streams without re-encoding to preserve 100% quality and save CPU.
    3. Cleanup: Automatically deletes the original .mkv files only after a successful .mp4 conversion is verified.

    You can download / upgrade by running the following on the Raspberry Pi (either SSH into the Pi or on the actual Pi) :-

    wget -qO- https://raw.githubusercontent.com/diddy-boy/mini-pi-media-server/main/install.sh | bash

View all 54 project logs

  • 1
    how to setup / update

    Instructions to set up :-

    do the usual raspberry pi imager stuff and set the settings with a name of mini-pi (ideally this name).

    set the wifi to your wifi (and password) and set the user as pi and set to use ssh services.

    Then write the image

    once done place the SD card / USB pen driver into the pi, power up the pi and log into your router to find the mini-pi ip address (or use a network tool like fing or angry ip scanner).

    SSH into the raspberry pi (using ssh pi@<THE IP ADDRESS OF THE PI>

    once logged into the Raspberry Pi, run this single command that downloads, unzips and installs the media server software all in one command by :-

     

    wget -qO- https://raw.githubusercontent.com/diddy-boy/mini-pi-media-server/main/install.sh | bash

    This will then run the installer which pulls down the most recent build which unzip's and run's the setup / configuration.

    you will be prompted for a samba user password (its easy to use the same password as your ssh login).

    you can select to :-

    Configure WiFi as an access point (if you run this then an ethernet connection has to be used to stream at home).

    you can at any time in the future, run ./reconfigure-wifi.sh from within the mini-pi directory.

    Configure Cloud syncing (Using either Google Drive, One Drive or MEGA)

    you can at any time in the future, rcploe-setup.sh from within the mini-pi directory.

    Configure syncing from a server every night

    then you can press enter to reboot.

    All setup now. have fun.

    if you are updating, its similar.

    just select to to configuring wifi, samba etc as your current settings will be preserved.

    just ssh into the raspberry pi and run the above command to download and install again or if you just want to reinstall run 'sudo ./pi-setup/mini-pi-setup.sh'

View all instructions

Enjoy this project?

Share

Discussions

diddy wrote 02/04/2026 at 11:19 point

Version v4.3 contains a fix for the Pi 5's Wi-Fi and its known firmware issues with Trixie. If anyone is testing this on Trixie, let me know if it's working for you also

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates