diff --git a/index.html b/index.html index de6e95a..c0a5c96 100644 --- a/index.html +++ b/index.html @@ -73,7 +73,7 @@ -
At its basis, an FFmpeg command is relatively simple. After you have installed FFmpeg (see instructions here), the program is invoked simply by typing ffmpeg
at the command prompt.
Many FFmpeg commands use filters that manipulate the video or audio stream in some way: for example, hflip to horizontally flip a video, or amerge to merge two or more audio tracks into a single stream.
@@ -127,7 +127,7 @@ -ffmpeg -re -i ${INPUTFILE} -map 0 -flags +global_header -vf scale="1280:-1,format=yuv420p" -pix_fmt yuv420p -level 3.1 -vsync passthrough -crf 26 -g 50 -bufsize 3500k -maxrate 1800k -c:v libx264 -c:a aac -b:a 128000 -r:a 44100 -ac 2 -t ${STREAMDURATION} -f tee "[movflags=+faststart]${TARGETFILE}|[f=flv]${STREAMTARGET}"
ffmpeg -i input_file.ext -c copy -map 0 output_file.ext
ffmpeg -i input_file.mkv -c:v copy -c:a aac output_file.mp4
ffmpeg -i input_file -c:v prores -profile:v 1 -vf yadif -c:a pcm_s16le output_file.mov
ffmpeg -i input_file -c:v libx264 -pix_fmt yuv420p -c:a copy output_file
ffmpeg -i input_video_file.mxf -i input_audio_file.mxf -c:v libx264 -pix_fmt yuv420p -c:a aac output_file.mp4
ffmpeg -i input_file -map 0 -dn -c:v ffv1 -level 3 -g 1 -slicecrc 1 -slices 16 -c:a copy output_file.mkv -f framemd5 -an framemd5_output_file
ffmpeg -i concat:input_file1\|input_file2\|input_file3 -c:v libx264 -c:a copy output_file.mp4
ffmpeg -i input_file -c:v libx265 -pix_fmt yuv420p -c:a copy output_file
ffmpeg -i input_file.wav -write_id3v1 1 -id3v2_version 3 -dither_method rectangular -out_sample_rate 48k -qscale:a 1 output_file.mp3
ffmpeg -i input_file.wav -c:a aac -b:a 128k -dither_method rectangular -ar 44100 output_file.mp4
Transform a video file with 4:3 aspect ratio into a video file with 16:9 aspect ratio by correct pillarboxing.
@@ -459,7 +459,7 @@ -Transform a video file with 16:9 aspect ratio into a video file with 4:3 aspect ratio by correct letterboxing.
@@ -478,7 +478,7 @@ -Transform a SD video file with 4:3 aspect ratio into an HD video file with 16:9 aspect ratio by correct pillarboxing.
@@ -501,7 +501,7 @@ -ffmpeg -i input_file -c:v copy -aspect 4:3 output_file
This command uses a filter to convert the video to a different colour space.
@@ -570,7 +570,7 @@ -E.g. for converting 24fps to 25fps with audio pitch compensation for PAL access copies. (Thanks @kieranjol!)
@@ -593,7 +593,7 @@ -ffmpeg -f concat -i mylist.txt -c copy output_file
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Split file into segments
ffmpeg -i input_file -c copy -map 0 -f segment -segment_time 60 -reset_timestamps 1 output_file-%03d.mkv
@@ -689,7 +689,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Trim a video without re-encoding
ffmpeg -i input_file -ss 00:02:00 -to 00:55:00 -c copy -map 0 output_file
@@ -715,7 +715,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Excerpt from beginning
ffmpeg -i input_file -t 5 -c copy -map 0 output_file
@@ -733,7 +733,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Excerpt to end
ffmpeg -i input_file -ss 5 -c copy -map 0 output_file
@@ -751,7 +751,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Excerpt from end
ffmpeg -sseof -5 -i input_file -c copy -map 0 output_file
@@ -773,7 +773,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Upscaled, Pillar-boxed HD H.264 Access Files from SD NTSC source
ffmpeg -i input_file -c:v libx264 -filter:v "yadif, scale=1440:1080:flags=lanczos, pad=1920:1080:(ow-iw)/2:(oh-ih)/2, format=yuv420p" output_file
@@ -796,7 +796,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Deinterlace a video
ffmpeg -i input_file -c:v libx264 -vf "yadif,format=yuv420p" output_file
@@ -830,7 +830,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Inverse telecine a video file
ffmpeg -i input_file -c:v libx264 -vf "fieldmatch,yadif,decimate" output_file
@@ -860,7 +860,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Change field order of an interlaced video
ffmpeg -i input_file -c:v video_codec -filter:v setfield=tff output_file
@@ -876,7 +876,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Check video file interlacement patterns
ffmpeg -i input file -filter:v idet -f null -
@@ -896,7 +896,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Creates a visualization of the bits in an audio stream
ffplay -f lavfi "amovie=input_file, asplit=2[out1][a], [a]abitscope=colors=purple|yellow[out0]"
@@ -918,7 +918,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Plays a graphical output showing decibel levels of an input file
ffplay -f lavfi "amovie='input.mp3', astats=metadata=1:reset=1, adrawgraph=lavfi.astats.Overall.Peak_level:max=0:min=-30.0:size=700x256:bg=Black[out]"
@@ -946,7 +946,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Shows all pixels outside of broadcast range
ffplay -f lavfi "movie='input.mp4', signalstats=out=brng:color=cyan[out]"
@@ -970,7 +970,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Plays vectorscope of video
ffplay input_file -vf "split=2[m][v], [v]vectorscope=b=0.7:m=color3:g=green[v], [m][v]overlay=x=W-w:y=H-h"
@@ -991,7 +991,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
This will play two input videos side by side while also applying the temporal difference filter to them
ffmpeg -i input01 -i input02 -filter_complex "[0:v:0]tblend=all_mode=difference128[a];[1:v:0]tblend=all_mode=difference128[b];[a][b]hstack[out]" -map [out] -f nut -c:v rawvideo - | ffplay -
@@ -1024,7 +1024,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Pull specs from video file
ffprobe -i input_file -show_format -show_streams -show_data -print_format xml
@@ -1043,7 +1043,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Strips metadata from video file
ffmpeg -i input_file -map_metadata -1 -c:v copy -c:a copy output_file
@@ -1064,7 +1064,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
One thumbnail
ffmpeg -i input_file -ss 00:00:20 -vframes 1 thumb.png
@@ -1081,7 +1081,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Many thumbnails
ffmpeg -i input_file -vf fps=1/60 out%d.png
@@ -1102,7 +1102,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Images to GIF
ffmpeg -f image2 -framerate 9 -pattern_type glob -i "input_image_*.jpg" -vf scale=250x250 output_file.gif
@@ -1122,7 +1122,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Create GIF
Create high quality GIF
@@ -1158,7 +1158,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Transcode an image sequence into uncompressed 10-bit video
ffmpeg -f image2 -framerate 24 -i input_file_%06d.ext -c:v v210 output_file
@@ -1176,7 +1176,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Create a video from an image and audio file.
ffmpeg -r 1 -loop 1 -i image_file -i audio_file -acodec copy -shortest -vf scale=1280:720 output_file
@@ -1201,7 +1201,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Create centered, transparent text watermark
E.g For creating access copies with your institutions name
@@ -1226,7 +1226,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Overlay image watermark on video
ffmpeg -i input_video file -i input_image_file -filter_complex overlay=main_w-overlay_w-5:5 output_file
@@ -1242,7 +1242,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Create a burnt in timecode on your image
ffmpeg -i input_file -vf drawtext="fontfile=font_path:fontsize=font_size:timecode=starting_timecode:fontcolor=font_colour:box=1:boxcolor=box_colour:rate=timecode_rate:x=(w-text_w)/2:y=h/1.2" output_file
@@ -1272,7 +1272,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Flip audio phase shift
ffmpeg -i input_file -af pan="stereo|c0=c0|c1=-1*c1" output_file
@@ -1290,7 +1290,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Calculate Loudness Levels
ffmpeg -i input_file -af loudnorm=print_format=json -f null -
@@ -1309,7 +1309,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
RIAA Equalization
ffmpeg -i input_file -af aemphasis=type=riaa output_file
@@ -1325,7 +1325,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
One Pass Loudness Normalization
ffmpeg -i input_file -af loudnorm=dual_mono=true -ar 48k output_file
@@ -1344,7 +1344,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Two Pass Loudness Normalization
ffmpeg -i input_file -af loudnorm=dual_mono=true:measured_I=input_i:measured_TP=input_tp:measured_LRA=input_lra:measured_thresh=input_thresh:offset=target_offset:linear=true -ar 48k output_file
@@ -1373,7 +1373,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Create Bash script to batch process with FFmpeg
Bash scripts are plain text files saved with a .sh extension. This entry explains how they work with the example of a bash script named “Rewrap-MXF.sh”, which rewraps .mxf files in a given directory to .mov files.
@@ -1402,7 +1402,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
-
+
Create PowerShell script to batch process with FFmpeg
As of Windows 10, it is possible to run Bash via Bash on Ubuntu on Windows, allowing you to use bash scripting. To enable Bash on Windows, see these instructions.
@@ -1435,7 +1435,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Create MD5 checksums (video frames)
ffmpeg -i input_file -f framemd5 -an output_file
@@ -1453,7 +1453,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Create MD5 checksums (audio samples)
ffmpeg -i input_file -af "asetnsamples=n=48000" -f framemd5 -vn output_file
@@ -1478,7 +1478,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Creates a QCTools report
ffprobe -f lavfi -i "movie=input_file:s=v+a[in0][in1], [in0]signalstats=stat=tout+vrep+brng, cropdetect=reset=1:round=1, idet=half_life=1, split[a][b];[a]field=top[a1];[b]field=bottom, split[b1][b2];[a1][b1]psnr[c1];[c1][b2]ssim[out0];[in1]ebur128=metadata=1, astats=metadata=1:reset=1:length=0.4[out1]" -show_frames -show_versions -of xml=x=1:q=1 -noprivate | gzip > input_file.qctools.xml.gz
@@ -1502,7 +1502,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Creates a QCTools report
ffprobe -f lavfi -i "movie=input_file,signalstats=stat=tout+vrep+brng, cropdetect=reset=1:round=1, idet=half_life=1, split[a][b];[a]field=top[a1];[b]field=bottom,split[b1][b2];[a1][b1]psnr[c1];[c1][b2]ssim" -show_frames -show_versions -of xml=x=1:q=1 -noprivate | gzip > input_file.qctools.xml.gz
@@ -1526,7 +1526,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Check FFV1 Version 3 fixity
ffmpeg -report -i input_file -f null -
@@ -1544,7 +1544,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Read/Extract EIA-608 (Line 21) closed captioning
ffprobe -f lavfi -i movie=input_file,readeia608 -show_entries frame=pkt_pts_time:frame_tags=lavfi.readeia608.0.line,lavfi.readeia608.0.cc,lavfi.readeia608.1.line,lavfi.readeia608.1.cc -of csv > input_file.csv
@@ -1572,7 +1572,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Makes a mandelbrot test pattern video
ffmpeg -f lavfi -i mandelbrot=size=1280x720:rate=25 -c:v libx264 -t 10 output_file
@@ -1589,7 +1589,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Makes a SMPTE bars test pattern video
ffmpeg -f lavfi -i smptebars=size=720x576:rate=25 -c:v prores -t 10 output_file
@@ -1606,7 +1606,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Make a test pattern video
ffmpeg -f lavfi -i testsrc=size=720x576:rate=25 -c:v v210 -t 10 output_file
@@ -1624,7 +1624,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Play HD SMPTE bars
Test an HD video projector by playing the SMPTE colour bars pattern.
@@ -1639,7 +1639,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Play VGA SMPTE bars
Test a VGA (SD) video projector by playing the SMPTE colour bars pattern.
@@ -1654,7 +1654,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Sine wave
Generate a test audio file playing a sine wave.
@@ -1671,7 +1671,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
SMPTE bars + Sine wave audio
Generate a SMPTE bars test video + a 1kHz sine wave as audio testsignal.
@@ -1692,7 +1692,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Makes a broken test file
Modifies an existing, functioning file and intentionally breaks it for testing purposes.
@@ -1713,7 +1713,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Fix AV Sync: Resample audio
ffmpeg -i input_file -c:v copy -c:a pcm_s16le -af "aresample=async=1000" output_file
@@ -1734,7 +1734,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Plays video with OCR on top
Note: ffmpeg must be compiled with the tesseract library for this script to work (--with-tesseract
if using the brew install ffmpeg
method).
@@ -1757,7 +1757,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Exports OCR data to screen
Note: FFmpeg must be compiled with the tesseract library for this script to work (--with-tesseract
if using the brew install ffmpeg
method)
@@ -1778,7 +1778,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Play an image sequence
Play an image sequence directly as moving images, without having to create a video first.
@@ -1799,7 +1799,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Split audio and video tracks
ffmpeg -i input_file -map 0:v:0 video_output_file -map 0:a:0 audio_output_file
@@ -1817,7 +1817,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Extract audio from an AV file
ffmpeg -i input_file -c:a copy -vn output_file
@@ -1834,7 +1834,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Combine audio tracks into one in a video file
ffmpeg -i input_file -filter_complex "[0:a:0][0:a:1]amerge[out]" -map 0:v -map "[out]" -c:v copy -shortest output_file
@@ -1857,7 +1857,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Generate two access MP3s from input. One with appended audio (such as a copyright notice) and one unmodified.
ffmpeg -i input_file -i input_file_to_append -filter_complex "[0:a:0]asplit=2[a][b];[b]afifo[bb];[1:a:0][bb]concat=n=2:v=0:a=1[concatout]" -map "[a]" -codec:a libmp3lame -dither_method modified_e_weighted -qscale:a 2 output_file.mp3 -map "[concatout]" -codec:a libmp3lame -dither_method modified_e_weighted -qscale:a 2 output_file_appended.mp3
@@ -1882,7 +1882,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Flip the video image horizontally and/or vertically
ffmpeg -i input_file -filter:v "hflip,vflip" -c:a copy output_file
@@ -1899,7 +1899,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
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
@@ -1917,7 +1917,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Compare two video files for content similarity using perceptual hashing
ffmpeg -i input_one -i input_two -filter_complex signature=detectmode=full:nb_inputs=2 -f null -
@@ -1934,7 +1934,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Generate a perceptual hash for an input video file
ffmpeg -i input -vf signature=format=xml:filename="output.xml" -an -f null -
@@ -1950,7 +1950,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Exports CSV for scene detection using YDIF
ffprobe -f lavfi -i movie=input_file,signalstats -show_entries frame=pkt_pts_time:frame_tags=lavfi.signalstats.YDIF -of csv
@@ -1970,7 +1970,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
Cover head switching noise
ffmpeg -i input_file -filter:v drawbox=w=iw:h=7:y=ih-h:t=max output_file
@@ -1994,7 +1994,7 @@ ffmpeg -i $file -map 0 -c copy $output
-
+
View information about a specific decoder, encoder, demuxer, muxer, or filter
ffmpeg -h type=name
@@ -2021,7 +2021,7 @@ ffmpeg -i $file -map 0 -c copy $output