Created
August 29, 2018 09:05
-
-
Save EnriqueSoria/fa0fe3109558e0cabf5a38e283b64f7c to your computer and use it in GitHub Desktop.
AAC to MP3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import listdir as ls | |
from os.path import abspath | |
from subprocess import run | |
FFMPEG = r"C:\Another_apps\ffmpeg\bin\ffmpeg.exe" | |
command = '{program} -i "{inp}" -acodec libmp3lame "{out}"' | |
file_extension = '.aac' | |
for file in ls('.'): | |
if file.endswith(file_extension): | |
file = file.replace(file_extension, '') | |
run( | |
command.format( | |
program = FFMPEG, | |
inp = abspath('./' + file + file_extension), | |
out = abspath('./' + file + '.mp3') | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment