--geometry=40x10
あと、ファイル選択時の初期ディレクトリはルートに変更
(initialdir='/')
ついでに、今後の見た目変更を視野に、各ウィジェットはttkのものを使うことにした。from Tkinter import *
from ttk import *
なお、Tkinterの境界幅指定で使ったbd=、は使えないようだ
ttkでは、bdはborderに変更する
今回のソースは↓
#! /usr/bin/env python
# coding: utf-8
from Tkinter import *
from ttk import *
import tkFileDialog
import commands
inp=""
mado=Tk()
mado.title('ffmpeg GUI')
s = Style()
s.theme_use('default')
waku=Frame(mado, width=320, height = 240)
waku.pack(fill=BOTH, expand=1)
def load():
global inp
inp=tkFileDialog.askopenfilename(initialdir='/')
waku0.label0_textvariable=inp
label0.configure(text=inp)
labelhelp.configure(text='2.SELECT OPTIONS')
botan1=Button(waku, text="load",padding=6, command = load)
botan1.grid(row=0, column=0,sticky=W+E)
def combo(*args):
global option,outp
opt=box.get()
a = opt.split(',')
option=a[0]
kaku=a[1]
outp = inp[:-4] + kaku
label1.configure(text=outp)
label2.configure(text='')
box = Combobox(waku, values= (' -vn -acodec copy ,.m4a', ' -vcodec copy -an ,.m4v',' -aspect 16:9 -codec copy ,16:9.mp4',' -aspect 4:3 -codec copy ,4:3.mp4',' -codec copy ,'))
box.current(0)
box.bind("<<ComboboxSelected>>",combo)
box.bind("<Enter>",combo)
box.grid(row=0, column=1,sticky=NSEW)
waku0=Frame(waku, width=320, height = 240)
waku0.grid(row=1, column=0, columnspan=2,sticky=W+E)
labelhelp=Label(waku0, text='1.PRESS LOAD !', width=32)
labelhelp.pack()
label0=Label(waku0, text='')
label0.pack()
label1=Label(waku0,text='')
label1.pack()
label2=Label(waku0,text='')
label2.pack()
def go():
avcmd = 'lxterminal --geometry=40x10 --command=\'ffmpeg -i "' + inp + '"' + option + '"' + outp + '"\''
commands.getoutput(avcmd.encode('utf-8'))
botan3=Button(waku, text="GO!!",padding=6, command = go)
botan3.grid(row=2, column=0, columnspan=2,sticky=W+E)
mado.mainloop()

