I have the following shell script and it is missing some initial characters (it misses initial couple of characters, so far in my observation) from each line except the first line.
And this happens only when I use the ffmpeg
command. Otherwise, it is fine. But this command does the actual task in this script.
Why is it so and what is the fix?
#!/bin/bash
while read line; do
printf "%s\n" "$line"
ifile=$line
printf "%s\n" "$ifile"
ofile=abc_$line
printf "%s\n" "$ofile"
############### Problem is the following command: ##########
ffmpeg -y -i $ifile -c:v libx264rgb -b:v 512k -bf 0 -pix_fmt rgb24 -r 25 -strict -2 $ofile
##########rest is fine##########
echo $ifile
done < file_list