Showing posts with label Bash. Show all posts
Showing posts with label Bash. Show all posts

Bash script to create gif from ogv video

Adjust FPS to your needs.

If you save it as "ogvtogif" use like this:

$ ogvtogif file.ogv

_____________________________________________________________
#!/bin/bash

INPUT_FILE=$1
FPS=8

TEMP_FILE_PATH="tmp.png"

ffmpeg -i $INPUT_FILE -vf fps=$FPS,palettegen $TEMP_FILE_PATH
ffmpeg -i $INPUT_FILE -i $TEMP_FILE_PATH -loop 0 -filter_complex "fps=$FPS,paletteuse" $INPUT_FILE.gif

rm $TEMP_FILE_PATH
_____________________________________________________________

Fast linked list without list

If you need a very fast way to iterate over a list of objects and call the same method on all of them, then here is a posible solution. Der...