Вот
#!/usr/bin/python3.4
# -*- coding: utf-8 -*-
import tkinter as tk
import subprocess
num = 5
myfile = '/home/jon/1.MTS'
cmdline='mplayer -vo vaapi -cache 1024 -fps 30 -wid %s %s'
posx = [1, 481, 961, 1441, 1, 481, 961, 1441, 1, 481, 961, 1441, 1, 481, 961, 1441]
posy = [1, 1, 1, 1, 271, 271, 271, 271, 541, 541, 541, 541, 811, 811, 811, 811]
sx = 479
sy = 269
class WinFrame(tk.Frame):
def __init__(self):
tk.Frame.__init__(self, None)
self.x, self.y = posx[i], posy[i]
self.config(width=sx, height=sy)
self.place(x=self.x, y=self.y)
self.cmdline_win=cmdline%(self.winfo_id(), myfile)
self.player=subprocess.Popen(self.cmdline_win.split())
self.bind('<Button-1>', self.on_fullscreen)
def on_fullscreen(self, event):
if self.winfo_width()==sx:
self.config(width=1600, height=900)
self.place(x=100, y=50)
else:
self.config(width=sx, height=sy)
self.place(x=self.x, y=self.y)
if __name__ == '__main__':
root = tk.Tk()
root.config(bg='blue')
root.attributes("-fullscreen", True)
for i in range(num):
WinCam = WinFrame()
root.mainloop()