Convert Audio Files for Asterisk: Difference between revisions
From KlavoWiki
Jump to navigationJump to search
Created page with "To convert a file compatible with Asterisk, Mono 8khz <pre> mpg123 -m -r 8000 -w filename.wav filename.mp3 mpg123 -m -r 8000 -w /path-to-file/filename.wav /path/to/file/file..." |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
To convert a file compatible with Asterisk, Mono 8khz | To convert a file compatible with Asterisk, Mono 8khz<br> | ||
This will convert a mp3 file to wav | |||
<pre> | <pre> | ||
mpg123 | mpg123 -r 8000 -w or-disable.wav or-disable.mp3 | ||
mpg123 | </pre> | ||
Convert all files in a folder.<br> | |||
This will convert all mp3 files to wav and then delete the mp3 file. | |||
<pre> | |||
for filename in *.mp3; do mpg123 -r 8000 -w ${filename%%????}.wav ${filename}; rm -f ${filename}; done | |||
</pre> | </pre> | ||
[[Category : Asterisk]] | [[Category : Asterisk]] |
Latest revision as of 04:15, 27 June 2019
To convert a file compatible with Asterisk, Mono 8khz
This will convert a mp3 file to wav
mpg123 -r 8000 -w or-disable.wav or-disable.mp3
Convert all files in a folder.
This will convert all mp3 files to wav and then delete the mp3 file.
for filename in *.mp3; do mpg123 -r 8000 -w ${filename%%????}.wav ${filename}; rm -f ${filename}; done