huskeee / tkvideo Goto Github PK
View Code? Open in Web Editor NEWPython module for playing videos (without sound) inside tkinter Label widget using Pillow and imageio
License: MIT License
Python module for playing videos (without sound) inside tkinter Label widget using Pillow and imageio
License: MIT License
There is no sound when playing mp4
hello is it possible to overrideredirect the window , same as tk ?
thanks
The speed of the video increases when you reduce the size of the video. How to fix this? Referring to tkVideo module. Really useful.
How do I detect when video is done playing
AttributeError: type object 'tkvideo' has no attribute 'tkvideo'
my error are: Exception in thread Thread-1: Traceback (most recent call last): File "C:\Users\rosel\AppData\Local\Programs\Python\Python38\lib\threading.py", line 932, in _bootstrap_inner self.run() File "C:\Users\rosel\AppData\Local\Programs\Python\Python38\lib\threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "C:\Users\rosel\AppData\Local\Programs\Python\Python38\lib\site-packages\tkvideo\tkvideo.py", line 51, in load label.config(image=frame_image) File "C:\Users\rosel\AppData\Local\Programs\Python\Python38\lib\tkinter\__init__.py", line 1637, in configure return self._configure('configure', cnf, kw) File "C:\Users\rosel\AppData\Local\Programs\Python\Python38\lib\tkinter\__init__.py", line 1627, in _configure self.tk.call(_flatten((self._w, cmd)) + self._options(cnf)) _tkinter.TclError: invalid command name ".!toplevel.!label"
someone can help me?
I downloaded the module through pip and then went into the libraries to check the code. I found the code is not updated with pull request #8 modifications.
Hi, i got this error:
Traceback (most recent call last):
File "c:\Users\ASUSTANUS\Documents\PYTHON-EXERCISES\prueba.py", line 7, in
player = tkvideo.tkvideo("video.mp4", my_label, loop = 1, size = (1280,720))
AttributeError: type object 'tkvideo' has no attribute 'tkvideo'
My code is:
`from tkinter import *
from tkvideo import tkvideo
root = Tk()
my_label = Label(root)
my_label.pack()
player = tkvideo.tkvideo("video.mp4", my_label, loop = 1, size = (1280,720))
player.play()
root.mainloop()`
When i play a mp4 video there is no sound. This i my code. I don't know whats wrong.
from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume
from ctypes import cast, POINTER
from comtypes import CLSCTX_ALL
from tkinter import *
from tkvideo import tkvideo
#play the rickroll video
root = Tk()
my_label = Label(root)
my_label.pack()
player = tkvideo("E:\RickRoll\RickRoll.mp4", my_label, loop = 100, size = (1920,1080))
player.play()
#put sound to max volume
devices = AudioUtilities.GetSpeakers()
interface = devices.Activate(IAudioEndpointVolume.iid, CLSCTX_ALL, None)
volume = cast(interface, POINTER(IAudioEndpointVolume))
volume.SetMasterVolumeLevel(0.0, None)
root.attributes('-fullscreen', True)
root.mainloop()
Thanks
So I've built tkvideo into my project, got my video playing.
I didn't want my video to be 1280x720, so I changed the resolution to 600x400.
What happened: Video Playback got really fast. When I altered the reolution to 1920x1080, i noticed that the Video would play slower.
Heres my code, I basically just altered the resolution, changed the label to my label's name ands changed the videopath & name:
player = tkvideo("./video.mp4", label, loop = 1, size = (600,400))
I used a Music Video in 480p. tried various Resolutions and they either started in sync and got faster, started slower and got faster, or were just completely off in terms of playback speed
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.