Batch convert audio files
Closed this issue · 0 comments
talha131 commented
See code here
If file is audio, then convertFile
method is immediately called. If you have 1000 files, convertFile
will be called 1000 times. It is not necessary, because ffmpeg has support for multiple inputs and multiple outputs.
For example, this command converts two files.
ffmpeg -i "2017-12-15 130550.mp3" -i "2018-01-19 131624.mp3" -map 0:0 -ac 1 -ab 64k -ar 44100 "2017-12-15 130550.wav" -map 1:0 -ac 1 -ab 64k -ar 44100 "2018-01-19 131624.wav"
Or
ffmpeg -i "2017-12-15 130550.mp3" -i "2018-01-19 131624.mp3" -ac 1 -ab 64k -ar 44100 -map 0:0 "2017-12-15 130550.wav" -map 1:0 "2018-01-19 131624.wav"
This converts files simultaneously.