Skip to content

Example for set size #19

Answered by PaulleDemon
mvolar asked this question in Q&A
Oct 12, 2022 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Hello @mvolar, set_size sets the video size, not the window or the frame.

So what you probably want is root.geometry("500x500) if you want to specify the position then you can use root.geometry('wxh+x+y')

import tkinter as tk
from tkVideoPlayer import TkinterVideo

root = tk.Tk()

root.geometry('500x500') # < ---------- This is what you need

tkvideo = TkinterVideo(scaled=False, master=root)
tkvideo.load(r"test.mp4")
tkvideo.pack(expand=True, fill="both")
tkvideo.set_size((1200, 600)) # sets the video  size
tkvideo.play() # play the video

root.mainloop()

If this solves your problem, make sure to mark this as the answer; if you have any further questions feel free to ask

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mvolar
Comment options

@PaulleDemon
Comment options

@mvolar
Comment options

@PaulleDemon
Comment options

Answer selected by mvolar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #18 on October 13, 2022 00:19.