Small corrections/optimizatons
This commit is contained in:
parent
37bf7b7709
commit
c3946f337a
1 changed files with 7 additions and 9 deletions
|
@ -64,22 +64,20 @@ def main(argv):
|
||||||
# Check for needed Programs
|
# Check for needed Programs
|
||||||
global mpbin
|
global mpbin
|
||||||
mpbin = None
|
mpbin = None
|
||||||
if _mpbin == None:
|
if not _mpbin == None and os.path.exists(_mpbin) and not os.path.isdir(_mpbin):
|
||||||
mpbin = progpath("mplayer")
|
|
||||||
else:
|
|
||||||
if os.path.exists(_mpbin) and not os.path.isdir(_mpbin):
|
|
||||||
mpbin = _mpbin
|
mpbin = _mpbin
|
||||||
|
else:
|
||||||
|
mpbin = progpath("mplayer")
|
||||||
if mpbin == None:
|
if mpbin == None:
|
||||||
print "Error: mplayer not found in PATH binary given, Aborting!"
|
print "Error: mplayer not found in PATH binary given, Aborting!"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
global ffbin
|
global ffbin
|
||||||
ffbin = None
|
ffbin = None
|
||||||
if _ffbin == None:
|
if not _ffbin == None and os.path.exists(_ffbin) and not os.path.isdir(_ffbin):
|
||||||
ffbin = progpath("ffmpeg")
|
|
||||||
else:
|
|
||||||
if os.path.exists(_ffbin) and not os.path.isdir(_ffbin):
|
|
||||||
ffbin = _ffbin
|
ffbin = _ffbin
|
||||||
|
else:
|
||||||
|
ffbin = progpath("ffmpeg")
|
||||||
if ffbin == None:
|
if ffbin == None:
|
||||||
print "Error: ffmpeg not found in PATH and no binary given, Aborting!"
|
print "Error: ffmpeg not found in PATH and no binary given, Aborting!"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -226,7 +224,7 @@ def progpath(program):
|
||||||
def usage():
|
def usage():
|
||||||
"""Print avaiable commandline arguments"""
|
"""Print avaiable commandline arguments"""
|
||||||
|
|
||||||
print "This is n900-encode.py (C) 2010 Stefan Brand <seiichiro0185 AT tol.ch>"
|
print "This is n900-encode.py (C) 2010 Stefan Brand <seiichiro0185 AT tol DOT ch>"
|
||||||
print "n900-encode.py usage:\n"
|
print "n900-encode.py usage:\n"
|
||||||
print "--input <file> [-i]: Video to Convert"
|
print "--input <file> [-i]: Video to Convert"
|
||||||
print "--output <file> [-o]: Name of the converted Video"
|
print "--output <file> [-o]: Name of the converted Video"
|
||||||
|
|
Loading…
Reference in a new issue