I have a file sorted_result.txt, It contains the following:
00:7:11.8
00:8:32.0
00:9:16.8
00:19:1.6
00:24:22.84
When I run the following code, the while loop executes only once instead of running for each line in the file.
#!/bin/bash
input="./sorted_result.txt"
count=1
initial=00:00:00
sixty=60
while read line
do
ffmpeg -i cnbc.avi -vcodec h264 -vf fps=25 -ss $initial -to $line $count.avi
count=$((count + 1))
initial=$line
done < "$input"
Please help