Introduction
Welcome
First steps
Dedicated website
Conventions
Your feedback is important
1. FFmpeg Fundamentals
FFmpeg introduction
Developers of FFmpeg
Participation in FFmpeg development
FFmpeg download
Command line syntax
Windows Command Prompt and its alternatives
Path setting
Renaming to shortened form
Displaying output preview
Preview with FFplay media player
Preview with SDL output device
SI prefixes available in FFmpeg
Transcoding with ffmpeg
Filters, filterchains and filtergraphs
Selection of media streams
Lavfi virtual device
Color names
2. Displaying Help and Features
Text help in FFmpeg tools
Available bitstream filters
Available codecs
Available decoders
Available encoders
Available filters
Available formats
Available layouts of audio channels
FFmpeg license
Available pixel formats
Available protocols
Available audio sample formats
FFmpeg version
Using MORE command for output formatting
Redirecting output to file
3. Bit Rate, Frame Rate and File Size
Frame (frequency) rate introduction
Frame rate setting
Using -r option
Using fps filter
Predefined values for frame rate
Bit (data) rate introduction
Setting bit rate
Constant bit rate (CBR) setting
Setting maximum size of output file
File size calculation
4. Resizing and Scaling Video
Resizing video
Predefined video frame sizes
Considerations when resizing - Nyquist sampling theorem
Special enlarging filter
Advanced scaling
Scaling video proportionately to input
Scaling to predefined width or height
5. Cropping Video
Cropping basics
Cropping frame center
Automatic detection of cropping area
Cropping of timer
6. Padding Video
Padding basics
Padding videos from 4:3 to 16:9
Padding videos from 16:9 to 4:3
Padding from and to various aspect ratios
Pillarboxing - adding boxes horizontally
Letterboxing - adding boxes vertically
7. Flipping and Rotating Video
Horizontal flip
Vertical flip
Introduction to rotating
Rotation by 90 degrees counterclockwise and flip vertically
Rotation by 90 degrees clockwise
Rotation by 90 degrees counterclockwise
Rotation by 90 degrees clockwise and flip vertically
8. Blur, Sharpen and Other Denoising
Blur video effect
Sharpen video
Noise reduction with denoise3d
Noise reduction with hqdn3d
Noise reduction with nr option
9. Overlay - Picture in Picture
Introduction to overlay
Command structure for overlay
Logo in one of corners
Logo in top-left corner
Logo in top-right corner
Logo in bottom-right corner
Logo in bottom-left corner
Logo shows in specified moment
Video with timer
Other overlay examples
10. Adding Text on Video
Introduction to adding text on video
Text positioning
Horizontal location setting
Vertical location setting
Font size and color setting
Dynamic text
Horizontal text movement
Vertical text movement
11. Conversion Between Formats
Introduction to media formats
File formats
Media containers
Transcoding and conversion
Introduction to codecs
Overwriting same named output files
Generic options for conversion
Private options for conversion
MPEG-1 video encoder
MPEG-2 video encoder
MPEG-4 video encoder
libvpx video encoder
AC-3 audio encoder
Simplified encoding of VCD, SVCD, DVD, DV and DV50
12. Time Operations
Duration of audio and video
Setting with -t option
Setting with number of frames
Setting delay from start
Extracting specific part from media file
Delay between input streams
One input file
Two or more input files
Limit for processing time
Shortest stream determines encoding time
Timestamp and time bases
Encoder timebase setting
Audio and video speed modifications
Video speed change
Audio speed change
Synchronizing audio data with timestamps
13. Mathematical Functions
Expressions that can use mathematical functions
Built-in arithmetic operators
Built-in constants
Table of built-in mathematical functions
Examples of using functions
14. Metadata and Subtitles
Introduction to metadata
Creating metadata
Saving and loading metadata to/from the file
Deletion of metadata
Introduction to subtitles
Subtitles encoded directly to video
15. Image Processing
Supported image formats
Creating images
Screenshots from videos
Animated GIFs from videos
Images from FFmpeg video sources
Video conversion to images
Resizing, cropping and padding images
Flipping, rotating and overlaying images
Conversion between image types
Creating video from images
Video from one image
Video from many images
16. Digital Audio
Introduction to digital audio
Audio quantization and sampling
Audio file formats
Sound synthesis
Stereo and more complex sounds
Binaural tones for stress reduction
Sound volume settings
Multiple sounds mixed to one output
Downmixing stereo to mono, surround to stereo
Simple audio analyzer
Adjusting audio for listening with headphones
Audio modifications with -map_channel option
Switching audio channels in stereo input
Splitting stereo sound to 2 separate streams
Muting one channel from stereo input
Merging 2 audio streams to 1 multichannel stream
Audio stream forwarding with buffer order control
17. Presets for Codecs
Introduction to preset files
Examples of preset files
Preset file libvpx-1080p.ffpreset
Preset file libvpx-1080p50_60.ffpreset
Preset file libvpx-360p.ffpreset
Preset file libvpx-720p.ffpreset
Preset file libvpx-720p50_60.ffpreset
18. Interlaced Video
NTSC, PAL and SECAM TV standards
Interlaced frame type setting
Field order change of interlaced video
Deinterlacing
yadif filter
Option -deinterlace
Deinterlacing filters from MPlayer project
Pullup filter
Interlaced video and digital television
19. FFmpeg Components and Projects
FFplay introduction
Key and mouse controls during playback
FFplay show modes
FFprobe introduction
FFserver introduction
FFmpeg software libraries
libavcodec
libavdevice
libavfilter
libavformat
libavutil
libpostproc
libswresample
libswscale
Projects using FFmpeg components
HTML5 support in Google Chrome
Videoprocessing on YouTube and Facebook
Multimedia frameworks utilizing FFmpeg
Video editors
Audio editors
Media players using FFmpeg
20. Microphone and Webcam
Introduction to input devices
List of available cameras and microphones
Available options for webcam
Displaying and recording webcam input
Using two webcams
Recording sound and sending it to loudspeakers
21. Batch Files
Advantages of batch files
Batch file commands
Typical usage of batch files
Tone generator
Creating Jingle Bells
Simplified conversion
22. Color Corrections
Video modifications with lookup table
Conversion to monochrome (black-and-white) image
Introduction to color spaces
YUV color space and its derivatives
Luma (luminance) and chroma (chrominance)
Pixel formats
RGB pixel format modifications
Color balance
Modifications of YUV pixel format
Brightness correction
Hue and saturation setting
Comparison in 2 windows
2 windows compared horizontally
2 windows compared vertically
Space between windows
Modified version first
2 modified versions without input
Comparison in 3 windows
3 windows compared horizontally
3 windows compared vertically
Input in the middle window
Brightness correction in 2 and 3 windows
Comparison in 4 windows
23. Advanced Techniques
Joining audio and video files
Concatenation with shell command
Concatenation with concat protocol
Concatenation with concat filter
Other types of joining
Removing logo
delogo filter
Fixing of shaking video parts
Adding color box to video
Number of frames detection
Detection of ads, section transitions or corrupted encoding
Detection with blackframe filter
Selecting only specified frames to output
Scaling input by changing aspect ratios
Screen grabbing
Detailed video frame information
Audio frequency spectrum
Audio waves visualization
Voice synthesis
Saving output to multiple formats at once
Additional media input to filtergraph
24. Video on Web
HTML5 support on main browsers
Adding audio with HTML5
Adding video with HTML5
Adding video for Flash Player
Video sharing websites
Videoprocessing on webserver
Monetizing video uploads
25. Debugging and Tests
debug, debug_ts and fdebug options
Flags for error detection
Logging level setting
Timebase configuration test
Testing encoding features
Test patterns
RGB test pattern
Color pattern with scrolling gradient and timestamp
SMPTE bars pattern
Simple packet dumping or with payload (hexadecimally)
CPU time used and memory consumption
Glossary
About the author