Some tips to remember while using ffmpeg in ubuntu:
#install restricted packages (more info in: http://ubuntuforums.org/showthread.php?t=786095 )
sudo apt-get install ubuntu-restricted-extras
# video converting with ffmpeg
The default ffmpeg installation does not support all features so do this way:
sudo apt-get install ffmpeg libavcodec-extra-52
#Change flv/avi files to mp4(parameters customized for nokia 5800 mobile phone)
ffmpeg -f mp4 -vcodec libxvid -s 640x360 -b 768k -r 25 -aspect 16:9 -acodec libfaac -ab 96k -ar 44100 -ac 2 output.mp4 -i input.avi/flv
#change to mp3 (more info in http://ubuntuforums.org/showthread.php?t=1125181 )
ffmpeg -acodec libmp3lame -ac 2 -ab 128 -vn -y output.mp3 -i “mysource.flv”
# bash scrit to convert all files in a folder to mp4 using the above method
for i in *;
do ffmpeg -f mp4 -vcodec mpeg4 -b 2200k -r 30 -s 640x360 -acodec libfaac -ar 32000 -ab 128k -ac 2 "_$i.mp4" -i "$i";
done
# convert all files in the current folder to mp3
for i in *;
do ffmpeg -acodec libmp3lame -ac 2 -ab 128 -vn -y "_$i.mp3" -i "$i";
done
#install restricted packages (more info in: http://ubuntuforums.org/showthread.php?t=786095 )
sudo apt-get install ubuntu-restricted-extras
# video converting with ffmpeg
The default ffmpeg installation does not support all features so do this way:
sudo apt-get install ffmpeg libavcodec-extra-52
#Change flv/avi files to mp4(parameters customized for nokia 5800 mobile phone)
ffmpeg -f mp4 -vcodec libxvid -s 640x360 -b 768k -r 25 -aspect 16:9 -acodec libfaac -ab 96k -ar 44100 -ac 2 output.mp4 -i input.avi/flv
#change to mp3 (more info in http://ubuntuforums.org/showthread.php?t=1125181 )
ffmpeg -acodec libmp3lame -ac 2 -ab 128 -vn -y output.mp3 -i “mysource.flv”
# bash scrit to convert all files in a folder to mp4 using the above method
for i in *;
do ffmpeg -f mp4 -vcodec mpeg4 -b 2200k -r 30 -s 640x360 -acodec libfaac -ar 32000 -ab 128k -ac 2 "_$i.mp4" -i "$i";
done
# convert all files in the current folder to mp3
for i in *;
do ffmpeg -acodec libmp3lame -ac 2 -ab 128 -vn -y "_$i.mp3" -i "$i";
done
Comments