惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recorded Future
Recorded Future
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
N
News and Events Feed by Topic
SecWiki News
SecWiki News
T
The Exploit Database - CXSecurity.com
S
Security @ Cisco Blogs
H
Heimdal Security Blog
Security Latest
Security Latest
T
Threatpost
V2EX - 技术
V2EX - 技术
C
Cybersecurity and Infrastructure Security Agency CISA
GbyAI
GbyAI
The Last Watchdog
The Last Watchdog
Recent Announcements
Recent Announcements
P
Privacy International News Feed
K
Kaspersky official blog
P
Proofpoint News Feed
L
LangChain Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Security Archives - TechRepublic
Security Archives - TechRepublic
T
Threat Research - Cisco Blogs
博客园_首页
T
Tor Project blog
M
MIT News - Artificial intelligence
The Hacker News
The Hacker News
The GitHub Blog
The GitHub Blog
月光博客
月光博客
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
F
Full Disclosure
MyScale Blog
MyScale Blog
The Register - Security
The Register - Security
Engineering at Meta
Engineering at Meta
Y
Y Combinator Blog
Cyberwarzone
Cyberwarzone
L
LINUX DO - 最新话题
量子位
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
O
OpenAI News
T
The Blog of Author Tim Ferriss
S
Schneier on Security
小众软件
小众软件
The Cloudflare Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Know Your Adversary
Know Your Adversary
Microsoft Security Blog
Microsoft Security Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
L
Lohrmann on Cybersecurity
Vercel News
Vercel News

VnYzm的博客

游戏玩后感:ReLief:献给亲爱的你 我的周边(谷子)分享 游戏玩后感:Kanon 简谱:致真实的你 《Rust中常见的有关生命周期的误解》学习笔记 简谱:StarMap 简谱:かく咲きたらばいと恋ひめやも 简谱:东风 简谱:无法诉说的思念 简谱:Girlish 游戏玩后感:时钟机关的Layline 简谱:风之琶音 简谱:星空的记忆 简谱:因为遇见了你 简谱:月童 番茄简谱脚本转调器 游戏玩后感:青空下的约定:Refine 游戏玩后感:在这苍穹展翅 书籍读后感:控制论与科学方法论 游戏玩后感:恋爱表达式 游戏玩后感:樱之诗 MLIR-tutorial学习笔记 游戏玩后感:潜伏之赤途 游戏玩后感:纯爱咖啡厅:帕露菲重制版 游戏玩后感:智以泪聚 游戏玩后感:初雪樱 游戏玩后感:告别回忆:从今以后 游戏玩后感:梦灯花 游戏玩后感:金辉恋曲四重奏 游戏玩后感:五彩斑斓的世界 昇腾310P使用记录 游戏玩后感:AIR 游戏玩后感:弹丸论破 游戏玩后感:流景之海的艾佩莉亚 Xilinx_HLS上板过程记录 游戏玩后感:告别回忆2 游戏玩后感:恋爱绮谭 Faiss和Rapidsai_Raft使用记录 游戏玩后感:近月少女的礼仪 游戏玩后感:樱色之云,绯色之恋 游戏玩后感:幸运草的约定 游戏玩后感:星之梦、候鸟和丸子与银河龙 游戏玩后感:白色相簿2 Windows上使用VTune分析PyTorchExtension调用的Cpp程序 SpinalHDL上板过程记录 游戏玩后感:仰望夜空的星辰 最简单的算卦方法之一:梅花易数法 游戏玩后感:苍之彼方的四重奏 krkr引擎解包工具介绍 自定义CUDA实现PyTorch算子的四种简单方法 游戏玩后感:星空的记忆 游戏玩后感:9nine 游戏玩后感:AtriMyDearMoments 游戏玩后感:极限脱出 游戏玩后感:魔女的夜宴 SSH实现多跳代理 动漫观后感:向山进发 flv重封装H264、AAC流 动漫观后感:夏日重现 CSP模板 游戏玩后感:海沙风云 动漫观后感:灵能百分百 游戏玩后感:交响乐之雨 游戏玩后感:爱上火车LastRun 游戏玩后感:LittleBustersEX 游戏玩后感:SummerPockets 游戏玩后感:逆转裁判 Ultra96V2开发板简单使用 SpinalWorkshop实验笔记(三) SpinalWorkshop实验笔记(二) SpinalWorkshop实验笔记(一) PYNQ开发板上使用USB声卡+OSS兼容层播放音频 TestOS移植K210开发板 rCore-Tutorial-Book-v3学习笔记(七) 动漫观后感:凉宫春日的忧郁 rCore-Tutorial-Book-v3学习笔记(♭七) rCore-Tutorial-Book-v3学习笔记(六) rCore-Tutorial-Book-v3学习笔记(五) rCore-Tutorial-Book-v3学习笔记(四) rCore-Tutorial-Book-v3学习笔记(三) rCore-Tutorial-Book-v3学习笔记(二) rCore-Tutorial-Book-v3学习笔记(一) 游戏玩后感:RewritePlus MIT-6.S081-2020实验(xv6-riscv64)十一:net MIT-6.S081-2020实验(xv6-riscv64)十:mmap MIT-6.S081-2020实验(xv6-riscv64)九:fs MIT-6.S081-2020实验(xv6-riscv64)八:lock MIT-6.S081-2020实验(xv6-riscv64)七:thread MIT-6.S081-2020实验(xv6-riscv64)六:cow MIT-6.S081-2020实验(xv6-riscv64)五:lazy MIT-6.S081-2020实验(xv6-riscv64)四:traps MIT-6.S081-2020实验(xv6-riscv64)三:pgtbl MIT-6.S081-2020实验(xv6-riscv64)二:syscall 动漫观后感:吹响吧上低音号 MIT-6.S081-2020实验(xv6-riscv64)一:util 快速生成网络mp4视频缩略图技术 用plantuml画图示例 QQ缩略图和大图不同实现 Python制作字符图片 使用OpenCV对图片进行特征点检测和匹配
ffmpeg常见用法总结
VnYzm · 2018-08-28 · via VnYzm的博客

1. 视频/音频剪切:

ffmpeg [-t 00:00:20] -i input_file [-ss 00:00:10] output_file
  • 去掉-ss指令表示从头开始
  • 去掉-t指令表示剪切到结尾

2. wav转MP3:

ffmpeg -i input.wav -acodec mp3 output.mp3

3. 视频/音频连接:

创建input.txt

file '/input/input_file1'
file '/input/input_file2'
file '/input/input_file3'

然后输入命令

ffmpeg -safe 0 -f concat -i input.txt -acodec copy -vcodec copy output_file

4.分离视频中的音频和视频

  • 分离视频
ffmpeg -i input_file -vcodec copy -an output_file
  • 分离音频
ffmpeg -i input_file -acodec copy -vn output_file

注意视频中包含的音频常常是aac格式,故如果output_file的后缀名是mp3会报错。

5.合成音频和视频

ffmpeg -i audio_file -i video_file -acodec copy -vcodec copy output_file

如果audio_file是mp3格式,建议先转码为aac格式再合成,因为该命令要求mp3的采样率为44100Hz,如果audio_file的采样率不是44100Hz则需重采样,而对aac文件没有这样的要求。

6. 修改视频的帧率和分辨率

ffmpeg -i video_file -r 30 -s 宽x高 output_file

注意那个乘号是小写字母x,宽和高以像素为单位,如720x480。

7. 改变视频的速度(音频和画面)

ffmpeg -i input_file -vf  "setpts=倍数的倒数*PTS" -af "atempo=倍数" output_file

比方说要让视频放慢2倍,即0.5倍速,则倍数的倒数为2,倍数为0.5。


以后遇到再更新