Skip to content

HeckfyCU/ffmpeg-scripts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ffmpeg scripts

A collection of ffmpeg shell scripts for basic editing tasks

scripts install

ffmpeg scripts install youtube

create a bin directory

create a bin directory in your home to add the scripts to

mkdir -p ~/bin

if you are using bash add the following code to your ~/.bashrc

if [ -d "$HOME/bin" ]; then
   PATH="$HOME/bin:$PATH"
fi

if you are using zsh add the following code to your ~/.zshenv file

typeset -U PATH path
path=("$HOME/bin" "$path[@]")
export PATH
  • source your ~/.bashrc if you are using the bash shell
source ~/.bashrc
  • source your ~/.zshenv if you are using the zsh shell
source ~/.zshenv

clone the git repository

create a git directory in you home folder to download the scripts into, or use any other location in your file system

mkdir -p ~/git

change directory in the git directory

cd ~/git

clone the git repository

git clone https://github.com/NapoleonWils0n/ffmpeg-scripts.git

update the scripts using git pull

copy or symlink scripts into the bin directory

you can now either copy the scripts into the ~/bin directory in your home, or create symbolic links from the scripts in the ~/git/ffmpeg-scripts directory to the ~/bin directory

creating a symbolic link

ln -s path/to/source path/to/destination

example

ln -s ~/git/ffmpeg-scripts/trim-clip ~/bin

ffmpeg install

linux ffmpeg install

install ffmpeg on debian or ubuntu, for other linux distros see the documentation for your package manager

sudo apt install ffmpeg

mac ffmpeg install

open a terminal and run the following commands to install the xcode command line tools, homebrew and ffmpeg

  • xcode command line tools install
xcode-select --install
  • homebrew install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • ffmpeg install with libfdk_aac
brew tap homebrew-ffmpeg/ffmpeg
brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-fdk-aac --HEAD
  • ffmpeg upgrade
brew update && brew upgrade homebrew-ffmpeg/ffmpeg/ffmpeg --fetch-HEAD

freebsd ffmpeg install

switch to root and install the ffmpeg package

pkg install ffmpeg

you can also install ffmpeg from ports, or use poudriere to build the ffmpeg package

note the ebumeter script uses ffplay which isnt installed with the ffmpeg package, so you need to build ffmpeg with the sdl option enable from ports or with poudriere

if you want to use the libfdk_aac audio you should also enable that option when building the ffmpeg port, and build the lame package for mp3 support

windows ffmpeg install

install the windows subsystem for linux and then install a linux distro like ubuntu, then follow the linux install instructions

audio-silence

audio-silence add silent audio to a video clip

If the video doesnt have an audio track the script copies the video track, and adds a silent audio track to match the duration of the video and creates a new video clip

If the video has a video and audio track the script only copies the video track, and adds a silent audio track to match the duration of the video and creates a new video clip.

audio-silence youtube

  • script usage
audio-silence -i infile.(mp4|mkv|mov|m4v) -c (mono|stereo) -r (44100|48000) -o outfile.mp4
-i infile.(mp4|mkv|mov|m4v)
-c (mono|stereo) : optional agument # default is mono
-r (44100|48000) : optional agument # default is 44100
-o outfile.mp4   : optional agument # default is infile-name-silence-date-time

audio-silence batch process

Batch process files in the current working directory

Note we omit the -o option to use the default outfile name, which is infile-name-silence-date-time

audio-silence batch process without specifying the -c and -r options using the defaults of -c mono and -r 44100

find . -type f -name "*.mp4" -exec sh -c \
'audio-silence -i "${0}"'     
"{}" \;

audio-silence batch process and override the defaults with the -c and -r options

find . -type f -name "*.mp4" -exec sh -c \
'audio-silence -i "${0}" -c stereo -r 48000'     
"{}" \;

clip-time

convert timestamps into start and duration

  • script usage
clip-time -i input -o output

combine-clips

combine an image or video file with an audio clip

combine-clips youtube

  • script usage
combine-clip -i infile.(mp4|mov|mkv|m4v|png|jpg) -a audio.(m4a|aac|wav|mp3) -o outfile.mp4
-i infile.(mp4|mkv|mov|m4v|png|jpg)
-a audio.(m4a|aac|wav|mp3)
-o outfile.mp4 : optional agument # defaults is infile-name-combined-date-time

combine-clips batch process

Batch process files in the current working directory

Note we omit the -o option to use the default outfile name, infile-name-combined-date-time

  • batch combine video and audio files into video clips

The video and audio files you want to combine must have the same name

for example

file1.mp4
file1.wav
file2.mp4
file2.wav

running the following code will combine file1.mp4 with file1.wav and file2.mp4 with file2.wav

find . -type f -name "*.mp4" -exec sh -c \
'combine-clip -i "${0}" -a "${0%.*}.wav"' \
"{}" \;
  • batch combine images and audio files into video clips

The images and audio files you want to combine must have the same name

for example

file1.png
file1.wav
file2.png
file2.wav

running the following code will combine file1.png with file1.wav and file2.png with file2.wav

find -s . -type f -name "*.png" -exec sh -c \
'combine-clip -i "${0}" -a "${0%.*}.wav"' \
"{}" \;

correct-clip

  • curves code based on:

converting gimp curves files for ffmpeg

correct a video clip by using a gimp curve converted into a ffmpeg curves filter command, to adjust the levels and white balance

  • requires a curve file created with the following script

curve2ffmpeg

correct-clip youtube

  • script usage
correct-clip -i infile.(mp4|mkv|mov|m4v) -c curve.txt -o outfile.mp4
-i infile.(mp4|mkv|mov|m4v)
-c curve.txt
-o outfile.mp4 :optional agument # default is infile-name-corrected-date-time

correct-clip batch process

Batch process files in the current working directory

Note we omit the -o option to use the default outfile name, infile-name-corrected-date-time

The video and gimp curve text files you want to combine must have the same name

for example

file1.mp4
file1.txt
file2.mp4
file2.txt

running the following code will correct file1.mp4 with file1.txt gimp curve file and file2.mp4 with file2.txt gimp curve file

find . -type f -name "*.mp4" -exec sh -c \
'correct-clip -i "${0}" -c "${0%.*}.txt"' \
"{}" \;

crossfade-clips

cross fade 2 video clips with either a 1 or 2 second cross fade the videos must have the same codecs, size and frame rate

crossfade-clips youtube

  • script usage
crossfade-clips -a clip1.(mp4|mkv|mov|m4v) -b clip2.(mp4|mkv|mov|m4v) -d (1|2) -o outfile.mp4
-a clip1.(mp4|mkv|mov|m4v) : first clip
-b clip2.(mp4|mkv|mov|m4v) : second clip
-d (1|2)                   : cross fade duration :optional agument # default is 1 second
-o outfile.mp4             : optional agument # default is infile-name-xfade-date-time

ebu-meter

ffplay ebu meter

ebu-meter youtube

  • script usage
ebu-meter -i infile.(mp4|mov|mkv|m4v|webm|m4a|aac|wav|mp3) -t (00)

-t = luf target, eg 16

extract-frame

extract a frame from a video and save as a png image

ffmpeg wiki seeking

Note that you can use two different time unit formats: sexagesimal (HOURS:MM:SS.MILLISECONDS, as in 01:23:45.678), or in seconds. If a fraction is used, such as 02:30.05, this is interpreted as “5 100ths of a second”, not as frame 5. For instance, 02:30.5 would be 2 minutes, 30 seconds, and a half a second, which would be the same as using 150.5 in seconds.

extract-frame youtube

  • script usage
extract-frame -i infile.(mp4|mov|mkv|m4v|webm) -s 00:00:00.000 -o outfile.mp4
-i infile.(mp4|mov|mkv|m4v|webm)
-s 00:00:00.000    : optional argument # default is 00:00:00
-o outfile.png     : optional agument # default is infile-name-frame-date-time

extract-frame batch process

Batch process files in the current working directory

Note we omit the -o option to use the default outfile name, infile-name-frame-date-time

  • extract frame with default option of 00:00:00
find . -type f -name "*.mp4" -exec sh -c \
'extract-frame -i "${0}"' \
"{}" \;
  • extract frame at 30 seconds into the video
find . -type f -name "*.mp4" -exec sh -c \
'extract-frame -i "${0}" -s 00:00:30' \
"{}" \;

fade-clip

fade video and audio in and out

fade-clip youtube

  • script usage
fade-clip -i video.(mp4|mkv|mov|m4v) -d (0.[0-9]|1) -o outfile.mp4
-i infile.(mp4|mkv|mov|m4v)
-d (0.[0-9]|1) : optional agument # default is 0.5
-o outfile.mp4 : optional agument # default is infile-name-fade-date-time

fade-clip batch process

Batch process files in the current working directory

Note we omit the -o option to use the default outfile name, infile-name-fade-date-time

  • fade-clip with default option of 0.5
find . -type f -name "*.mp4" -exec sh -c \
'fade-clip -i "${0}"' \
"{}" \;
  • fade-clip and override the default option of 0.5 with -d 1 for a 1 second fade
find . -type f -name "*.mp4" -exec sh -c \
'fade-clip -i "${0}" -d 1' \
"{}" \;

fade-normalize

fade video and audio in and out and normalize

fade-normalize youtube

  • script usage
fade-normalize -i video.(mp4|mkv|mov|m4v) -d (0.[0-9]|1) -o outfile.mp4
-i infile.(mp4|mkv|mov|m4v)
-d (0.[0-9]|1) : optional agument # default is 0.5
-o outfile.mp4 : optional agument # default is infile-name-normalized-date-time

fade-normalize batch process

Batch process files in the current working directory

find . -type f -name "*.mp4" -exec sh -c \
'fade-normalize -i "${0}" -d 0.5' \
"{}" \;

fade-title

fade video and audio in and out, normalize the audio and create video a lower third title from the filename

fade-title youtube

  • script usage
fade-title -i infile.(mp4|mkv|mov|m4v) -d (0.[0-9]|1) -s 000 -e 000 -o outfile.mp4
-i infile.(mp4|mkv|mov|m4v)
-d (0.[0-9]|1) : from 0.1 to 0.9 or 1 : optional agument # default is 0.5
-s 000         : from 000 to 999
-e 000         : from 000 to 999
-o outfile.mp4 : optional agument # default is infile-name-title-date-time

fade-title batch process

Batch process files in the current working directory

find . -type f -name "*.mp4" -exec sh -c \
'fade-title -i "${0}" -d 0.5 -s 10 -e 20' \
"{}" \;

img2video

convert an image into a video file

img2video youtube

  • script usage
img2video -i infile.(png|jpg|jpeg) -d (000) -o outfile.mp4
-i infile.(mp4|mkv|mov|m4v)
-d (000)       : duration
-o outfile.mp4 : optional agument # default is infile-name-video-date-time

img2video batch process

Batch process files in the current working directory

Note we omit the -o option to use the default outfile name, infile-name-video-date-time

Batch convert png in the current directory into video clips with a 30 second duration

find . -type f -name "*.png" -exec sh -c \
'img2video -i "${0}" -d 30' \
"{}" \;

loudnorm

ffmpeg loudnorm

loudnorm youtube

  • script usage
loudnorm -i infile.(mkv|mp4|mov|m4v|m4a|aac|wav|mp3)

normalize

normalize audio levels

normalize youtube

  • script usage
normalize -i infile.(mp4|mkv|mov|m4v|aac|m4a|wav|mp3) -o outfile.(mp4|mkv|mov|m4v|aac|m4a|wav|mp3)
-i infile.(mp4|mkv|mov|m4v|aac|m4a|wav|mp3)
-o outfile.(mp4|mkv|mov|m4v|aac|m4a|wav|mp3) : optional agument # default is infile-name-normalize-date-time-extension

normalize batch process

Batch process files in the current working directory

Note we omit the -o option to use the default outfile name, infile-name-normalize-date-time

Batch normalize mp4 videos in the current directory

find . -type f -name "*.mp4" -exec sh -c \
'normalize -i "${0}"' \
"{}" \;

overlay-clip

overlay one video clip on top of another video clip

overay-clip youtube

  • script usage
overlay-clip -i infile.(mp4|mkv|mov|m4v) -v infile.(mp4|mkv|mov|m4v) -p [0-999] -o oufile.mp4
+ -i infile.(mp4|mkv|mov|m4v) : bottom video
+ -v infile.(mp4|mkv|mov|m4v) : overlay video
+ -p [0-999]                  : time to overlay the video
+ -o outfile.mp4              : optional agument # default is infile-name-overlay-date-time

overlay-pip

create a picture in picture

overlay-pip youtube

  • script usage
overlay-pip -i infile.(mp4|mkv|mov|m4v) -v infile.(mp4|mkv|mov|m4v) -p [0-999] 
-m [00] -x (tl|tr|bl|br) -w [000] -f (0.1-9|1) -b [00] -c colour -o outfile.mp4
overlay-pip -i infile.(mp4|mkv|mov|m4v) -v infile.(mp4|mkv|mov|m4v) -p [0-999] 
-m [00] -x (tl|tr|bl|br) -w [000] -f (0.1-9|1) -o outfile.mp4

-i infile.(mp4|mkv|mov|m4v) : bottom video
-v infile.(mp4|mkv|mov|m4v) : overlay video
-p [0-999]                  : time to overlay the video
-m [00]                     : margin defaults to 0
-x (tl|tr|bl|br)            : pip postion - defaults to tr
-w [000]                    : width - defaults to 1/4 of vide size
-f (0.1-9|1)                : fade from 0.1 to 1 - defaults to 0.2
-b [00]                     : border
-c colour                   : colour
-o outfile.mp4              : optional agument # if option not provided defaults to infile-name-pip-date-time"

pan-scan

pan image

  • script usage
pan-scan -i infile.(png|jpg|jpeg) -d (000) -p (l|r|u|d) -o outfile.mp4
pan-scan -i infile.(png|jpg|jpeg) -d (000) -p (l|r|u|d) -o outfile.mp4

-i = infile.(png|jpg|jpeg)
-d = duration : from 1-999
-p = position : left, right, up, down
-o = outfile.mp4 : optional agument # default is infile-name-pan-date-time

scene-cut

scene-cut takes a cut file and video and cuts the video into clips

  • script usage
scene-cut -i input -c cutfile
  • example usage
scene-cut -i input -c cutfile

-i input.(mp4|mov|mkv|m4v)
-c cutfile

ffmpeg requires a start point and a duration, not an end point

cut file - hours, minutes, seconds in this example we create 2 - 30 seconds clips

a 30 second clip that starts at 00:00:00 and another 30 second clip that starts at 00:01:00

00:00:00,00:00:30
00:01:00,00:00:30

cut file - seconds in this example we create 2 - 30 seconds clips

a 30 second clip that starts at 0 and another 30 second clip that starts at 60

0,30
60,30

scene-detect

scene-detect takes a video file and a threshold for the scene detection from 0.1 to 0.9 you can also use the -s and -e options to set a range for thew scene detection, if you dont specify a range scene detection will be perform on the whole video

ffmpeg scene detection - automatically cut videos into separate scenes

ffmpeg scene detection - version 2 - specify a range in the video and cut into separate scenes

ffmpeg scene detect - version 3 - sexagesimal format - hours, minutes, seconds

  • script usage
scene-detect -s 00:00:00 -i infile -e 00:00:00 -t (0.1 - 0.9) -f sec -o outfile
  • example usage
scene-detect -s 00:00:00 -i infile -e 00:00:00 -t (0.1 - 0.9) -f sec -o outfile

-s 00:00:00 : start time
-i input.(mp4|mov|mkv|m4v)
-e 00:00:00 : end time
-t (0.1 - 0.9) # threshold
-f sec # output in seconds
-o output.txt

scene-images

scene-images takes a video file and a cut file, created with the scene-detect script either in seconds or sexagesimal format and then creates an image for each cut point

  • script usage
scene-images -i input -c cutfile
  • example usage
scene-images -i input -c cutfile

-i input.(mp4|mov|mkv|m4v)
-c cutfile

scene-time

scene-time takes a cut file, created with the scene-detect script either in seconds or sexagesimal format

0:00:00
0:00:11.875000
0:00:15.750000

The script creates clips by subtracting the cut point from the start point and converts sexagesimal format and then creates a file with the start point a comma and then the duration of the clip

the output of the scene-time script is used with the scene-cut script to create the clips

0,11.875
11.875,3.875
  • script usage
scene-time -i input -o output
  • example usage
scene-time -i input -o output

-i input
-o output

subtitle-add

add subtitles to a video file

subtitle-add youtube

  • script usage
subtitle-add -i video.(mp4|mov|mkv|m4v) -s subtitle.srt -o outfile.mp4
-i infile.(mp4|mkv|mov|m4v)
-s subtitle.srt
-o outfile.mp4 : optional agument # default is infile-name-subs-date-time

subtitle-add batch process

Batch process files in the current working directory

Note we omit the -o option to use the default outfile name, infile-name-subs-date-time

The video and subtitle files you want to combine must have the same name

for example

file1.mp4
file1.srt
file2.mp4
file2.srt

running the following code will run the subtitle-add script and combine file1.mp4 with file1.srt and file2.mp4 with file2.srt

find . -type f -name "*.mp4" -exec sh -c \
'subtitle-add -i "${0}" -s "${0%.*}.srt"' \
"{}" \;

scopes

ffplay video scopes youtube video

  • script usage
scopes -i infile
scopes -o infile
scopes -p infile
scopes -s infile
scopes -w infile
scopes -v infile
-i infile = histogram
-o infile = rgb overlay
-p infile = rgb parade
-s infile = rgb overlay and parade
-w infile = waveform
-v infile = vector scope
-h = help

tile-thumbnails

create thumbnails froma a video and tile into an image

tile-thumbnails youtube

ffmpeg colour syntax

ffmpeg wiki seeking

Note that you can use two different time unit formats: sexagesimal (HOURS:MM:SS.MILLISECONDS, as in 01:23:45.678), or in seconds. If a fraction is used, such as 02:30.05, this is interpreted as “5 100ths of a second”, not as frame 5. For instance, 02:30.5 would be 2 minutes, 30 seconds, and a half a second, which would be the same as using 150.5 in seconds.

  • script usage
tile-thumbnails -i infile.(mp4|mkv|mov|m4v|webm) \
-s 00:00:00.000 -w 000 -t 0x0 -p 00 -m 00 -c color -o outfile.png
tile-thumbnails -i infile.(mp4|mkv|mov|m4v|webm) \
-s 00:00:00.000 -w 000 -t 0x0 -p 00 -m 00 -c color -o outfile.png

-i infile.(mp4|mkv|mov|m4v|webm)
-s seek into the video file                : default 00:00:05
-w thumbnail width                         : 160
-t tile layout format width x height : 4x3 : default 4x3
-p padding between images                  : default 7
-m margin                                  : default 2
-c color = https://ffmpeg.org/ffmpeg-utils.html#color-syntax : default black
-o outfile.png :optional agument 
# if option not provided defaults to infile-name-tile-date-time.png

If the tiled image only creates one thumbnail from the video and the rest of the image is black, then the issue may be the frame rate of the video

you can check the videos frame rate with ffmpeg

ffmpeg -i infile.mp4

if the framerate is 29.97 instead of 30 then you can use ffmpeg to change the framerate and fix the issue

ffmpeg -i infile.mp4 -vf fps=fps=30 outfile.mp4

tile-thumbnails batch process

batch process videos and create thumbnails from the videos and tile into an image

find . -type f -name "*.mp4" -exec sh -c \
'tile-thumbails -i "${0}" -s 00:00:10 -w 200 -t 4x4 -p 7 -m 2 -c white' \
"{}" \;

trim-clip

trim video clip

ffmpeg wiki seeking

Note that you can use two different time unit formats: sexagesimal (HOURS:MM:SS.MILLISECONDS, as in 01:23:45.678), or in seconds. If a fraction is used, such as 02:30.05, this is interpreted as “5 100ths of a second”, not as frame 5. For instance, 02:30.5 would be 2 minutes, 30 seconds, and a half a second, which would be the same as using 150.5 in seconds.

trim-clip youtube

  • script usage
trim-clip -s 00:00:00.000 -i infile.(mp4|mov|mkv|m4v|aac|m4a|wav|mp3) \
-t 00:00:00.000 -o outfile.(mp4|aac|mp3|wav)
-s 00:00:00.000 : start time
-i infile.(mp4|mov|mkv|m4v|aac|m4a|wav|mp3)
-t 00:00:00.000              : number of seconds after start time
-o outfile.(mp4|aac|mp3|wav) : optional agument # default infile-name-trimmed-date-time.(mp4|aac|mp3|wav)

trim-clip batch process

Batch process files in the current working directory

Note we omit the -o option to use the default outfile name, infile-name-trimmed-date-time

Batch trim all the mp4 files in the current directory, from 00:00:00 to 00:00:30

find . -type f -name "*.mp4" -exec sh -c \
'trim-clip -s 00:00:00 -i "${0}" -t 00:00:30' \
"{}" \;

vid2gif

create a gif animation from a video

vid2gif youtube

  • script usage
vid2gif -s 00:00:00.000 -i infile.(mp4|mov|mkv|m4v) -t 00:00:00.000 -f [00] -w [0000] -o outfile.gif
vid2gif -s 00:00:00.000 -i infile.(mp4|mov|mkv|m4v) -t 00:00:00.000 -f [00] -w [0000] -o outfile.gif
-s 00:00:00.000 : start time
-i infile.(mp4|mov|mkv|m4v)
-t 00:00:00.000 : number of seconds after start time
-f [00]         : framerate
-w [0000]       : width
-o outfile.gif  :optional agument 
# if option not provided defaults infile-name-gif-date-time.gif

waveform

create a waveform from an audio or video file and save as a png

waveform youtube

  • script usage
waveform -i infile.(mp4|mkv|mov|m4v|webm|wav|aac|m4a|mp3) -o oufile.png
-i infile.(mp4|mkv|mov|m4v|webm|aac|m4a|wav|mp3)
-o outfile.png : optional agument # default is infile-name-waveform-date-time

waveform batch process

Batch process files in the current working directory

Note we omit the -o option to use the default outfile name, infile-name-waveform-date-time

Create waveform images from all the mp4 fies in the current directory

find . -type f -name "*.mp4" -exec sh -c \
'waveform -i "${0}"' \
"{}" \;

webp

create a animated webp image from a video with ffmpeg

webp animated images youtube

  • script usage
webp -i input -c 0-6 -q 0-100 -f 15 -w 600 -p none -o output.webp
-i input.webp
-c compression level: 0 - 6 : default 4
-q quality: 0 - 100 : default 80
-f framerate: default 15
-w width: default 600px
-p preset: none|default|picture|photo|drawing|icon|text : default none
-o output.webp :optional agument
# if option not provided defaults infile-name.webp

webp batch process

Batch process files in the current working directory

find . -type f -name "*.mp4" -exec sh -c 'webp -i "${0}"' "{}" \;

xfade

apply a transition between two clips with the xfade filters

xfade ffmpeg wiki

  • script usage
xfade -a clip1.(mp4|mkv|mov|m4v) -b clip2.(mp4|mkv|mov|m4v) -d duration -t transition -f offset -o outfile.mp4
  • help
# ffmpeg xfade transitions

xfade -a clip1.(mp4|mkv|mov|m4v) -b clip2.(mp4|mkv|mov|m4v) -d duration -t transition -f offset -o outfile.mp4
-a clip1.(mp4|mkv|mov|m4v) : first clip
-b clip2.(mp4|mkv|mov|m4v) : second clip
-d duration                : transition duration
-t transition              : transition
-f offset                  : offset
-o outfile.mp4             : optional agument # if option not provided defaults to infile-name-xfade-date-time

+ transitions

circleclose, circlecrop, circleopen, diagbl, diagbr, diagtl, diagtr, dissolve, distance
fade, fadeblack, fadegrays, fadewhite, hblur, hlslice, horzclose, horzopen, hrslice
pixelize, radial, rectcrop, slidedown, slideleft, slideright, slideup, smoothdown
smoothleft, smoothright, smoothup, squeezeh, squeezev, vdslice, vertclose, vertopen, vuslice
wipebl, wipebr, wipedown, wipeleft, wiperight, wipetl, wipetr, wipeup

zoompan

convert a image to video and apply the ken burns effect to the clip

  • script usage
zoompan -i infile.(png|jpg|jpeg) -d (000) -z (in|out) -p (tl|c|tc|tr|bl|br) -o outfile.mp4
-i infile.(png|jpg|jpeg)
-d duration    : from 1-999
-z zoom        : in or out
-p position    : zoom to location listed below
-o outfile.mp4 : optional agument # default is infile-name-zoompan-date-time
+------------------------------+
+tl            tc            tr+
+                              +        
+              c               +
+                              +
+bl                          br+
+------------------------------+

zoompan batch process

Batch process files in the current working directory

Note we omit the -o option to use the default outfile name, infile-name-zoompan-date-time

Batch process all the png files in the current working directory, apply the zoompan script with a 5 second duration, zoom in to the center of the image

find . -type f -name "*.png" -exec sh -c \
'zoompan -i "${0}" -d 5 -z in -p c' \
"{}" \;

About

ffmpeg shell scripts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 99.0%
  • Makefile 1.0%