GithubHelp home page GithubHelp logo

mercuryseries / tkvideo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from huskeee/tkvideo

0.0 2.0 0.0 297 KB

Python module for playing videos (without sound) inside tkinter Label widget using Pillow and imageio

License: MIT License

Python 100.00%

tkvideo's Introduction

Logo

tkVideo

Python module for playing videos (without sound) inside tkinter Label widget using Pillow and imageio

Contributors Forks Stargazers Issues MIT License

About The Project

tkVideo is a Python module for playing videos in GUIs created with tkinter. It does so by binding to a tkinter.Label widget of the user's choice and rapidly changing its image object.

Built With

Installation

End-users:

  • Clone the repo and run setup.py
git clone https://github.com/huskeee/tkvideo.git
python ./tkvideo/setup.py

or

  • Install the package from PyPI
pip install tkvideo

Developers and contributors

  • Clone the repo and install the module in developer mode
git clone https://github.com/huskeee/tkvideo.git
python ./tkvideo/setup.py develop

or

  • Install the package from PyPI in editable mode
pip install -e tkvideo

This will create a shim between your code and the module binaries that gets updated every time you change your code.

Usage

  • Import tkinter and tkvideo
  • Create Tk() parent and the label you'd like to use
  • Create tkvideo object with its parameters (video file path, label name, whether to loop the video or not and size of the video)
  • Start the player thread with <player_name>.play()
  • Start the Tk main loop

Example code:

from tkinter import *
from tkvideo import tkvideo

root = Tk()
my_label = Label(root)
my_label.pack()
player = tkvideo("C:\\path\\to\\video.mp4", my_label, loop = 1, size = (1280,720))
player.play()

root.mainloop()

Issues / suggestions

Have a problem that needs to be solved or a suggestion to make? See the issues page.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Xenofon Konitsas - @huskeeeeee - [email protected]

Project Link: https://github.com/huskeee/tkvideo

Special thanks to

  • @Pythonista on StackOverflow for the frame loading code
Readme file created using Othneil Drew's awesome template ♥

tkvideo's People

Contributors

huskeee avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.