4.5 KiB
🎥 Kivy Media Player
A media player application built using Kivy that allows users to play video files, display images, and manage settings for quick connect codes and server configurations. The application checks for updates to the playlist every five minutes while running in full-screen mode.
📂 Project Structure
signage-player
├── src
│ ├── media_player.py # Handles media playback
│ ├── python_functions.py # Utility functions for downloading files and updating playlists
│ ├── kv
│ │ └── media_player.kv # Layout for the media player screen
│ ├── Resurse
│ │ ├── app_config.txt # Configuration file
│ │ ├── log.txt # Log file for media events
│ │ ├── play.png # Play button icon
│ │ ├── pause.png # Pause button icon
│ │ └── other icons... # Additional icons for the UI
│ └── static
│ └── resurse # Directory for media files (images/videos)
├── requirements.txt # Project dependencies
├── run_app.sh # Script to run the application
├── install.sh # Installation script
├── How to use.txt # Detailed usage instructions
└── README.md # Documentation for the project
🚀 Setup Instructions
Prerequisites
Before installing the application, ensure the following are installed on your Raspberry Pi:
- Python 3.7 or higher
- pip3 (Python package manager)
- ffmpeg (for video conversion)
- Internet connection for downloading dependencies
Installation Steps
-
Clone the Repository
git clone https://gitea.moto-adv.com/ske087/signage-player.git cd signage-player -
Run the Installation Script
./install.shThe installation script will:
- Update the system.
- Install required Python and system dependencies.
- Clone the repository to
/home/pi/Desktop/ds-player. - Add the run_app.sh script to
~/.bashrcfor autostart. - Make the run_app.sh script executable.
-
Reboot the Device After installation, reboot the Raspberry Pi to start the application automatically:
sudo reboot
🎮 How to Use
MediaPlayer Screen
- ▶️ Play/Pause Button:
- Toggles between playing and pausing the media.
- Automatically resumes playback after 30 seconds if not toggled again.
- ⏩ Next/⏪ Previous Buttons:
- Navigate to the next or previous media in the playlist.
- ❌ Exit App Button:
- Opens a password-protected popup. Enter the
quickconnect_keyfrom the configuration file to exit the app.
- Opens a password-protected popup. Enter the
Settings Screen
- Configuration Fields:
- Update fields like
screen_orientation,screen_name,quickconnect_key,server_ip, andport.
- Update fields like
- 💾 Save Button:
- Saves the updated configuration and returns to the MediaPlayer screen.
- ❌ Exit App Button:
- Opens a password-protected popup. Enter the
quickconnect_keyto exit the app.
- Opens a password-protected popup. Enter the
⚙️ Configuration
Configuration File
The configuration file is located at:
/home/pi/Desktop/signage-player/src/Resurse/app_config.txt
Example Configuration
{
"screen_orientation": "Landscape",
"screen_name": "tv-panou1",
"quickconnect_key": "8887779",
"server_ip": "172.20.10.9",
"port": "80"
}
Updating Configuration
- Navigate to the Settings Screen in the app.
- Update the fields and click Save.
- The configuration will be saved to app_config.txt.
🛠️ Troubleshooting
Permission Denied for run_app.sh
- Ensure the script is executable:
chmod +x /home/pi/Desktop/signage-player/run_app.sh
Application Does Not Start on Boot
- Verify the
~/.bashrcentry is correct. - Check the script's permissions and paths.
Media Files Not Playing
- Ensure media files are downloaded to the correct directory:
/home/pi/Desktop/signage-player/src/static/resurse - Check the playlist configuration and server connection.
Password for Exit App
- The password is the
quickconnect_keyfrom the configuration file (app_config.txt).
🤝 Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue for any suggestions or improvements.
📜 License
This project is licensed under the MIT License. See the LICENSE file for more details.