mirror of
https://github.com/master-of-zen/Av1an.git
synced 2024-11-24 18:18:06 +00:00
fixed audio issues
all audio encodes to opus
This commit is contained in:
parent
34dce2a237
commit
17e7eb4e6c
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -48,7 +48,7 @@ def extract_audio(input_vid):
|
|||
"""
|
||||
Extracting audio from video file
|
||||
"""
|
||||
cmd = f'ffmpeg -i {os.getcwd()}/{input_vid} -vn -acodec copy {os.getcwd()}/temp/audio.aac'
|
||||
cmd = f'ffmpeg -i {os.getcwd()}/{input_vid} -vn -acodec libopus {os.getcwd()}/temp/audio.opus'
|
||||
subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).wait()
|
||||
|
||||
|
||||
|
@ -92,7 +92,7 @@ def concat():
|
|||
for file in sorted(files):
|
||||
f.write(f"file '{os.path.join(root, file)}'\n")
|
||||
|
||||
cmd = f'ffmpeg -f concat -safe 0 -i {os.getcwd()}/temp/concat.txt -i {os.getcwd()}/temp/audio.aac -c copy output.webm'
|
||||
cmd = f'ffmpeg -f concat -safe 0 -i {os.getcwd()}/temp/concat.txt -i {os.getcwd()}/temp/audio.opus -c copy output.webm'
|
||||
subprocess.Popen(cmd, shell=True).wait()
|
||||
print('File finished')
|
||||
|
||||
|
|
Loading…
Reference in a new issue