📖
mabutou's wiki
  • About
  • 🤖Linux
    • 常规日志ip统计
    • traefik 生成 htpasswd
    • 日志查询
      • 按时间筛选跨行日志
      • 文本搜索 Ripgrep
      • goaccess 解析日志文件
      • ripgrep 筛选指定时间范围日志
    • 根据端口号,找到对应进程
    • Centos 7
      • centos7 安装 MySQL 客户端
    • Ubuntu
      • 清理ubuntu磁盘空间
    • dpkg: warning: files list file for package 'x' missing
    • 转发本地代理到服务器
    • 50 Most Frequently Used UNIX
    • 僵尸进程
    • 查看大文件
    • install xrdp
    • locales error
    • OpenSSH Slow: Hanging at SSH2_MSG_SERVICE_ACCEPT received
    • shell 命令按次数输出v2访问日志的 ip 统计
    • ssh 端口转发脚本
    • shell proxy
    • firewall-cmd
    • mout webdav
    • du 命令
    • Unable to set locale
    • tar分卷压缩与解压缩
    • 合并目录下所有文件内容
    • rsync command
    • journal 日志大小限制
    • add swapfile
    • LVM manage
    • Linux logrotate
    • new user && group
    • Nginx 开启OCSP装订
    • 删除指定时间区间内的文件
    • 群晖初始化
    • ubuntu 内核升级脚本
    • curl 请求带有用户名和密码的 url
  • 🐬Front-end
    • 清理yarn/npm本地缓存
  • ❄️ K8S
    • 批量删除failed pod
    • 镜像批量打标签并推送
    • basic command
    • busybox 解析 pod ip
    • kubectl set node label
    • set pod's image version
    • k8s proxy
    • Force delete POD
  • 🐳Docker
    • 根据进程pid查看该进程所属的容器
    • docker pull 设置下载线程数
    • 查看数据卷目录
    • delete dangling images
    • install docker-compose
    • 按关键词停止容器
    • 限制&&清除容器日志
    • docker images 按大小排序镜像
    • 实时截取日志
    • 查询容器ip
    • 配置镜像加速
    • df 排除 多余文件系统
    • docker copy file from image to host && prune container
  • 🐮Rancher
    • 重置admin 密码
    • 卸载
  • 🐍Python
    • start a simple http_server
  • 🍎Mac
    • MacOS 浏览器播放音频没声音
    • mac 执行sed -i指令时,提示extra characters at the end of command
    • 创建 macOS U盘启动盘
    • Tmux 启动时 127 错误
    • Kill Apple Remote Desktop via ssh
    • hack wechat sqlite
    • 刷新 DNS
    • masscan 端口扫描
    • start apache_server
    • timemachine list and clean
    • dmg || .app 提示文件已损坏
    • 重启 Dock 栏
    • macOS(BSD system) 禁用 ssh 密码登录
  • 🖥️Windows
    • 命令行获取电脑的序列号
    • enable windows ping icmp
    • 关闭休眠模式
    • 卓越性能模式
  • ⌨️ Cheatsheet
    • VIM
    • Bash
    • Git
      • github init
      • Git 变更默认分支名
      • Git 大小写问题
    • Tmux
    • ffmpeg
  • Application
    • chrome 清除 dns && https 缓存
  • 正则表达式
    • basic
    • regular expression
  • Proxmox
    • stop pve
  • VMware
    • 虚拟机设置静态ip, Vmware 虚拟机配置全攻略 - 少数派
  • Hetzner
    • hz 单ip 独服 安装 proxmox 后网卡配置
    • hetzner_box
  • Oracle-Cloud-ARM
    • 修改引导卷大小
  • 镜像源
    • pip 清华源
    • ubuntu 阿里云镜像
    • centos 阿里云镜像
    • npm 淘宝镜像
由 GitBook 提供支持
在本页

这有帮助吗?

  1. ⌨️ Cheatsheet

ffmpeg

##############################################################################
# FFMPEG CHEATSHEET (中文速查表)  -  by skywind (created on 2020/09/20)
# Version: 3, Last Modified: 2020/09/21 14:37
# https://github.com/skywind3000/awesome-cheatsheets
##############################################################################


##############################################################################
# 基础参数
##############################################################################

-codecs                                                     # 列出可用编码
-formats                                                    # 列出支持的格式
-protocols                                                  # 列出支持的协议
-i input.mp4                                                # 指定输入文件
-c:v libx264                                                # 指定视频编码
-c:a aac                                                    # 指定音频编码
-vcodec libx264                                             # 旧写法
-acodec aac                                                 # 旧写法
-fs SIZE                                                    # 指定文件大小


##############################################################################
# 音频参数
##############################################################################

-aq QUALITY                                                 # 音频质量,编码器相关
-ar 44100                                                   # 音频采样率
-ac 1                                                       # 音频声道数量
-an                                                         # 禁止音频
-vol 512                                                    # 改变音量为 200%


##############################################################################
# 视频参数
##############################################################################

-aspect RATIO                                               # 长宽比 4:3, 16:9
-r RATE                                                     # 每秒帧率
-s WIDTHxHEIGHT                                             # 视频尺寸:640x480
-vn                                                         # 禁用视频


##############################################################################
# 码率设置
##############################################################################

-b:v 1M                                                     # 设置视频码率 1mbps/s
-b:a 1M                                                     # 设置音频码率 1mbps/s


##############################################################################
# 视频转码
##############################################################################

ffmpeg -i input.mov output.mp4                              # 转码为 MP4
ffmpeg -i input.mp4 -vn -c:a copy output.aac                # 提取音频
ffmpeg -i input.mp4 -vn -c:a mp3 output.mp3                 # 提取音频并转码
ffmpeg -i input.mov -c:v libx264 -c:a aac -2 out.mp4        # 指定编码参数
ffmpeg -i input.mov -c:v libvpx -c:a libvorbis out.webm     # 转换 webm
ffmpeg -i input.mp4 -ab 56 -ar 44100 -b 200 -f flv out.flv  # 转换 flv
ffmpeg -i input.mp4 -an animated.gif                        # 转换 GIF


##############################################################################
# 切分视频
##############################################################################

ffmpeg -i input.mp4 -ss 0 -t 60 first-1-min.mp4             # 切割开头一分钟
ffmpeg -i input.mp4 -ss 60 -t 60 second-1-min.mp4           # 一分钟到两分钟
ffmpeg -i input.mp4 -ss 00:01:23.000 -t 60 first-1-min.mp4  # 另一种时间格式


##############################################################################
# 视频尺寸
##############################################################################

ffmpeg -i input.mp4 -vf "scale=640:320" output.mp4          # 视频尺寸缩放
ffmpeg -i input.mp4 -vf "crop=400:300:10:10" output.mp4     # 视频尺寸裁剪


##############################################################################
# 其他用法
##############################################################################

ffmpeg -i sub.srt sub.ass                                   # 字幕格式转换
ffmpeg -i input.mp4 -vf ass=sub.ass out.mp4                 # 烧录字幕进视频
ffmpeg -i "<url>" out.mp4                                   # 下载视频


##############################################################################
# 相关资源
##############################################################################

https://cheatography.com/thetartankilt/cheat-sheets/ffmpeg/
http://qwinff.github.io/
上一页Tmux下一页Application

最后更新于4年前

这有帮助吗?