OSDN Git Service

fix many bugs.
[rec10/rec10-git.git] / rec10 / trunk / src / tv2audio.py
index 4bfd97a..cc837e8 100644 (file)
@@ -121,10 +121,8 @@ def ts2singlewav(pts,opts):
     exe = 'wine ' + bontsdemux + " -i \"" + bonpin + "\" "+delayt+" -nd -sound 0 -o \"" + bonpout + "\""\r
     #recdblist.printutf8(exe)\r
     recdblist.printutf8(exe)\r
-    p=subprocess.Popen(exe.encode('utf-8'),shell=True)\r
-    os.waitpid(p.pid, 0)\r
-    logt=unicode(p.communicate()[0], "UTF-8")\r
-    recdblist.addCommandLog(ots, u"BonTsDemux 音声取り出し", exe, logt)\r
+    txt=commands.getoutput(exe.encode('utf-8'))\r
+    recdblist.addCommandLog(pts, u"BonTsDemux 音声取り出し", exe, txt)\r
 def ts2single_mp3_ffmpeg(pts):\r
     pmp3=pts.replace(".ts",".mp3")\r
     ffmpeg=configreader.getConfPath("ffmpeg")\r