3.7 KiB
3.7 KiB
Video Player Boot Setup
This document describes how the video player has been configured to start automatically on boot without IR remote control.
Changes Made
1. Updated Service Files
Both service files have been updated with the following changes:
- User: Changed from
pitotulivision - Working Directory: Updated to
/home/tulivision/rpi-tulivision - ExecStart: Updated to use virtual environment Python and added
--no-irflag - Environment Variables: Updated paths for tulivision user
- Removed: GPIO group requirement (no longer needed with
--no-ir) - Added: Better process termination handling
2. Service Files
video-player.service
- Description: Raspberry Pi Video Player (No IR Remote Control)
- Command:
video_player.py --no-ir - Behavior: Starts with default channel (channel 1)
video-player-random.service
- Description: Raspberry Pi Video Player with Random Video Startup (No IR Remote Control)
- Command:
video_player.py --no-ir --random - Behavior: Starts with a random video
3. Management Script
A management script manage_video_player.sh has been created with the following commands:
./manage_video_player.sh start # Start the video player service
./manage_video_player.sh stop # Stop the video player service
./manage_video_player.sh restart # Restart the video player service
./manage_video_player.sh status # Show service status
./manage_video_player.sh enable # Enable video player for boot (default channel)
./manage_video_player.sh enable-random # Enable random video player for boot
./manage_video_player.sh disable # Disable video player services from boot
./manage_video_player.sh logs # Show service logs (follow mode)
Installation Status
- ✅ Service files installed to
/etc/systemd/system/ - ✅
video-player.serviceenabled for boot - ✅
video-player-random.serviceavailable but disabled - ✅ Management script available in project directory
Current Configuration
- Active Service:
video-player.service(enabled for boot) - Startup Mode: Default channel (channel 1)
- IR Remote: Disabled (no GPIO access required)
- User: tulivision
- Working Directory: /home/tulivision/rpi-tulivision
- Python Environment: Virtual environment in venv/
Testing Results
- ✅ Service starts successfully
- ✅ VLC initializes without errors
- ✅ Video playback works
- ✅ Service stops cleanly
- ✅ No GPIO access required
- ✅ Automatic restart on failure
Boot Behavior
When the system boots:
- The
video-player.servicewill start automatically - It will initialize VLC without IR remote control
- It will scan the video directory and create channels automatically
- It will start playing the default channel (channel 1)
- If the service fails, it will restart automatically after 10 seconds
Switching Between Services
To switch to random video startup:
./manage_video_player.sh enable-random
To switch back to default channel startup:
./manage_video_player.sh enable
Troubleshooting
Check Service Status
./manage_video_player.sh status
View Service Logs
./manage_video_player.sh logs
Restart Service
./manage_video_player.sh restart
Disable Auto-Start
./manage_video_player.sh disable
Notes
- The service runs without IR remote control, so no GPIO access is required
- Videos are automatically discovered from the configured directory
- Channels are assigned automatically based on alphabetical order
- The service will restart automatically if it crashes
- All logging is sent to systemd journal