FFmpeg is a powerful tool for manipulating audiovisual files. Unfortunately, it also has a steep learning curve, especially for users unfamiliar with a command line interface. This app helps users through the command generation process so that more people can reap the benefits of FFmpeg.
Each button displays helpful information about how to perform a wide variety of tasks using FFmpeg. To use this site, click on the task you would like to perform. A new window will open up with a sample command and a description of how that command works. You can copy this command and understand how the command works with a breakdown of each of the flags.
@@ -48,19 +48,14 @@ Change the above data-target field, the button text, and the below div class (th
where the text goes
*****Longer title*****
-
-
- ffmpeg -i [sample file path]
-
-
-
This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info!
This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info!
+
+
ffmpeg
starts the command
+
-i input file
path, name and extension of the input file
+
*****parameter*****
*****comments*****
+
output file
path, name and extension of the output file
+
@@ -201,14 +196,14 @@ Change the above data-target field, the button text, and the below div class (th
This will grab a thumbnail every minute and output sequential png files.
-
-
ffmpeg: calls the program
-
-i for input
-
-ss 00:00:20: seeks video file to 20 seconds into the video
-
-f image2: Forces the file format. image2 is an image file demuxer
-
-vf fps=fps=1/60: -vf is an alias for -filter:v, which creates a filtergraph to use for the streams. The rest of the command identifies filtering by frames per second, and sets the frames per second at 1/60 (which is one per minute).
-
out%d.png: Names the output file. The %d is a regular expression that adds a number (d is for digit) and increments with each frame (out1.png, out2.png, out3.png…)
-
+
+
ffmpeg
starts the command
+
-i input file
path, name and extension of the input file
+
-ss 00:00:20
seeks video file to 20 seconds into the video
+
-f image2
Forces the file format. image2 is an image file demuxer.
+
-vf fps=fps=1/60
-vf is an alias for -filter:v, which creates a filtergraph to use for the streams. The rest of the command identifies filtering by frames per second, and sets the frames per second at 1/60 (which is one per minute).
+
output file
path, name and extension of the output file. In the example out%d.png where %d is a regular expression that adds a number (d is for digit) and increments with each frame (out1.png, out2.png, out3.png…).
+
-
+
-
Generate thumbnails from a video at regular intervals
This command takes two or more files of the same file type and joins them together to make a single file. All that the program needs is a text file with a list specifying the files that should be joined. However, it only works properly if the files to be combined have the exact same codec and technical specifications. Be careful, ffmpeg may appear to have successfully joined two video files with different codecs, but may only bring over the audio from the second file or have other weird behaviors. Don’t use this command for joining files with different codecs and technical specs and always preview your resulting video file!
-f: forces ffmpeg to keep the same file format of the joined files
-
concat: ffmpeg’s concatenate command. This tells ffmpeg to join the files.
-
-i: tells ffmpeg to expect input files
-
mylist.txt: specifies the location of a text file with a list of files to be concatenated. You should create a text file that is formatted as follows:
-
-
file [path to file 1]
-
file [path to file 2]
-
-
-c copy: specifies the encoder for the output file by telling ffmpeg to copy the codecs of the original files and use them for the output file
-
[output]: specifies the filename and location for the output file
-
+
+
ffmpeg
starts the command
+
-f concat
forces ffmpeg to concatenate the files and to keep the same file format
+
-i mylist.txt
path, name and extension of the input file. This text file contains the list of files to be concatenated and should be formatted as follows:
+
@@ -325,16 +315,16 @@ Change the above data-target field, the button text, and the below div class (th
Excerpt from beginning
-
ffmpeg -i [input file] -t 5 -c copy [output]
-
This command captures a certain portion of a video file, starting from the beginning and continuing for the amount of time (in seconds) specified in the script. This can be used to create a preview file, or to remove unwanted content from the end of the file. To be more specific, use timecode, such as 00:00:05.
-
-
ffmpeg: Calls the program ffmpeg
-
-i: Tells ffmpeg to expect input files
-
[input file]: Specifies the location of the file you want to capture a clip from
-
-t 5: Tells ffmpeg to stop copying from the input file after a certain time, and specifies the number of seconds after which to stop copying. In this case, 5 seconds is specified
-
-c copy: Specifies the encoder for the output file by telling ffmpeg to copy the codecs of the original file and use them for the new output file
-
[output]: Specifies the filename and location for the new file
This command captures a certain portion of a video file, starting from the beginning and continuing for the amount of time (in seconds) specified in the script. This can be used to create a preview file, or to remove unwanted content from the end of the file. To be more specific, use timecode, such as 00:00:05.
+
+
ffmpeg
starts the command
+
-i input_file
path, name and extension of the input file
+
-t 5
Tells ffmpeg to stop copying from the input file after a certain time, and specifies the number of seconds after which to stop copying. In this case, 5 seconds is specified.
+
-c:a copy
the audio codec is copied
+
-c:v copy
the video codec is copied
+
output_file
path, name and extension of the output file
+
@@ -348,17 +338,17 @@ Change the above data-target field, the button text, and the below div class (th
This command captures a certain portion of a video file, starting from a designated point in the file and taking an excerpt as long as the amount of time (in seconds) specified in the script. This can be used to create a preview or clip out a desired segment. To be more specific, use timecode, such as 00:00:05.
-
-
ffmpeg: Calls the program ffmpeg
-
-i: Tells ffmpeg to expect input files
-
[input file]: Specifies the location of the file you want to capture a clip from
-
-ss 5: Tells ffmpeg what timecode in the file to look for to start copying, and specifies the number of seconds into the video that ffmpeg should start copying. To be more specific, you can use timecode such as 00:00:05
-
-t 5: Tells ffmpeg to stop copying from the input file after a certain time, and specifies the number of seconds after which to stop copying. In this case, 5 seconds is specified
-
-c copy: Specifies the encoder for the output file by telling ffmpeg to copy the codecs of the original file and use them for the new output file
-
[output]: Specifies the filename and location for the new file
-
+
+
ffmpeg
starts the command
+
-i input_file
path, name and extension of the input file
+
-ss 5
Tells ffmpeg what timecode in the file to look for to start copying, and specifies the number of seconds into the video that ffmpeg should start copying. To be more specific, you can use timecode such as 00:00:05.
+
-t 10
Tells ffmpeg to stop copying from the input file after a certain time, and specifies the number of seconds after which to stop copying. In this case, 10 seconds is specified.
+
-c:a copy
the audio codec is copied
+
-c:v copy
the video codec is copied
+
output_file
path, name and extension of the output file
+
@@ -372,17 +362,16 @@ Change the above data-target field, the button text, and the below div class (th
This command copies a video file starting from a specified time, removing the first few seconds from the output. This can be used to create an excerpt, or remove unwanted content from the beginning of a video file.
-
-
ffmpeg: Calls the program ffmpeg
-
-i: Tells ffmpeg to expect input files
-
[input file]: Specifies the location of the file you want to capture a clip from
-
-ss 5: Tells ffmpeg what timecode in the file to look for to start copying, and specifies the number of seconds into the video that ffmpeg should start copying. To be more specific, you can use timecode such as 00:00:05
-
-t 5: Tells ffmpeg to stop copying from the input file after a certain time, and specifies the number of seconds after which to stop copying. In this case, 5 seconds is specified
-
-c copy: Specifies the encoder for the output file by telling ffmpeg to copy the codecs of the original file and use them for the new output file
-
[output]: Specifies the filename and location for the new file
-
+
+
ffmpeg
starts the command
+
-i input_file
path, name and extension of the input file
+
-ss 5
Tells ffmpeg what timecode in the file to look for to start copying, and specifies the number of seconds into the video that ffmpeg should start copying. To be more specific, you can use timecode such as 00:00:05.
+
-c:a copy
the audio codec is copied
+
-c:v copy
the video codec is copied
+
output_file
path, name and extension of the output file
+
@@ -396,73 +385,71 @@ Change the above data-target field, the button text, and the below div class (th
This command splits the original input file into a video and audio stream. The -map command identifies which streams are mapped to which file. To ensure that you’re mapping the right streams to the right file, run ffprobe before writing the script to identify which stream is 0:0, which is 0:1, etc.
-
-
ffmpeg: calls the program
-
-i: tells ffmpeg to expect input file
-
[input file]: the file you want to split
-
-map 0:0: tells ffmpeg to grab one of the streams, and identifies the first stream (stream 0:0) to map
-
[video output file]: desired filename for the video output file
-
-map 0:1: tells ffmpeg to grab one of the streams, and identifies the second stream (stream 0:1) to map
-
[audio output file]: desired filename for the audio output file
-
+
+
ffmpeg
starts the command
+
-i input_file
path, name and extension of the input file
+
-map 0:0
grabs the first streams (0:0) and to map it into:
+
video_output_file
path, name and extension of the video output file
+
-map 0:1
grabs the second streams (0:1) and to map it into:
This command takes an input file and transcodes it to h.264 with an .mp4 wrapper, keeping the audio the same codec as the original. The libx264 codec defaults to a “medium” preset for compression quality and a CRF of 23. CRF stands for constant rate factor and determines the quality and file size of the resulting h.264 video. A low CRF means high quality and large file size; a high CRF means the opposite.
-
-
ffmpeg: Calls the program ffmpeg
-
-i: Tells ffmpeg to expect an input file
-
[input file]: Tells ffmpeg the location of the file you want to process
-
-c:v libx264: Tells ffmpeg to change the video codec of the file to h264
-
-c:a copy: tells ffmpeg not to change the audio codec
-
[output file.mp4]: Specifies the name and location of the new file, including the desired codec extension
This command takes an input file and transcodes it to H.264 with an .mp4 wrapper, keeping the audio the same codec as the original. The libx264 codec defaults to a “medium” preset for compression quality and a CRF of 23. CRF stands for constant rate factor and determines the quality and file size of the resulting H.264 video. A low CRF means high quality and large file size; a high CRF means the opposite.
+
+
ffmpeg
starts the command
+
-i input_file
path, name and extension of the input file
+
-c:v libx264
tells ffmpeg to change the video codec of the file to H.264
+
-c:a copy
tells ffmpeg not to change the audio codec
+
output_file
path, name and extension of the output file
+
In order to use the same basic command to make a higher quality file, you can add some of these presets:
-preset veryslow: This option tells ffmpeg to use the slowest preset possible for the best compression quality
-
-crf 18: Specifying a lower CRF will make a larger file with better visual quality
-
-
libx264 also defaults to 4:2:2 chroma subsampling. Some versions of Quicktime can't read x264 files in 4:2:2. In order to allow the video to play in all Quicktime players, you can specify 4:2:0 chroma subsampling instead:
This option tells ffmpeg to use the slowest preset possible for the best compression quality.
+
-crf 18
Specifying a lower CRF will make a larger file with better visual quality.
+
+
libx264 also defaults to 4:2:2 chroma subsampling. Some versions of QuickTime can’t read H.264 files in 4:2:2. In order to allow the video to play in all QuickTime players, you can specify 4:2:0 chroma subsampling instead:
This will transcode mxf wrapped video and audio files to an H.264 encoded .mp4 file. Please note this only works for non-encrypted DCPs.
+
+
ffmpeg
starts the command
+
-i input_file
path and name of the video input file. This extension must be .mxf
+
-c:v lixb264
transcodes video to H.264
+
-pix_fmt yuv420p
sets pixel format to yuv420p
+
output_file
path, name and extension of the output file
+
@@ -477,46 +464,46 @@ Change the above data-target field, the button text, and the below div class (th
Create ISO files for DVD access
Create an ISO file that can be used to burn a DVD. Please note, you will have to install dvdauthor. To install dvd author using Homebrew run: brew install dvdauthor
calls an option to apply a filter to the video stream. scale=1440:1080, pad=1920:1080:240:0": does the math! resizes the video frame then pads the area around the 4:3 aspect to complete 16:9.