我正在尝试使用MP4Box连接目录中的几个.mp4文件。简单形式的基本命令如下所示:
mp4box -cat 'Film.mp4' -cat 'Credits.mp4' -new Total.mp4
我做了这个脚本,但它不起作用:
#!/bin/bash
files='*.mp4'; for i in $files; do MP4Box -cat "'"$i"'" -new Total.mp4; done
它只是给出:
Error appending '01_Introduction.mp4': Requested URL is not valid or cannot be found
Error - 2 input names specified, please check usage
Error - 2 input names specified, please check usage
Error - 2 input names specified, please check usage
Error - 2 input names specified, please check usage
Error - 2 input names specified, please check usage
Error - 2 input names specified, please check usage
... etc.
我的表情怎么了?
我选择了:
#!/bin/bash
rm Total.mp4; files='*.mp4'; for i in $files; do
echo " -cat " "'"$i"'" >>input.txt; done
file="input.txt"; name=$(cat "$file");
eval "MP4Box " $name " -new Total.mp4";
我与达成和解
#!/bin/bash
rm Total.mp4; files='*.mp4'; for i in $files; do
echo " -cat " "'"$i"'" >>input.txt; done
file="input.txt"; name=$(cat "$file");
eval "MP4Box " $name " -new Total.mp4";