In summary Raspberry Pi as:
1. Cloud server
2. VPN server
3. NAS
4. Music server
5. Media Player (current post)
To be able to do all of the above, I think it is better to keep the original Raspbian distribution. RP 4 is much faster than other RPs however it is still too slow for playing videos in 4K. I found Kodi very slow on RP 4. VLC is performing well if you overclock CPU and GPU and set the memory for GPU higher than default. RP 4 CPU gets hot easily so in order to overclock it I bought a small fan for it and since I wanted to mount ALLO DigiOne HaT on top of it I bought pin header.
sudo emacs /boot/config.txt
Add the following (warning overclocking is never recommended!)
over_voltage=4
arm_freq=2000
gpu_freq=600
gpu_mem=512reduce your screen resolution.
if you want to play a file using ssh remotely use the following:
export DISPLAY=:0
vlc -f file.mp4
to be able to control VLC remotely in preferences>>show all>>Main interfaces check Web and set a password for Lua HTTP
best remote app for VLC can be found here:
https://hobbyistsoftware.com/VLC-more
If you want to control your TV using HDMI cable:
sudo apt install cec-utils
echo 'scan' | cec-client -s -d 1
for turning on the TV:
echo 'on DEVICE_NUMBER' | cec-client -s -d 1
for more info: https://www.linuxuprising.com/2019/07/raspberry-pi-power-on-off-tv-connected.html