#! /bin/zsh # # this file: # https://dataswamp.org/~incal/conf/.zsh/video-repair repair () { local fs=($@) local nom local ext local dst for src in $fs; do nom=${src:r} ext=${src:e} dst=${nom}-rep.${ext} ffmpeg \ -y \ -i $src \ -err_detect ignore_err \ -c copy \ $dst done }