2
I would like to reduce the size of several Mp3 files in a directory with:
ffmpeg -i k.mp3 -acodec libmp3lame -ac 2 -ab 16k -ar 44100 k_.mp3
where K is the name of the Mp3 (k from 1 to 8):
I tried the following code:
import subprocess
for x in range(1, 9):
r = subprocess.call(["ffmpeg", " ffmpeg -i x.mp3 -acodec libmp3lame -ac 2 -ab 16k -ar 44100 x_.mp3"])
Then I would like to rename all the files like this:
1_mp3 vira Sri Harinama - Aula 1
2_mp3 vira Sri Harinama - Aula 2
3_mp3 vira Sri Harinama - Aula 3
4_mp3 vira Sri Harinama - Aula 4
5_mp3 vira Sri Harinama - Aula 5
...
9_mp3 vira Sri Harinama - Aula 9
Any suggestions?
thanks. Once I test, I come back here to comment and mark as solved!
– Ed S
:I tried to run:http://imgur.com/a/PKLOU but the code did nothing (nor did it fail either).
– Ed S
Are you running in the same directory as the files to be processed? Place the python script in the same file directory or change the working directory using
os.chdir
.– Thomaz Soares
Beginner doubt. If the files do not exist, you should not have an error message?
– Ed S