Last active
July 3, 2017 09:49
-
-
Save kiwec/f271790c605112d3505cdea04e25acaa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
LAST="" | |
LINE=0 | |
while read TIME | |
do | |
if [ -n "$LAST" ] | |
then | |
NAME=$(cat names.txt | head -n $LINE | tail -1) | |
START="ffmpeg -i input.mkv -ss $LAST -to $TIME" | |
$START -c:a flac "$NAME.flac" | |
fi | |
LAST="$TIME" | |
LINE=$(($LINE + 1)) | |
done < times.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment