svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
apt-get install ffmpeg
).
Windows availability:
I have successfully built FFMPEG on Windows, but it is a convoluted process,
requiring the installation of a unix-like POSIX shell (MSYS) and libraries
(MinGW). Note: you do not need Cygwin.
The resulting DLLs can be used in a normal MS Visual C++ development environment.
The build process is documented on the Salyen's
Building FFmpeg on Windows site.
ffmpeg -version
To determine FFMPEG's supported formats/codecs, run ffmpeg -formats
For a dump of FFMPEG info, just run ffmpeg
, with no parameters.
An example of a simple video conversion:
ffmpeg -i INPUT.avi -s 320x240 -t 180 -ar 44100 OUTPUT.flv
-i
identifies the input video,
-s
specifies the output video dimensions,
-t
truncates the video to 180 seconds,
-ar
sets the output audio bitrate.
FFMPEG will use the input/output file extentions to determine the media formats/codecs to use;
this can be overridden by other parameters.
NOTE: As of this writing, the latest source from SVN breaks when trying to
build vhooks. The following warning has been added by an FFMPEG contributor to framehook.h:
ifeq ($(HAVE_IMLIB2),yes) in vhook/Makefile.
Note also: due to recent changes in FMPEG, the logo.c vhook mentioned below no longer works.
Rather than trying to continually update logo.c to work with a moving target, I will attempt to
work with the FFMPEG group to establish a new, stable plugin architecture.
|
logo.c
)
that composites a PNG logo (with alpha channels) or GIF (with transparency) onto a video;
it demonstrates a fairly straight-forward way of using libavformat's av_read_image
to
load static images. I intend to submit this to the FFMPEG source base.
AVImageFormat
for png in libavformat/allformats.h
uncomment av_register_image_fromat
for png in libavformat/allformats.c
rebuild FFMPEG
logo.c
documentation in Doxygen format.
Here are PNG and GIF sample logos to test with:ffmpeg -i sample.wmv -vhook 'vhook_path/logo.so -f logo.png -x -10 -y -10 -w 4 -h 4' sample.mpg