FFMPEG PDF Sequence 1
FFMPEG PDF Sequence 1
FFMPEG PDF Sequence 1
Intro to FFMPEG
Basics of Video
The Server
Basics of FFMPEG
Examples
+
FFMPEG
Supports encoding/modifying
video/audio/image formats
Audio Bitrate
How much data is used to represent a single second of audio (e.g.
128kbps)
Audio Codec
Specific algorithm to use for representing the audio (e.g. MP3,
FLAC, etc.)
+
Video Encoding
Frame Rate
Amount of frames per second
Video Dimensions
Height and width of each frame in the video
Cropping/Padding
Amount of pixels to chop off from the edge of the video or amount
of pixels to add to the edge of the video.
Video Codec
Specific algorithm used to represent the data
+
How we did it
Getting FFMPEG installed in 5 steps
cd ffmpeg-0.10.2/
./configure --disable-yasm
make
make install
These steps (and more) have already been done for you on the server.
Try executing the command with your own input file (or use
the one provided – ~/ffmpeg/transform.mov)
If you don’t have a sample file to work with, you can download a
movie trailer with the command below.
curl -A QuickTime -O http://trailers.apple.com/movies/paramount/transformers3/transformers3-sbspot_h720p.mov
If the page doesn’t load then it’s possible nginx isn’t running,
you can start nginx with the following command:
sudo /usr/local/nginx/sbin/nginx
+
More advanced options
-vf crop=<Width>:<Height>:<X>:<Y>
Crop a video dimensions starting at (X, Y) with the dimensions Width
x Height
-vf pad=<Width>:<Height>:<X>:<Y>:<Color>
Pad a video to fit a size staring at (X, Y) with the dimensions Width x
Height with a color to fill the excess space (in hex).
-frames:v <Frames>
The amount of video frames to output
+
Putting it to use
Try it out!
+
And there’s more!
http://ffmpeg.org/ffmpeg.html
You now have the ability to perform basic conversions via the
command line. FFMPEG is used in production environments
all over the web – try to do something interesting with it!
+
Thank you!
Created by
Rishi Ishairzay (rishair@vt.edu)
Puloma De (pulomad@vt.edu)
Andrew Hwang (ajhwang@vt.edu)