Move prints to beginning of function
This commit is contained in:
parent
f26177b6d7
commit
c14fc5a77d
@ -90,6 +90,7 @@ def remove_picture(inputfile):
|
|||||||
|
|
||||||
|
|
||||||
def loudness_info(inputfile) -> dict[str, str]:
|
def loudness_info(inputfile) -> dict[str, str]:
|
||||||
|
print("Measuring loudness of ", os.path.basename(inputfile))
|
||||||
# get format from file
|
# get format from file
|
||||||
# inputformat = get_format(inputfile)
|
# inputformat = get_format(inputfile)
|
||||||
# NOTE format is actually unnecessary here
|
# NOTE format is actually unnecessary here
|
||||||
@ -115,11 +116,11 @@ def loudness_info(inputfile) -> dict[str, str]:
|
|||||||
loudness: dict[str, str] = json.loads(loudness_json)
|
loudness: dict[str, str] = json.loads(loudness_json)
|
||||||
# print(loudness_json)
|
# print(loudness_json)
|
||||||
# print(ff.cmd)
|
# print(ff.cmd)
|
||||||
print("Measuring loudness of ", os.path.basename(inputfile))
|
|
||||||
return loudness
|
return loudness
|
||||||
|
|
||||||
|
|
||||||
def convert(inputfile, outputfile, loudness):
|
def convert(inputfile, outputfile, loudness):
|
||||||
|
print("Working on ", os.path.basename(inputfile))
|
||||||
ff = ffmpy.FFmpeg(
|
ff = ffmpy.FFmpeg(
|
||||||
inputs={inputfile: None},
|
inputs={inputfile: None},
|
||||||
outputs={
|
outputs={
|
||||||
@ -145,7 +146,6 @@ def convert(inputfile, outputfile, loudness):
|
|||||||
global_options=("-y", "-v error"),
|
global_options=("-y", "-v error"),
|
||||||
)
|
)
|
||||||
# print(ff.cmd)
|
# print(ff.cmd)
|
||||||
print("Working on ", os.path.basename(inputfile))
|
|
||||||
ff.run()
|
ff.run()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user