quick fix 2

This commit is contained in:
Bartłomiej Patyk
2025-10-22 19:05:25 +02:00
commit e5e64b6dc8
598 changed files with 300649 additions and 0 deletions

View File

@ -0,0 +1 @@
pip

View File

@ -0,0 +1,19 @@
Copyright (c) 2018 The Python Packaging Authority
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,100 @@
Metadata-Version: 2.1
Name: bvPlayer
Version: 0.4.0
Summary: A borderless video player with sound
Home-page: https://github.com/jwcarlson01/bvPlayer
Author: Joshua Carlson
Author-email: joshuacarlson@cedarville.edu
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: ffpyplayer (>=4.3.2)
Requires-Dist: opencv-python (>=4.5.5.62)
Requires-Dist: Pillow (>=9.0.1)
# bvPlayer
A borderless video player for python. Comes with a variety of functions such as audio synchronization, FPS adjustment, video scaling, window dragging, and menu options.
Audio synchronization is done through frame skipping and frame delaying. Fps adjustments is done through randomly selecting frames within small chunks. The user is limited to an approximation of their input fps, this is to make the video look smoother.
# Resources
This package was implemented with:
- [opencv](https://pypi.org/project/opencv-python/), for frame loading from a video file
- [Pillow](https://pypi.org/project/Pillow/), for displaying images on tkinter
- [ffpyplayer](https://pypi.org/project/ffpyplayer/), for audio synchronization
# Installation
- Download the repository and run `setup.py`
```
git clone https://github.com/jwcarlson01/bvPlayer.git
python bvPlayer/setup.py
```
- Install from PyPI
```
pip install bvPlayer
```
# Usage
- import the bvPlayer package and class
```
from bvPlayer import bvPlayer
```
- call the class with a filename and optional arguments
```
bvPlayer("file.mp4")
```
The video will play upon the class declaration.
## Optional Arguments
If optional arguments are not specified, the video will default to its orginal fps, (0,0) position on the screen, non-draggable, its original dimensions, and no videoOptions.
<br/><br/>
- fps, to change the display fps to a number less than the file fps
```
fps = float
```
- pos, to change the start-up display location on the screen
```
pos = (int x, int y)
```
- draggable, to make the window draggable
```
draggable = bool
```
- dim, to scale the video output to a desired dimension
```
dim = (int w, int h)
```
- videoOptions, to enable options when right clicking the video, includes quit and restart
```
videoOptions = bool
```
# Example
```
from bvPlayer import bvPlayer
bvPlayer("file.mp4", draggable = True, fps = 28, dim = (854, 480))
```
# Performance
There are two approaches to playing a video on tkinter, either to pregenerate images in a folder and read those images after onto tkinter, or to dynamically load images and display them at the same time.
bvPlayer uses the dynamic approach. bvPlayer uses opencv to load images into temporary files. These temp files are then read by Pillow to be displayed on tkinter. Naturally there is a heavy performance loss using the dynamic approach. bvPlayer uses one thread to read frames, two threads to write frames to temp files, and one thread to display the video and play the audio.
bvPlayer will run a 1080p video on a low end CPU at 20 fps, while using about 60-100% of the CPU. A 480p video will run at 45 fps, using about 40-80% of the CPU; and a 360p video will run at 65 fps, using about 20-60% of the CPU.
bvPlayer keeps only a small number of frames loaded in RAM, so when running a 1080p video it uses less than 200 MB of RAM.
bvPlayer writes its images to temp files, therefore it uses the disk. Expect at most 5MB/s at 1080p.
# Contact
I'm always open for suggestions. View the [issues page](https://github.com/jwcarlson01/bvPlayer/issues) for issues.
Joshua Carlson - joshuacarlson@cedarville.edu
<br/><br/>
*Readme inspired by [tkvideo](https://github.com/huskeee/tkvideo)*

View File

@ -0,0 +1,13 @@
bvPlayer-0.4.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
bvPlayer-0.4.0.dist-info/LICENSE.txt,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
bvPlayer-0.4.0.dist-info/METADATA,sha256=9HEvFW_zEUEk8yMKZfhaJDL8-US--gC1Vs4jf9AYR1w,3801
bvPlayer-0.4.0.dist-info/RECORD,,
bvPlayer-0.4.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
bvPlayer-0.4.0.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
bvPlayer-0.4.0.dist-info/top_level.txt,sha256=WF25ao3tTCPmXDwoHC5G1zaFJ5EKiomwUzmy2BtrxTM,9
bvPlayer/VideoPlayer.py,sha256=V_7mUck5-Qvg7TZ7r6ko9FjrPtqvMFARsqMPhQDCDxg,9355
bvPlayer/__init__.py,sha256=4jnUz8c9-bIYcYrruvxhjGvA_kANicI_eL5bOZq2Yf4,32
bvPlayer/__pycache__/VideoPlayer.cpython-313.pyc,,
bvPlayer/__pycache__/__init__.cpython-313.pyc,,
bvPlayer/__pycache__/bvPlayer.cpython-313.pyc,,
bvPlayer/bvPlayer.py,sha256=L3vGmW82c6RpqnPovhxnB_5_CBLHm-5FM5RCaIMCukM,339

View File

@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.37.1)
Root-Is-Purelib: true
Tag: py3-none-any

View File

@ -0,0 +1 @@
bvPlayer