Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
SAVEIFS=$IFS
#вырезаю первые 47 секунд https://blog.dbrgn.ch/2013/1/29/cut-video-from-bash-with-ffmpeg/
# IFS это сепаратор http://www.cyberciti.biz/tips/handling-filenames-with-spaces-in-bash.html
IFS=$(echo -en "\n\b")
for f in *
do
NAME=${f%\ Salman*} # separator \ Salman*
ffmpeg -ss 00:00:47.0 -i $f -acodec copy -vcodec copy -async 1 $NAME.mp4
rm $f
done
IFS=$SAVEIFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment