removido
(usa Nenhuma)
Enviado em 07/05/2017 - 20:52h
cd diretorio_das_musicas
for i in *.wav ; do ffmpeg -y -i "$i" -acodec libmp3lame "${i%wav}mp3" ; done
-----------------------------------------------------------------------------------------------------
# Antes:
mediainfo Track\ 23.wav
General
Complete name : Track 23.wav
Format : Wave
File size : 24.5 MiB
Duration : 2mn 25s
Overall bit rate mode : Constant
Overall bit rate : 1 411 Kbps
Writing application : gvfs-cdda using libcdio 0.83 i586-pc-linux-gnu
Audio
Format : PCM
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : 1
Duration : 2mn 25s
Bit rate mode : Constant
Bit rate : 1 411.2 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Bit depth : 16 bits
Stream size : 24.5 MiB (100%)
# Depois
mediainfo Track\ 23.mp3
General
Complete name : Track 23.mp3
Format : MPEG Audio
File size : 2.22 MiB
Overall bit rate mode : Variable
Writing library : LAME3.99.5
Audio
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Mode : Joint stereo
Mode extension : MS Stereo
Bit rate mode : Variable
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Compression mode : Lossy
Stream size : 2.22 MiB (100%)
Writing library : LAME3.99.5
Só muda o codec de áudio para mp3 sem altera o arquivo original, gerando no diretório atual arquivo mp3.
Para define a taxa de bits de áudio coloca a opção
-ab 64k ou outro valor.
Ex: ffmpeg -i audio.wav -acodec libmp3lame -ab 64k audio.mp3