You can absolutely do this without the need for a GUI desktop or logging in. I used this technique to have a RPi Zero 1.3 (no network) boot directly into
omxplayer continually looping a video -- a 2 hour aquarium loop in my case. Here's how I did it using
Create a file in
Description=Ambient scenery display
ExecStart=/usr/bin/omxplayer -r --loop --vol -6000 -o hdmi "/path/to/video.mp4"
Enable the service with
sudo systemctl enable omxplayer.
The RPi should boot and launch
omxplayer early in the boot process. The console is useless at this point, and the Pixel desktop inaccessible unless you add something to kill
omxplayer when needed. The player runs in the background, so pressing
[esc] won't exit it. If the RPi is networked, you can access it via the network normally.
Note the use of the
--vol -6000 for silent (change to suit),
-r to adjust the framerate to the video,
--loop to loop continuously (with a short blank between loops, unfortunately), and
-o hdmi to force HDMI output.