diff --git a/index.html b/index.html index 22417bc..66d7689 100644 --- a/index.html +++ b/index.html @@ -69,24 +69,22 @@ Change the above data-target field, the button text, and the below div class (th
Part 1: Create 3 second clip from an existing source file (no audio necessary)
-ffmpeg -ss HH:MM:SS -i input -c:v copy -c:a copy -t 3 output
Create high quality GIF
+ffmpeg -ss HH:MM:SS -i input -filter_complex "fps=10,scale=500:-1:flags=lanczos,palettegen" -t 3 palette.png
ffmpeg -ss HH:MM:SS -i input -i palette.png -filter_complex "[0:v]fps=10,scale=500:-1:flags=lanczos[v],[v][1:v]paletteuse" -t 3 -loop 6 output
The first command will use the palettegen filter to create a custom palette, then the second command will create the GIF with the paletteuse filter. The result is a high quality GIF.
Part 2: Make the gif
-ffmpeg -i input -vf scale=500:-1 -t 10 -r 30 output.gif
Simpler GIF creation
+ffmpeg -ss HH:MM:SS -i input -vf "fps=10,scale=500:-1" -t 3 -loop 6 output
This is a quick and easy method. Dithering is more apparent than the above method using the palette* filters, but the file size will be smaller. Perfect for that "legacy" GIF look.
ffmpeg -sample_fmts
)for f in *.MXF; do ffmpeg -i "$f" -c:a copy -c:v copy "${f%.MXF}.mov"; done
for f in *.MXF; do ffmpeg -i "$f" -map 0 -c copy "${f%.MXF}.mov"; done
Re-wrap .MFX files in a specified directory to .mov files by using this code within a .sh file. The shell script (.sh file) and all MXF files must be contained in the same directory, and the script must be run from the directory itself (cd ~/Desktop/MXF_file_directory). Execute .sh file with the command sh Rewrap-MXF.sh
Modify the ffmpeg script as needed to perform different transcodes :)
ffmpeg -i [inputfile.extension] -an -f framemd5 [outputfile.framemd5]
This will create an md5 checksum per frame
+This will create an md5 checksum per video frame
ffmpeg -i input.mov -c:v prores -profile:v 1 -c:a pcm_s16le -vf yadif output.mov
This command transcodes an input file (input.mov) into a deinterlaced Apple ProRes LT .mov file with 16-bit linear PCM encoded audio. The file is deinterlaced using the yadif (Yet Another De-Interlacing Filter) command.
+This command transcodes an input file (input.mov) into a deinterlaced Apple ProRes LT .mov file with 16-bit linear PCM encoded audio. The file is deinterlaced using the yadif filter (Yet Another De-Interlacing Filter).
ffmpeg -i [file path] -ss 00:00:20 -f image2 -vframes 1 thumb.png
ffmpeg -i [file path] -ss 00:00:20 -vframes 1 thumb.png
This command will grab a thumbnail 20 seconds into the video.
ffmpeg -i {path/inputfile.extension} -f image2 -vf fps=fps=1/60 out%d.png
ffmpeg -i {path/inputfile.extension} -vf fps=1/60 out%d.png
This will grab a thumbnail every minute and output sequential png files.
ffmpeg -f concat -i mylist.txt -c:a copy -c:v copy output_file
ffmpeg -f concat -i mylist.txt -c copy output_file
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!
ffmpeg documentation on concatenating files (full list of flags, commands, https://trac.ffmpeg.org/wiki/Concatenate)
ffmpeg -i input_file -t 5 -c:v copy -c:a copy output_file
ffmpeg -i input_file -t 5 -c copy output_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 -i input_file -ss 5 -t 10 -c:v copy -c:a copy output_file
ffmpeg -i input_file -ss 5 -t 10 -c copy output_file
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 -i input_file -ss 5 -c:v copy -c:a copy output_file
ffmpeg -i input_file -ss 5 -c copy output_file
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 -i input_file -map 0:0 video_output_file -map 0:1 audio_output_file
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 and which is 0:1.
+ffmpeg -i input_file -map 0:v video_output_file -map 0:a audio_output_file
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 streams are desired.
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:
+libx264 will use a chroma subsampling scheme that is the closest match to that of the input. This can result in YUV 4:2:0, 4:2:2, or 4:4:4 chroma subsampling. QuickTime and most other non-FFmpeg based players can’t decode H.264 files that are not 4:2:0. In order to allow the video to play in all players, you can specify 4:2:0 chroma subsampling:
ffmpeg -i input_file -c:v libx264 -pix_fmt yuv420p -preset veryslow -crf 18 -c:a copy output_file
ffmpeg -i input_file -c:v libx264 -pix_fmt yuv420p -filter:v "scale=1440:1080, pad=1920:1080:240:0" -vf yadif output_file
Pad without specifying pad width, just put the input video in the middle of the output: pad=1920:1080:(ow-iw)/2:(oh-ih)/2
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