【发布时间】:2018-10-09 23:41:53
【问题描述】:
在这个.ogg 文件上
$ tree
.
├── Disc 1 - 01 - Procrastination.ogg
├── Disc 1 - 02 - À carreaux !.ogg
├── Disc 1 - 03 - Météo marine.ogg
└── mp3
我尝试使用while 循环将它们转换为 mp3,并在文件名中保留空格::
$ ls *.ogg | while read line; do ffmpeg -i "$line" mp3/"$line".mp3 ; done
但是我得到这个错误::
$ ls *.ogg | while read line; do ffmpeg -i "$line" mp3/"$line".mp3 ; done
...
Parse error, at least 3 arguments were expected, only 0 given
in string ' 1 - 02 - À carreaux !.ogg' ...
...
此报告bash ffmpeg find and spaces in filenames 即使看起来相似,也是针对更复杂的脚本并且没有答案。
ffmpeg not working with filenames that have whitespace 仅在输出为 http:// URL 时修复它
【问题讨论】:
标签: bash while-loop ffmpeg