Notas de Luis

Audio - Fu

Convertimos wma a mp3

mplayer -quiet INPUT.wma -ao pcm
lame -quiet audiodump.wav
mv audiodump.wav.mp3 OUTPUT.mp3 -v
rm audiodump.wav

Convertir un wav a un mp3

ffmpeg -i INPUT.wav -acodec mp3 -ab 192k OUTPUT.mp3

Cortar un trozo de mp3

ffmpeg -i Audio.mp3 -ss [segundo _de_inicio] -t [duración_del_corte] AudioCortado.mp3

De .mp3 a .amr

ffmpeg -i INPUT.mp3 \
    -acodec amr_nb \
        -ar 8000 \
        -ac 1 \
        -ab 32 \
    OUTPUT.amr

Une varios ficheros mp3 en uno

ffmpeg -i INPUT1.mp3 -i INPUT2.mp3 -i INPUT3.mp3 \
    OUTPUT.mp3

Adjust volume of audio file, gives a 5 dB gain

ffmpeg -i input.wav -af "volume=5dB" output.mp3

Combine multiple sources to one destination

ffmpeg -f concat -i /tmp/list.txt output3.flac

where list.txt contains:

  * file ‘/tmp/file1’
  * file ‘/tmp/file2’

or try:

ffmpeg -i "concat:input1.mpg|input2.mpg|input3.mpg" -c copy output.mpg

better still:

ffmpeg -f concat -i <( for f in *.wav; do echo "file '$(pwd)/$f'"; done ) output.wav

Convert .dsf files (SACD) to standard .wav files

(PCM - CD quality). This however, does not give enough audio quality.

ffmpeg -i 04.dsf -acodec pcm_s16le -ar 44100 -ac 2 output.wav

Create multichannel WAVs or FLACs.

This command will ‘rip’ the first 5 minutes (which is the first song actually) of a quadraphonic (4.0) .WAV file that is 45 minutes long:

ffmpeg -i The\ Doobie\ Bothers-\ Toulouse\ Street.wav -acodec pcm_s16le -b:a 1400k -ss 0:0:0 -t 0:5:0 \
  *ac 4 -map_channel 0.0.0 -map_channel 0.0.1 -map_channel 0.0.4 -map_channel 0.0.5 output.wav -y

The resulting file ‘output.wav’ will be a multichannel wav with the following channel order:

  • front left
  • front right
  • rear left
  • rear right

When loaded into audacity, and then when exported into either .WAV or .FLAC move the channel slider to 6 channels and the following channel mix must be done:

  • output 1 → channel: 1
  • output 2 → channel: 2
  • output 3 → channel: 5
  • output 4 → channel: 6
computing/multimedia/audio-fu.txt · Última modificación: por 127.0.0.1