Showing posts with label ffmpeg. Show all posts
Showing posts with label ffmpeg. Show all posts

Wednesday, November 28, 2012

Convert CD tracks to mp3 using ffmpeg

Just a small chunk of code to convert CD tracks (aiff) to mp3 files:


#!/bin/bash
for i in {1..12}
do
  ffmpeg -i ${i}.aiff -f mp3 -acodec libmp3lame -ab 192000 -ar 44100 ${i}.mp3
done



Sunday, September 23, 2012

Batch convert videos and reduce filesize

*Must have ffmpeg to run the code below
#!/bin/bash
for i in *.MPG
do 
    ffmpeg -i ${i/.*/}.MPG -qscale 2.5 ${i/.*/}.mp4
    # ffmpeg -i $i.MPG -sameq $i.mp4
done