doubt, newbie on the forum

Question, newbie on the forum, how could I put a video playing on the Nextcloud login page using PHP?

Hi @Brasil_X

Actual video files are not possible, or at least not out of the box. Also, I wouldn’t recommend to develop something like that, because loading times would increase and there might be compatibilty issues across different devices, depending on the codec used in the video file, etc. That’s not something you want for a login page, it simply needs to work.

What does work out of the box, however, is animated WebP background images. For example, with FFmpeg you can convert short video sequences into WebP animations and then upload them via Administration settings → Theming.

Example of a looping WebP animation generated from a sequence of PNGs: Generate looping WebP animation from image sequence with variable quality - FFmpeg By Example

Example of converting an MP4 file to WebP: Convert MP4 file to animated WebP in ffmpeg · GitHub

There are also tons of online converters available if you don’t want to use FFmpeg directly.

You could probably do it by customizing the login template and embedding an HTML5 video rather than handling the video itself through PHP. Just keep in mind that modifying core Nextcloud files may get overwritten during updates, so a theme or custom app would probably be the safer approach.