A simple Tkinter Python Package For synced audio & video playback.
Project description
tkintervideo
A simple Tkinter Python Package For synced audio & video playback with a real-time API.
Installation
- From PyPi
-
pip install tkvideo
-
- From source
-
pip install -r requirements.txt
- Build it normally(refer web).
-
Features:
- Controls Widget Added
- Timeline seeking.(slider based & button based)
- Synced audio playback.(Video is synced with audio)
- Upto any Resolution video playback(using PIL & imageio)
- TODO: youtube/hls support.
- In-player real-time audio & video edits.
- duration
- fps
- audio frame rate
- state detection
- auto resize(based on window resize)
- total frames
- current play position
- seeking(to a second or a frame)
- play/pause/stop/resume
- volume
- edits(you can edit the video & audio because moviepy & pydub are built-in)
Usage
from tkvideo.tkvideo import player
from tkvideo.tkvideo.tools import Controls
import tkinter as tk
from tkinter import ttk
import sv_ttk
import time
class App(tk.Tk):
def __init__(self,*args,**kwargs):
super().__init__(*args,**kwargs)
sv_ttk.set_theme('dark')
self.m_widget = player.Player(self,height=200,width=300)
self.rowconfigure(0,weight=1)
self.rowconfigure(1,weight=0)
self.columnconfigure(0,weight=1)
self.m_widget.grid(column=0,row=0,sticky=tk.NSEW,padx=5,pady=5)
self.m_widget.load('output.avi')
self.controls = Controls(self,self.m_widget)
self.m_widget.bind("<<Duration>>",self.controls.update_scale)
self.controls.grid(column=0,row=1,sticky=tk.NSEW,padx=10,pady=10)
myApp = App()
myApp.mainloop()
Contributing
Pull requests are welcome.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tkintervideo-0.0.2.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file tkintervideo-0.0.2.tar.gz
.
File metadata
- Download URL: tkintervideo-0.0.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67c84f8476bef1fb1909a8e0d4640b012ed478c68111303049f83af855e96165 |
|
MD5 | 02328d7e2fc86325d2ab419bbcac2280 |
|
BLAKE2b-256 | 6255f4e86ccc084d820a9d483034fd3c5f9c0e0199495a0aab190161612eb3d2 |
File details
Details for the file tkintervideo-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: tkintervideo-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b525adf437a88aab8909a6c7458562957a496fc2d054a7c8bf8954342a221b34 |
|
MD5 | 406a8e4098bf9140a7b34b9b26e74d5d |
|
BLAKE2b-256 | 74b00533ec32b37e0e43c2af5adcbb6ad060f556f504e7313d02cf8124cf7f35 |