all repos — dotfiles @ 0c629a2b5b6a9c3e6d5b26bf9e792a80d74f40d1

linux dotfiles

bin/scripts/poster_extract (view raw)

 1
 2
 3
 4
 5
#!/bin/sh
# this script extracts any jpeg imgae file from a media file like mp4,mkv,etc
# the first argument given to the script should be the name of the media file.
std=$(ffprobe -loglevel error -show_entries stream=index,codec_name -of csv "$1" | awk -F ',' '/jpeg/ {print $2}')
ffmpeg -loglevel quiet -i "$1" -map 0:"$std" "$1".jpeg