I have a lot of avi files in one folder and trying to convert them in to mp4. I am using this bash script not sure whats wrong. any idea?
#!/bin/bash
for i in *.avi;
do name=`echo $i | cut -d'.' -f1`;
echo $name;
avconv -i -vcodec libx264 -acodec aac -strict experimental -threads 3 "$i" "$name.mp4";
done
the error I get is :
-vcodec: No such file or directory
-i
flag directly before the input file,"$i"
in this case. – Alex R. Aug 1 '14 at 16:15avconv -i "$i"-vcodec libx264 -acodec aac -strict experimental -threads 3 "$name.mp4"
should work, just to clarify @AlexR.'s answer. – roadmr Aug 1 '14 at 16:27