0

I want to display the video in canvas instead opening in a new window. And I want to know how to stop and pause the video.

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()

Thanks

  • https://stackoverflow.com/questions/36635567/tkinter-inserting-video-into-window/36635901#36635901 – Pythonista Jun 03 '17 at 18:31
  • I still can't sop it from button and can't display it in specific area like 400*600 – Mohamed Salah Jun 03 '17 at 18:50
  • 1
    Then, implement the functionality to do so. SO isn't a code writing service. – Pythonista Jun 03 '17 at 18:51
  • There is a difference between a programmer and beginner. I hope u can understand that and respect that. I can display video as u commented but I tried to stop it or specify area after researching and i couldn't that is why I asked help! * I am an one-month python Thanks again in advance :) – Mohamed Salah Jun 03 '17 at 18:54
  • I'm voting to close this question as off-topic because SO isn't a code-writing service. – Pythonista Jun 03 '17 at 18:56
  • 1
    Thanks but it is a code-helping center for the people who don't know how! – Mohamed Salah Jun 03 '17 at 18:59

0 Answers0