Version 3.4 now has a mkv to mp4 batch conversion script that converts any mkv videos to streamable mp4 videos in the /var/lib/minidlna/Video directory.
During the setup (mini-pi-setup.sh), the user is asked if they want to set up a timed conversion of mkv files to mp4 (at midnight). that will batch convert any mkv videos to mp4.
The script will attempt to use hardware encoding on the Pi Zero 2 w (around 8fps) and on the pi 4 (around 20fps) but on the raspberry pi 5 will use software encoding (around 50fps).
Bearing in mind how low spec the pi zero 2 w is, 8fps conversion speed at full 1080p video is actually quite impressive.
50fps on a pi 5 is also quite good for a cheap mini computer. I spent a few nights optimising the ffmpeg compression and speed.
The script will intelligently probe the mkv files before hand and if it contains a mp4 video and aac audio just remux the file into a mp4 file.
But the script will also cater for if the audio is in correct format but the video is not then it remuxes audio but converts the video or if the audio is in the wrong format but the video is in the correct format will convert the audio and remux the video.
the script can also be ran manually by running 'sudo ./mkv-2-mp4.sh' within the config folder.
Also fixed an issue with samba write permissions.
the download can be ran on a raspberry pi by :-
wget https://github.com/diddy-boy/mini-pi-media-server/archive/refs/heads/main.zip && unzip main.zip && cd mini-pi-media-server-main && unzip pi-setup*.zip && mv pi-setup ~/ && cd ~ && rm -rf mini-pi-media-server-main main.zip && cd pi-setup && sudo ./mini-pi-setup.sh
diddy
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.