I wrote a small script that converts HQ video to LQ:
ls video/hq | cut -d. -f1 | while read line ; do
HQ=./video/hq/$line.mp4
LQ=./video/lq/$line.mp4
ffmpeg -i $HQ -crf 40 $LQ
done;
When I run ls video/hq | cut -d. f1 I get back:
1502460615677
1502461135975
1502461292963
1502461373947
1502461493936
1502461782119
But when running the conversion script only 1502460615677 is processed.
If I replace the line with ffmpeg with echo $line echo runs for all but with ffmpeg it only runs for one.
Anyone know why ffmpeg changes how this runs?
lsI don't see a problem. Addset -xto see what commands are actually running.+read lineand then the script ends so no new information.ffmpegcommand forechoit works fine. It seems like ffmpeg breaks out of the loop or something(?)