Design  HTML

Latest News:

Technology:

FFMPEG is a most popular command line tool to convert media files such as audio, video and images from one format to another. We are going to learn ffmpeg command usage to convert other media format to current most popular streaming FLV format. FFMPEG is cross platform tool and does not require any Gui, support several command line options to control your conversion. The other video format can not be played directly in web browser. A right way to publish your videos for viewing in a browser is using FLV wide acceptable format.

How to convert / FFMPEG usage command

Convert other video format to FLV

ffmpeg -i video.avi -ar 22050 -ab 32 -f flv -s 320×240 video.flv

-i input file name
-ar audio sampling rate in Hz
-ab audio bit rate in kbit/s
-f output format
-s output dimension

Convert other video to FLV with metadata

This require flvtool2 tool to be installed on your box.

ffmpeg -i video.avi -ar 22050 -ab 32 -f flv -s 320×240 – | flvtool2 -U stdin video.flv

Convert FLV vidoe to jpg image sequence

This command used to extract frame image sequence.

ffmpeg -i video.flv -an -r 1 -y -s 320×240 video%d.jpg

-i Input file name
-an disable audio
-r fps
-y overwrite file
-s output dimension

Convert particular frame to jpg

Return one particular jpeg image of the frame based on start and end time.

ffmpeg -i video.flv -an -ss 00:00:03 -t 00:00:01 -r 1 -y -s 320×240 video%d.jpg

-ss record start time
-t record end time last for

Return first frame of video as jpeg image.

ffmpeg -i video.flv -vcodec png -vframes 1 -an -f rawvideo -s 320×240 video%d.jpg