OSDN Git Service

implement auto prcess suggestion system.
[rec10/rec10-git.git] / rec10 / trunk / src / tv2mp4.py
index ef8edff..9ebebbc 100644 (file)
@@ -57,6 +57,11 @@ def mkv2mp4(pin,pout):
     title=os.path.split(pin)[1]
     title=os.path.splitext(title)[0]
     audiopath=os.path.join(dir,title+"_audio.mp3")
+    if not os.path.exists(audiopath):
+        if os.path.exists(os.path.join(dir,title+"_audio.raw")):
+            audiopath=os.path.join(dir,title+"_audio.raw")
+        if os.path.exists(os.path.join(dir,title+"_audio.aac")):
+            audiopath=os.path.join(dir,title+"_audio.aac")
     videopath=os.path.join(dir,title+"_video.h264")
     #doexe = exe.encode('utf-8') + u' \"' + pin.encode('utf-8') + u'\" \"' + pout.encode('utf-8') + u'\"'
     exe0=exeb+" tracks \'"+pin+"\' 1:\'"+videopath+"\' 2:\'"+audiopath+"\'"