Batch conversion into a new folder with ffmpeg
The accepted answer in the question you're referring to uses additional unnecessary processes, legacy code, and doesn't prevent globbing or word splitting.

See the second answer which is shorter, simpler, and more efficient:

for f in *.mp4; do ffmpeg -i "$f" &lt;additional options&gt; "encoded/${f%.*}.mp4"; done


Secondly, don't use fancy quotes which will cause errors, so instead of “$varible” use "$variable".