Detector Recording Exited Prematurely
This seems to happen when using a version of FFmpeg not fully compatible with your operating system or hardware.
Quick Fix with static build of N-119264-g2229b74127-20250415
This version is downloaded from https://github.com/BtbN/FFmpeg-Builds and mirrored at the following links for the listed architectures.
- Linux x64 : https://cdn.shinobi.video/binaries/ffmpeg/linux64-N-119264-g2229b74127-20250415.zip
- Linux ARM64 : https://cdn.shinobi.video/binaries/ffmpeg/linuxarm64-N-119264-g2229b74127-20250415.zip
Extract the downloaded zip to the ffmpeg folder within your Shinobi folder. By default Shinobi is installed at /home/Shinobi so you can extract to the folder /home/Shinobi/ffmpeg. If it doesn't exist you can create it.
mkdir /home/Shinobi/ffmpeg
At present, for Shinobi to detect the build in this folder you must install ffbinaries. Run the following to install it :
cd /home/Shinobi && npm i ffbinaries
Note : Shinobi will not use the module to download any other FFmpeg builds if you have extract the previously downloaded zip to the directory. In future you will not need to do this step. These builds will be offered in a more streamlined way.
Once extracted the file structure should be like :
| - /home/Shinobi | -- ffmpeg | ---- ffmpeg | ---- ffprobe
Then finally make them executable.
chmod +x /home/Shinobi/ffmpeg/ff*
Then restart Shinobi to make it use these binaries. You may need to become root (or the user that installed Shinobi) to run this command.
pm2 flush && pm2 restart camera && pm2 logs
Enjoy!