ffmpeg的操作参数
ffmpeg 常用命令汇总_kingvon_liwei的博客-CSDN博客_ffmpeg
Print help / information / capabilities:
-L show license
-h topic show help
-? topic show help
-help topic show help
--help topic show help
-version show version
-buildconf show build configuration
-formats show available formats #显示可用格式
-muxers show available muxers
-demuxers show available demuxers
-devices show available devices
-codecs show available codecs
-decoders show available decoders
-encoders show available encoders
-bsfs show available bit stream filters
-protocols show available protocols
-filters show available filters
-pix_fmts show available pixel formats
-layouts show standard channel layouts
-sample_fmts show available audio sample formats
-dispositions show available stream dispositions
-colors show available color names
-sources device list sources of the input device
-sinks device list sinks of the output device
-hwaccels show available HW acceleration methods
Global options (affect whole program instead of just one file):
-loglevel loglevel set logging level #设置日志级别
-v loglevel set logging level
-report generate a report
-max_alloc bytes set maximum size of a single allocated block
-y overwrite output files #全局的意思,全局覆盖输出文件
-n never overwrite output files
-ignore_unknown Ignore unknown stream types
-filter_threads number of non-complex filter threads
-filter_complex_threads number of threads for -filter_complex
-stats print progress report during encoding
-max_error_rate maximum error rate ratio of decoding errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an error instead of success.
-vol volume change audio volume (256=normal)
Per-file main options:
-f fmt force format
-c codec codec name
-codec codec codec name
-pre preset preset name
-map_metadata outfile[,metadata]:infile[,metadata] set metadata information of outfile from infile
-t duration record or transcode "duration" seconds of audio/video
-to time_stop record or transcode stop time
-fs limit_size set the limit file size in bytes
-ss time_off set the start time offset
-sseof time_off set the start time offset relative to EOF
-seek_timestamp enable/disable seeking by timestamp with -ss
-timestamp time set the recording timestamp ('now' to set the current time)
-metadata string=string add metadata
-program title=string:st=number... add program with specified streams
-target type specify target file type ("vcd", "svcd", "dvd", "dv" or "dv50" with optional prefixes "pal-", "ntsc-" or "film-")
-apad audio pad
-frames number set the number of frames to output
-filter filter_graph set stream filtergraph
-filter_script filename read stream filtergraph description from a file
-reinit_filter reinit filtergraph on input parameter changes
-discard discard
-disposition disposition
Video options:
-vframes number set the number of video frames to output
-r rate set frame rate (Hz value, fraction or abbreviation)#设置帧速率(赫兹值、分数或缩 写)
-fpsmax rate set max frame rate (Hz value, fraction or abbreviation)
-s size set frame size (WxH or abbreviation)
-aspect aspect set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
-vn disable video
-vcodec codec force video codec ('copy' to copy stream)
-timecode hh:mm:ss[:;.]ff set initial TimeCode value.
-pass n select the pass number (1 to 3)
-vf filter_graph set video filters
-ab bitrate audio bitrate (please use -b:a)
-b bitrate video bitrate (please use -b:v)
-dn disable data
Audio options:
-aframes number set the number of audio frames to output
-aq quality set audio quality (codec-specific)
-ar rate set audio sampling rate (in Hz)
-ac channels set number of audio channels
-an disable audio
-acodec codec force audio codec ('copy' to copy stream)
-vol volume change audio volume (256=normal)
-af filter_graph set audio filters
Subtitle options:
-s size set frame size (WxH or abbreviation)
-sn disable subtitle
-scodec codec force subtitle codec ('copy' to copy stream)
-stag fourcc/tag force subtitle tag/fourcc
-fix_sub_duration fix subtitles duration
-canvas_size size set canvas size (WxH or abbreviation)
-spre preset set the subtitle options to the indicated preset
-async 1
Audio sync method. "Stretches/squeezes" the audio
stream to match the timestamps, the parameter is
the maximum samples per second by which the audio
is changed. -async 1 is a special case where only
the start of the audio stream is corrected without
any later correction.Note that the timestamps may be further modified
by the muxer, after this. For example, in the
case that the format option avoid_negative_ts
is enabled.This option has been deprecated. Use the aresample
audio filter instead.
音频同步方法。“拉伸/挤压”音频流以匹配时间戳,该参数是每秒更改音频的最大采样数-async 1是一种特殊情况,在这种情况下,只纠正音频流的开头,而不进行任何后续纠正。
注意,在此之后,时间戳可由muxer进一步修改。例如,如果启用了格式选项“avoid_negative_ts”。
此选项已被弃用。改用aresample音频过滤器。
ffmpeg拼接图像
我们经常将两个视频拼接起来做对比,需要用到2宫格
ffmpeg -re -i result_voice_pfpth_00315.mp4
-re -i result_voice_wav2lip.mp4
-filter_complex
"nullsrc=size=450x224[base];
[0:v] setpts=PTS-STARTPTS,scale=224x224 [upperleft];
[1:v] setpts=PTS-STARTPTS,scale=224x224 [upperright];
[base][upperleft] overlay=shortest=1[tmp1];
[tmp1][upperright] overlay=shortest=1:x=224" output.mp4
画布大小为450x224,宽为450,高为224,原来视频大小都是224x224,
[0:V]将其缩放到224x224大小,然后放在upperleft。
[1:V]缩放为224x224,然后放在upperright
[base][upperleft]拼接成为[tmp1] 默认放在(0,0)的位置
[tmp1][upperright]拼接成为最终结果,放在(x=224,y=0)的地方,y没指定默认为0
ffmpeg的操作参数相关推荐
- FFmpeg 源码学习(一):avformat_open_input 源码分析
一.源码方法参数分析 下面是avformat_open_input的方法及参数: /** * Open an input stream and read the header. The codecs ...
- FFMPEG avformat_open_input
FFMPEG avformat_open_input avformat_open_input(),该函数用于打开多媒体数据并且获取一些信息 声明libavformat/avformat.h /*** ...
- FFMPEG源码分析:avformat_open_input()(媒体打开函数)
本文分析了FFMPEG中的媒体打开函数avformat_open_input() //参数ps包含一切媒体相关的上下文结构,有它就有了一切,本函数如果打开媒体成功, //会返回一个AVFormatCo ...
- FFmpeg查看支持的封装、编解码器、滤镜(四)
ffmpeg在做音视频编解码时非常方便,所以在很多场景下转码使用的是ffmpeg,通过ffmpeg --help可以看到ffmpeg常见的命令大概分为6个部分,具体如下. ffmpeg信息查询部分 公 ...
- FFmpeg 快速上手:命令行详解、工具、教程、电子书
FFmpeg 简介 FFmpeg 是一个开源的音视频处理工具,诞生已22年.它可以用来处理音视频的编解码.格式转换.剪辑.合并.抽取.压缩.解压缩.滤镜.字幕等等.它可以在 Windows.Linux ...
- FFMPEG进阶系列02-ffmpeg命令详解3
ffmpeg 的封装转换 FFmpeg的封装转换部分,主要是通过libavformat这部分来完成的功能,通过libavformat库进行mux和demux操作,多媒体文件的格式有很多种,但是还是有好 ...
- FFmpeg学习总结
创作人QQ:851301776,邮箱:lfr890207@163.com,欢迎大家一起技术交流,本博客主要是自己学习的心得体会,只为每天进步一点点! 个人座右铭: 1.没有横空出世,只要厚积一定发. ...
- FFmpeg H.265 | HEVC 设置 GOP
FFmpeg H.265 | HEVC 设置 GOP 引子 环境 H.264 VS H.265 H.264 H.265 后记 参考 引子 最近因为项目需求,得把 .yuv 文件用 FFmpeg , 采 ...
- 从事【音视频】的开发者,看过来,如果记不住FFmpeg命令,可以收藏,不记得的时候,掏出来翻翻
ffmpeg --help大概分为6个部分,具体如下: ffmpeg信息查询部分 公共操作参数部分 文件主要操作参数部分 视频操作参数部分 音频操作参数部分 字母操作参数部分 查看支持的容器格式 # ...
最新文章
- Notepad++ 异常崩溃 未保存的new *文件列表没了怎么办?
- Day08 - 面向对象编程基础
- linux下FTP命令详解
- mysql常用命令,mysql语法,mysql登陆、创建数据库、创建用户、更改密码、为用户授权...
- Effective Java读书笔记七:泛型(部分章节需要重读)
- 嵌入式处理器 cisc risc_RISC-V能否“重构”芯片产业格局
- oracle复制sequence,oracle sequence语句重置方介绍
- 五大新品+两大黑科技,看华为云如何升级基础设施让用户“躺平”
- AI时代,运维和测试岗位如何开启第二春?
- java android rsa加密解密_Android中的RSA加密解密
- Excel模板下载(带下拉框)
- 【观察】戴尔:为核心数据“保驾护航”,为数字化转型“拨云见日”
- win10滑动关机代码bat_IT之家学院:十秒学会Win10滑动关机教程 - IT之家
- 【字符串】字符串逆序
- 软件开发的功能性需求和非功能性需求
- BDW01手把手系列04:基于TencentOS Tiny、腾讯云、腾讯连连之自制定位器
- 价值千万的职业操盘手教程
- 南京大学计算机学硕分数线,有谁知道南京大学这几年计算机研究生的分数线呀...
- AIX中 |SMIT/SMITTY| 的使用
- 超详细面经分享!@最近考虑换工作的伙伴们