File: ffmpeg.sh

package info (click to toggle)
golang-github-theckman-yacspin 0.13.12-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 252 kB
  • sloc: sh: 8; makefile: 3
file content (18 lines) | stat: -rw-r--r-- 341 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

####
#
# Convert *.mp4 files in the current directory to GIFs at 10 FPS
#
####

function main() {
    for file in *.mp4;
    do
        basename=$(echo "${file}" | sed -e 's/\.mp4$//')

        ffmpeg -i "${basename}.mp4" -vf "fps=10,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 "${basename}.gif"
    done
}

main