Files
linux-wiki/content/deepin折腾笔记/第六章/6.11.2.md
2021-10-21 14:57:58 +08:00

14 lines
573 B
Markdown
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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