OSDN Git Service

not to show db error.
[rec10/rec10-git.git] / rec10 / trunk / src / tv2audio.py
1 import os.path
2 #!/usr/bin/python
3 # coding: UTF-8
4 # Rec10 TS Recording Tools
5 # Copyright (C) 2009-2010 Yukikaze
6 import os
7 import configreader
8
9 def wav2aac_nero(pin,pout):
10     os.environ['LANG']="ja_JP.UTF-8"
11     neroaac=configreader.getpath('NeroAAC')
12     exe=neroaac+" -br 128000 -2pass -if \""+pin+"\" -of \""+pout+"\""
13     try:
14         os.system(exe.encode('utf-8'))
15     except:
16         if not os.path.exists(pout):
17             lame="lame"
18             exe=lame+" -b 128 \""+pin+"\" \""+pout+"\""
19             os.system(exe.encode('utf-8'))
20 def wav2mp3_lame(pin,pout):
21     os.environ['LANG']="ja_JP.UTF-8"
22     lame="lame"
23     exe=lame+" -b 128 \""+pin+"\" \""+pout+"\""
24     os.system(exe.encode('utf-8'))