Posts Tagged ‘ffmpeg’

ffmpeg – capture screenshot from a video file

1
ffmpeg -i /my_video_file_dir/video.flv -y -f image2 -ss 8 -sameq -t 0.001 -s 320*240 /image_dir/screenshot.jpg

320*240 : image dimension is 320 pixels width and 240 pixels height
-ss 8 : screenshot will be taken at 8 second after video starts.

  • Share/Save/Bookmark

Linux ffmpeg audio conversion – MP3 to FLV

Want to play MP3 files on your website? The best and most common way is using flash video file which compress audio and video better for internet use like YouTube. Here is the instruction I used ffmpeg to convert MP3 to FLV file.

ffmpeg – a program that allow convert audio in numerous formats.

Installing ffmpeg
edit / etc/yum.repos.d/CentOS-Base.repo , add following lines at the end of file

1
2
3
4
[dag]
name=Dag RPM Repository for Centos
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
enabled=1

run this command

1
yum install ffmpeg

Convert MP3 to FLV

1
ffmpeg -y -i /home/song.mp3 -f flv -acodec mp3 -ab 64 -ac 1 /home/song.flv
  • Share/Save/Bookmark