0

我想在画布中显示视频,而不是在新窗口中打开。我想知道如何停止和暂停视频。

import pygame
from Tkinter import *
def movie():
    from moviepy.editor import *
    pygame.display.set_caption('Hello World!')
    clip = VideoFileClip('1.mp4')
    clip.preview()    
    pygame.quit()
root = Tk()
root.title("AVATAR")
label = Label(root, fg="dark green")
label.pack()
frame = Frame(root,background='red')
frame.pack()
canvas = Canvas(height=200,width=200)
canvas.pack()
conversationbutton = Button(frame, text='play in canvas',width=25,fg="green", command=movie)
conversationbutton.pack(side = RIGHT)
stopb=Button(root, text="stop").pack()

谢谢

4

0 回答 0