I call ffmpeg like this from Mac's terminal:
$ find . -type f -name *.webm | while IFS= read -r f; do echo "$f"; ffmpeg -i "$f" "${f%.webm}".mp4 2> ~/Desktop/err; done
Only the first file returned by find gets processed:
./artist/Moody Blues/_vid/Nights in white satin_lyrics.webm
Excerpt from err:
Enter command: |all |-1 [ ]
Parse error, at least 3 arguments were expected, only 1 given in string 's [360p].webm'
Enter command: |all |-1 [ ] Parse error, at least 3 arguments were expected, only 1 given in string 'hannel/Ash Wainman/_Inbox/BOHEMIAN RHAPSODY - ASH WAINMAN[HD,1280x720].webm'
We should have 'channel' rather than 'hannel'.
"$f"
to prevent filename expansion by the shell,ffmpeg
itself is treating part of the filename as a pattern for expansion. You may find something relevant here FFmpeg formatsffmpeg
is entering interactive mode.$ find . -type f -name "*.webm" | while IFS= read -r f; do echo "$f"; ffmpeg -nostdin -i "$f" "${f%.webm}".mp4 2> ~/Desktop/err; done