OSDN Git Service

not to show db error.
[rec10/rec10-git.git] / rec10 / trunk / src / tv2audio.py
index 92fdf36..c59a335 100644 (file)
@@ -1,3 +1,4 @@
+import os.path
 #!/usr/bin/python
 # coding: UTF-8
 # Rec10 TS Recording Tools
@@ -9,7 +10,13 @@ def wav2aac_nero(pin,pout):
     os.environ['LANG']="ja_JP.UTF-8"
     neroaac=configreader.getpath('NeroAAC')
     exe=neroaac+" -br 128000 -2pass -if \""+pin+"\" -of \""+pout+"\""
-    os.system(exe.encode('utf-8'))
+    try:
+        os.system(exe.encode('utf-8'))
+    except:
+        if not os.path.exists(pout):
+            lame="lame"
+            exe=lame+" -b 128 \""+pin+"\" \""+pout+"\""
+            os.system(exe.encode('utf-8'))
 def wav2mp3_lame(pin,pout):
     os.environ['LANG']="ja_JP.UTF-8"
     lame="lame"