diff options
author | Grail Finder <wohilas@gmail.com> | 2023-02-04 21:09:19 +0600 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2023-02-04 21:09:19 +0600 |
commit | 9d115d1f90e2f201aa674f82701825bcc3cd3ecf (patch) | |
tree | d008158cf403825347217fb269345fba3ac435ce |
Initial commit
-rwxr-xr-x | cut_by_vtt.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cut_by_vtt.sh b/cut_by_vtt.sh new file mode 100755 index 0000000..d85743f --- /dev/null +++ b/cut_by_vtt.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +filename=${1:-} +audioname=$(printf "$filename" | sed "s/\(.*\).vtt/\1/") + +# given vtt what is original ext? +ffmpeg_commands=$(grep "\-->" $filename | awk -F " " '{print "ffmpeg -i "$audioname" -ss " $1 " -to " $3 " -vn -acodec copy " NR ".ogg"}') + +while read cline; +do + echo $cline && sleep 1; +done <<< $ffmpeg_commands |