Added verbose mode
This commit is contained in:
parent
98c0382f9e
commit
eabc251ec7
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
test.sh
|
||||||
@ -109,6 +109,9 @@ def get_videolist(parentdir):
|
|||||||
videolist += get_mkv_list(path)
|
videolist += get_mkv_list(path)
|
||||||
if "-all_mp4" in sys.argv or "-any" in sys.argv:
|
if "-all_mp4" in sys.argv or "-any" in sys.argv:
|
||||||
videolist += get_mp4_list(path)
|
videolist += get_mp4_list(path)
|
||||||
|
if "-all_mp4" in sys.argv or "-any" in sys.argv:
|
||||||
|
videolist += get_mp4_list(path)
|
||||||
|
|
||||||
|
|
||||||
videolist_tmp = videolist
|
videolist_tmp = videolist
|
||||||
videolist = [video for video in videolist_tmp if video.is_file()]
|
videolist = [video for video in videolist_tmp if video.is_file()]
|
||||||
@ -146,6 +149,9 @@ def convert(oldfilename, newfilename):
|
|||||||
|
|
||||||
#args = ['/usr/bin/ffmpeg', '-i', oldfilename, newfilename]
|
#args = ['/usr/bin/ffmpeg', '-i', oldfilename, newfilename]
|
||||||
try:
|
try:
|
||||||
|
if "-verbose" in sys.argv:
|
||||||
|
subprocess.call(args)
|
||||||
|
else:
|
||||||
txt = subprocess.check_output(args, stderr=subprocess.STDOUT)
|
txt = subprocess.check_output(args, stderr=subprocess.STDOUT)
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
print(f"Conversion failed {e}")
|
print(f"Conversion failed {e}")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user