updated to final version
This commit is contained in:
202
README.md
202
README.md
@@ -1,62 +1,194 @@
|
||||
# Kivy Media Player
|
||||
|
||||
This project is a media player application built using Kivy. It 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.
|
||||
```markdown
|
||||
# 🎥 Kivy Media Player
|
||||
|
||||
## Project Structure
|
||||
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
|
||||
|
||||
```
|
||||
kivy-media-player
|
||||
signage-player
|
||||
├── src
|
||||
│ ├── main.py # Entry point of the Kivy application
|
||||
│ ├── settings.py # Manages the settings page
|
||||
│ ├── media_player.py # Handles media playback
|
||||
│ ├── utils.py # Utility functions for downloading files and updating playlists
|
||||
│ ├── python_functions.py # Utility functions for downloading files and updating playlists
|
||||
│ ├── kv
|
||||
│ │ ├── main.kv # Layout for the main application window
|
||||
│ │ ├── settings.kv # Layout for the settings page
|
||||
│ │ └── media_player.kv # Layout for the media player screen
|
||||
│ └── assets
|
||||
│ ├── images # Directory for image files
|
||||
│ └── videos # Directory for video files
|
||||
│ ├── 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
|
||||
---
|
||||
|
||||
1. Clone the repository:
|
||||
```
|
||||
git clone <repository-url>
|
||||
cd kivy-media-player
|
||||
## 🚀 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
|
||||
|
||||
1. **Clone the Repository**
|
||||
```bash
|
||||
git clone https://gitea.moto-adv.com/ske087/signage-player.git
|
||||
cd signage-player
|
||||
```
|
||||
|
||||
2. Install the required dependencies:
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
2. **Run the Installation Script**
|
||||
```bash
|
||||
./install.sh
|
||||
```
|
||||
|
||||
3. Run the application:
|
||||
```
|
||||
python src/main.py
|
||||
The 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 `~/.bashrc` for autostart.
|
||||
- Make the run_app.sh script executable.
|
||||
|
||||
3. **Reboot the Device**
|
||||
After installation, reboot the Raspberry Pi to start the application automatically:
|
||||
```bash
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
## Usage Guidelines
|
||||
---
|
||||
|
||||
- Upon launching the application, users can navigate to the settings page to enter their quick connect code and server IP/domain.
|
||||
- The media player screen allows users to view images and play videos from the playlist.
|
||||
- The application automatically checks for updates to the playlist every five minutes.
|
||||
## 🎮 How to Use
|
||||
|
||||
## Contributing
|
||||
### 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_key` from the configuration file to exit the app.
|
||||
|
||||
### Settings Screen
|
||||
- **Configuration Fields**:
|
||||
- Update fields like `screen_orientation`, `screen_name`, `quickconnect_key`, `server_ip`, and `port`.
|
||||
- **💾 Save Button**:
|
||||
- Saves the updated configuration and returns to the MediaPlayer screen.
|
||||
- **❌ Exit App Button**:
|
||||
- Opens a password-protected popup. Enter the `quickconnect_key` to exit the app.
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ Configuration
|
||||
|
||||
### Configuration File
|
||||
The configuration file is located at:
|
||||
```bash
|
||||
/home/pi/Desktop/signage-player/src/Resurse/app_config.txt
|
||||
```
|
||||
|
||||
### Example Configuration
|
||||
```json
|
||||
{
|
||||
"screen_orientation": "Landscape",
|
||||
"screen_name": "tv-panou1",
|
||||
"quickconnect_key": "8887779",
|
||||
"server_ip": "172.20.10.9",
|
||||
"port": "80"
|
||||
}
|
||||
```
|
||||
|
||||
### Updating Configuration
|
||||
1. Navigate to the **Settings Screen** in the app.
|
||||
2. Update the fields and click **Save**.
|
||||
3. The configuration will be saved to app_config.txt.
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ Troubleshooting
|
||||
|
||||
### Permission Denied for run_app.sh
|
||||
- Ensure the script is executable:
|
||||
```bash
|
||||
chmod +x /home/pi/Desktop/signage-player/run_app.sh
|
||||
```
|
||||
|
||||
### Application Does Not Start on Boot
|
||||
- Verify the `~/.bashrc` entry is correct.
|
||||
- Check the script's permissions and paths.
|
||||
|
||||
### Media Files Not Playing
|
||||
- Ensure media files are downloaded to the correct directory:
|
||||
```bash
|
||||
/home/pi/Desktop/signage-player/src/static/resurse
|
||||
```
|
||||
- Check the playlist configuration and server connection.
|
||||
|
||||
### Password for Exit App
|
||||
- The password is the `quickconnect_key` from 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.
|
||||
## 📜 License
|
||||
|
||||
install the requirements for fpyplayer
|
||||
This project is licensed under the **MIT License**. See the `LICENSE` file for more details.
|
||||
```
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev
|
||||
sudo apt-get install libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libpostproc-dev
|
||||
pip install ffpyplayer
|
||||
---
|
||||
|
||||
### Improvements Made:
|
||||
1. **Added Emojis**:
|
||||
- Emojis are used to make the sections visually appealing and easier to navigate.
|
||||
|
||||
2. **Improved Formatting**:
|
||||
- Added proper headings, subheadings, and code blocks for better readability.
|
||||
|
||||
3. **Enhanced "How to Use" Section**:
|
||||
- Added icons to represent buttons and actions.
|
||||
|
||||
4. **Troubleshooting Section**:
|
||||
- Clearly outlined common issues and their solutions.
|
||||
|
||||
5. **Contributing and License Sections**:
|
||||
- Added a friendly note for contributors and a license section.
|
||||
|
||||
---
|
||||
|
||||
Let me know if you need further adjustments or additional sections!---
|
||||
|
||||
### Improvements Made:
|
||||
1. **Added Emojis**:
|
||||
- Emojis are used to make the sections visually appealing and easier to navigate.
|
||||
|
||||
2. **Improved Formatting**:
|
||||
- Added proper headings, subheadings, and code blocks for better readability.
|
||||
|
||||
3. **Enhanced "How to Use" Section**:
|
||||
- Added icons to represent buttons and actions.
|
||||
|
||||
4. **Troubleshooting Section**:
|
||||
- Clearly outlined common issues and their solutions.
|
||||
|
||||
5. **Contributing and License Sections**:
|
||||
- Added a friendly note for contributors and a license section.
|
||||
|
||||
---
|
||||
|
||||
Let me know if you need further adjustments or additional sections!
|
||||
Reference in New Issue
Block a user