14 lines
573 B
Markdown
Executable File
14 lines
573 B
Markdown
Executable File
# 6.11.2 批量编码转换 .
|
||
安装影音转换工具:sudo apt install ffmpeg
|
||
创建运行脚本:touch conv.sh
|
||
右键设置可执行权限,或者:chmod +x conv.sh
|
||
用编辑器打开conv.sh,添加以下内容(参数可酌情修改):
|
||
#!/bin/bash
|
||
for file in `find . -type f -a -name '*.mov'`
|
||
do
|
||
ffmpeg -i "$file" -c:v h264 -b:v 3000k -r
|
||
:v 25 -c:a ac3 -b:a 192k -r:a 44100 -ac 2 "$(expr "$file" : '\(.*\)\.mov').mp4";
|
||
[ "x$?x" == "x0x" ] && rm "$file"
|
||
done
|
||
|