在求职的道路上,简历是我们展示个人能力、经验和潜力最直观也是最重要的工具之一。1、五大常见错误,千万要小心!(1)一份简历,应聘多样岗位不同岗位对雇员的要求是不一样的。通用的简历,无法突出你与目标岗位的关联性,反而会降低竞争力。要基于每个不同岗位的需求,调整简历内容,突出与该职位相关的技能和经验。 (2)模板滥用,配色缺乏审美高颜值的简历是求职的有力敲门砖,但滥用模板可能会导致配色混乱、排版杂乱,甚至是逻辑混乱。 简历应选择简洁、专业的模板,并保持一致的配色方案。同时,注意选择合适的颜色和排版,以给HR营造专业、清晰的印象。 (3)个人信息,不必过于暴露虽然简历需要提供足够的个人信息,但不要暴露过多不必要的隐私信息,比如:婚姻状况、家庭情况、身份证号等。要注意保护个人隐私,只提供与求职相关的信息,比如:联系方式、教育背景、科研经历、志愿活动和工作经验等。(4)经历杂乱,能力不够聚焦大家可能会有很多个人经历,但呈现在简历中,应该有舍有得、清晰明了、有逻辑地呈现。要避免杂乱地列举经历,基于目标岗位的能力要求,选择恰当的个人经历,并用相应的话术突出在这个经历中你的某几项与目标岗位需求匹配的能力,且需要为每个经历提供简洁的描述,强调你做事的结果和贡献。 (5)篇幅过长,错字病句标点如果简历篇幅过长并且逻辑性不强,可能会导致关键信息被埋没。要突出关键信息,避免在简历中包含冗长的段落和不必要的细节。一般情况,应届毕业生用一整页A4纸,大约写800-1000字即可。 此外,拼写、错字、病句、标点错误,在简历中非常常见,这是非常严重的低级错误,很容易被雇主判断为态度问题。 写完简历之后,最好出声音读一遍,仔细校对。这些小错误,可能会给雇主留下不重视、不专业、不踏实、不仔细、不够关注细节的不好印象。 2、如何能让自己的简历脱颖而出?(1)STAR原则S(Situation)交代事件的背景,为什么会去做这件事?T(Task)自己承担的任务是什么,怎样在事情的背景下明确自己的任务。A(Action)自己都完成了些什么,为了完成任务,做了哪些事,为什么要这么做。R(Result)最终获得了何种成果?行动中收获了什么,有没有完成目标。我们来看一个例子: 大家是不是觉得写到这里就完成了呢?如果希望提高简历通过率,我们还可以继续对内容进行优化,不仅让内容符合STAR原则,还可以让内容更具备条理性。以下是进一步的优化结果: 那么STAR原则只能用在简历经历的描述吗?当然不是!在面试时,面试官可能就某段经历,请应聘者展开讲述。很多同学依然会使用STAR原则来描述,但这样的描述平铺直叙,缺乏吸引力。此时完全可以直奔主题,对个人经历进行先抑后扬的故事化重组。 这个时候STAR原则就可以转为CAR原则(Chagllenge挑战、Action行动、Result成果)。例如:在XX基金公司任职期间,作为技术主要负责人我曾遇到一次重大挑战,当时公司B端微信小程序版本大迭代,不仅需要参与并把控前端开发事务,而且还需要整体对接后端开发人员及产品业务人员(Challenge挑战),于是我们几个部门负责人就一起商量,使用微信小程序开发框架,搭建项目架构,根据设计和产品需求,参与需求分析和功能设计,参与后端开发人员进行接口对接,实现数据的交互和展示(Action行动),最后完善小程序各项功能,提升用户体验,用户满意度比原来提升 12%(Result成果)。我觉得这件事既锻炼了我的团队协作能力,更让我对自己的潜力有十足的信心。(2)利用视觉化的方法A.数据与经历的可视化 在简历中使用数据体现经历,可以更加直观地展示经验和能力。 比如,你运营了一个公众号,就可以写,在校期间,运营什么公众号几个月,发表原创文章多少,原创字数累计多少,浏览量多少,用户新增多少,用户完读率多少,公转私多少,还可以进一步增加同比环比数据。一定要学会挖掘数据化的成果,这不仅可以让HR更快地了解你的成就,还能使你的简历更具备说服力。B. 图像化的处理在设计简历时,合理运用颜色、图标和排版,能够使你的简历更具吸引力。但要注意保持简洁和专业,避免过多的花哨元素。一般是选择一个主色调,并在整个简历中保持一致,以营造统一的视觉效果。整个页面所有色彩元素最多不要超过三种。此外,图标可以用来突出你的技能或特长。 比如,如果你擅长多种编程语言,可以用相应的图标来表示每种语言的熟练程度。这样,HR可以在短时间内快速了解你的技能结构。C. 有效利用模板选择一个干净、简洁但又有个性的模板,能够帮助你更好地展示个人信息。要适度地进行个性化调整,以突出你的独特之处。 注意!不要完全套用模板哦~需要构建自己的简历逻辑,将你的职业优势关键信息放置在显眼位置,并按照你自己的思路排布简历,不要简单地把自己的信息直接安到某个模板里。排列逻辑可以是时间轴倒叙,最近的工作、实习放在最前面,依次往后排,方便雇主尽快清晰的看到你现在的经历与匹配度;可以是按类别,比如按照实习、校园工作、科研经历、志愿活动这样排列;也可以是按能力排列,比如按照专业能力、综合能力这样排列。这样做,HR在浏览你的简历时,可以快速获取到你想要传达的最重要的信息。以上这些你都学会了吗?赶快按照上面的步骤和方法修改你的简历吧!如果你对优化简历仍有疑问,可以寻找万码小助手的帮助~ 祝大家在求职过程中取得成功!
“你对我们公司的行业有什么了解?”“没了解,第一次接触。” “你对我们公司有什么了解?”“没了解,是你们叫我来面试的。” “你对我们的岗位有什么了解?”“没了解,应该和我之前做的差不多吧。”日常招聘过程中,这种精准踩在面试官雷区的情况并不少见,今天就来梳理盘点,那些在面试官雷区拼命蹦跶的情形。 初级踩雷:我对贵司一无所知如前文所示,前来面试不提前了解公司情况,无疑是精准踩在面试官的雷区。有的候选人还精心打扮,在个人的形象、着装方面大做文章,固然会让人眼前一亮,但是基本知识都不提前准备的,真的会很减分。哪怕是没有提前认真准备、了解,至少招聘网站的公司介绍、公司官网、岗位JD看一眼也不至于一问三不知。 中级踩雷:我的情况如简历所示/十分钟的自我介绍大家都知道,面试的第一个问题基本都是自我介绍。自我介绍是方便双方进入面试情景的重要环节,是给候选人缓冲时间,也是给面试官缓冲时间。不是所有面试官都会提前看简历,对新晋面试官而言,需要一点时间了解人选的基本情况;也不是所有面试官都需要看简历,很多资深面试官已经自成体系,能经过前期面试的人员已经满足基本条件,后面轮次的面试官不太关注简历写的内容了。最好的自我介绍是1-3分钟,避免太短双方没有进入状态,又避免太长让面试官听的乏味。 高级踩雷:我有很多offer,但也想看看贵司机会 也许求职者想通过多offer表现自己的优秀,通过放弃offer表现自己的加入意愿,但是这种行为却成功踩在面试官的雷区,与工作机会失之交臂。用人企业可能会对候选人心存顾虑:”他还在职,拿了十几个offer,每个offer面试三轮,是不是上班时间去面试了?还是打着出差的名义去见下家?“”他拿了那么多offer,还没定下来,对自己的认知和定位,是否有问题?一个关键岗位的人选连自己的定位都摸不准,把业务交给他不放心。“”与其把机会给一个不一定会来的人选,不如给确定性强的更合适。“ 究极踩雷:我和XX很熟,他的业绩还不如我有一些候选人,满嘴爬火车,张口就来。这也有几种情况:第一种是刚好撞到了面试官枪口的。比如面试官刚好来自于候选人目前所在的公司或曾经任职的公司,问及公司的一些情况时,候选人侃侃而谈,却风马牛不相及,直接被否掉。第二种是掩耳盗铃式。简历可能有水分或者完全造假,问及当时情况时就说“涉及公司保密信息,我不能透露”,“事情过的有点久了,虽然是我主导的,但我记不大清楚了”。第三种是对面试官的背调能力毫不知情,问及是否可以背调时还镇定自若,却不知道还没走出会议室就已经完成了背调,所谓的和人很熟,业绩很好,全都被调查得一览无遗。 不诚信,品德有问题的候选人,不管再怎么伪装,也只剩下淘汰的结局。 面试是个技术活,不是张张嘴聊聊天就是面试;而面试过程中,也确实会遇到很多候选人踩雷的行为。这些行为的之所以会成为雷区,折射的是面试官根据公司用人标准、评估要素进行的面试评判。希望广大候选人们,不要在面试官的雷区蹦跶。 那么面试很糟糕,就真的没机会了吗?其实不然,敢于主动的人,可能为自己创造翻盘机会。求职时想让自己脱颖而出的一个关键要素,就是主动。给大家分享几个案例:方法一:直接拦人360老板在乌镇的时候,被几位来自河北师范大学的学生拦住塞简历,学生们是信息安全相关专业的,很明显是早有预谋。周老板平时少见非985背景的毕业生简历吧,这非常规路径非常符合互联网公司的精神,更符合CEO的个性。引得周老板当天就在微博上发表了感言。这种专业(能力)针对性强、路径简单粗暴的方式通常有效。方法二:自我广告一位毕业于湘潭大学的湖南小伙今年春节在广州地铁出口处的广告栏投简历,展示了他所获得的一些奖项,右下角附上了他的微信二维码,左边放上了一张被挡住脸的照片。据说这一广告5天1000元,有30多家公司联络了他。 方法三:毛遂自荐在传统媒体多年的王记者,眼看着杂志社要关了,拿了遣散费的他微信了曾经采访过一次的企业老板,自荐自己有人脉,可以介绍客户,想来公司谋个的职位。王记者成为王经理后,果然凭借之前采访累积的人脉资源,在跨行业打下了一片天地,成为公司里的业务冠军,年薪百万,老板还直夸自己“英明决策”。正是他们的积极主动,让他们获得了那些看似不可能的机会。除了求职时主动出击,我们在面试后这么做也能带来事半功倍的效果: 如果没有主动去接触部门领导,就不会知道被拒绝的原因是什么,也就没机会提出解决方案,打消对方的顾虑。在面试官结束发问后,他通常会问求职者“你还有什么想问我的吗?”,这是个主动了解面试情况的好机会。我们可以向面试官请教自己在面试中有哪些不足,刚刚面试中的哪个问题还不太清楚等等。面对你真诚的态度,一般面试官都不会拒绝跟你交流一些想法。这样不仅能够帮助我们更好的评估自己的面试表现,在下次面试中有针对性的进行改善;同时也给了我们再次争取的机会,解释误解、消除顾虑,说不定就能扭转乾坤拿到offer呢。除此之外,如果到了约定的结果通知日还没消息,一定要主动询问,说不定只是HR在走流程,或是忘了通知你面试通过,就算没被录用,知道结果也能帮助我们更好的为下一次面试做准备。 复盘的概念,源自中国围棋,指的是双方棋手在每次博弈结束后,重新在棋盘上把刚才的对局再重复一遍,看看哪些地方下的好,哪些地方下的不好,是否还有别的走法,不同的走法对棋局有什么样的影响。运用在我们的面试中,就是通过还原整个面试场景,仔细分析每一环节,比如我们可以从面试目标、准备工作、对岗位/公司/行业的了解、面试沟通表达情况、简历这几个方面进行逐个复盘。重点关注面试官问了你哪些问题,哪些问题你回答的不好,找出影响结果的因素,进而确定出下一步的改进方向。对于那些表现出色的地方,总结规律和技巧,不断地将其运用在以后的面试中,沉淀经验,提高效率,提升自己在面试中的表现。 《高效能人士的7个习惯》里第一个就是积极主动,主动去争取自己想要的结果,哪怕主动碰壁,反弹回来的也会是一个全新的你。
一、配置远程 Maven 仓库在 Android Studio 工程 根目录的 build.gradle 构建脚本中 , 配置repositories { mavenCentral() }完整代码如下 :// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext.kotlin_version = "1.5.0" repositories { google() mavenCentral() } dependencies { classpath "com.android.tools.build:gradle:4.2.1" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { google() mavenCentral() jcenter() // Warning: this repository is going to shut down soon } } task clean(type: Delete) { delete rootProject.buildDir }二、配置依赖在 Module 下的 build.gradle 构建脚本中配置依赖库 :dependencies { implementation 'com.arthenica:mobile-ffmpeg-full:4.4' }完整代码如下 :plugins { id 'com.android.application' id 'kotlin-android' } android { compileSdkVersion 31 buildToolsVersion "30.0.3" defaultConfig { applicationId "kim.hsl.mobileffmpegdemo" minSdkVersion 24 targetSdkVersion 31 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } } dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation 'androidx.core:core-ktx:1.6.0' implementation 'androidx.appcompat:appcompat:1.4.1' implementation 'com.google.android.material:material:1.5.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.3' testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' implementation 'com.arthenica:mobile-ffmpeg-full:4.4' }三、Kotlin 中执行 FFmpeg 命令在 kotlin 代码中调用 mobile-ffmpeg 框架中提供的 执行 FFmpeg 命令的方法 :执行的 FFmpeg 命令为 :ffmpeg -version完整代码如下 :package kim.hsl.mobileffmpegdemo import android.os.Bundle import android.util.Log import androidx.appcompat.app.AppCompatActivity import com.arthenica.mobileffmpeg.Config import com.arthenica.mobileffmpeg.FFmpeg class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val rc = FFmpeg.execute("-version") if (rc == Config.RETURN_CODE_SUCCESS) { Log.i(Config.TAG, "命令执行成功") } else if (rc == Config.RETURN_CODE_CANCEL) { Log.i(Config.TAG, "用户取消了命令") } else { Log.i(Config.TAG, String.format("命令执行失败, 返回值=%d", rc)) } Config.printLastCommandOutput(Log.INFO) } }四、FFmpeg 命令执行结果查看执行结果如下 : 在 华为 Mate30 中 , 对应 Android 10 系统版本也可以执行 ;ffmpeg version v4.4-dev-416 Copyright (c) 2000-2020 the FFmpeg developers built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn) configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec libavutil 56. 55.100 / 56. 55.100 libavcodec 58. 96.100 / 58. 96.100 libavformat 58. 48.100 / 58. 48.100 libavdevice 58. 11.101 / 58. 11.101 libavfilter 7. 87.100 / 7. 87.100 libswscale 5. 8.100 / 5. 8.100 libswresample 3. 8.100 / 3. 8.100五、源码下载源码下载地址 : https://download.csdn.net/download/han1202012/85034217
一、mobile-ffmpeg 开源项目mobile-ffmpeg 源码主页 : https://github.com/tanersener/mobile-ffmpeg之前使用 FFmpegAndroid 框架 , 地址为 https://github.com/WritingMinds/ffmpeg-android-java , 该框架的原理是在 放置一个编译好的 ffmpeg 可执行文件到 assets 目录中 , 运行时将其拷贝到应用的内置存储空间 , 也就是 " /data/user/0/cn.e/ffmpeg " 路径 ;参考 【Android FFMPEG 开发】Android 中执行 FFMPEG 指令 ( 集成 FFmpegAndroid 框架 ) 博客 ;但是上述框架有个问题 , 就是在 Android 10 系统不再支持可执行程序的运行 , 参考 【错误记录】Android 可执行权限报错 ( Cannot run program “/data/user/0/cn.e/ffmpeg“: error=13,Permission denied ) 博客 , 一旦在应用中执行可执行程序 , 就会报如下错误 ;2021-11-11 15:23:49.288 15975-16036/cn.example E/FFmpeg: Exception while trying to run: [Ljava.lang.String;@b54f6fa java.io.IOException: Cannot run program "/data/user/0/cn.example/files/ffmpeg": error=13, Permission denied at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050)这里使用新的 FFmpeg 框架 , mobile-ffmpeg , 该框架执行 FFmpeg 命令的原理是直接集成了函数库 , 使用 jni 调用 ffmpeg.c 中的 main 函数源码 , 没有执行可执行程序 ;可以在 Android 10 及以上的系统中执行 ;不过看该项目主页 https://github.com/tanersener/mobile-ffmpeg 介绍 , 该项目不再维护 , 推荐使用 https://github.com/tanersener/ffmpeg-kit 项目 ;ffmpeg-kit 开源框架支持 Android / iOS / macOS / Flutter / React Native 等平台 , 这个之后再开博客研究 ;二、集成 mobile-ffmpeg 框架在 Android Studio 工程根目录的 build.gradle 构建脚本中 , 配置repositories { mavenCentral() }在 Module 下的 build.gradle 脚本中 , 配置dependencies { implementation 'com.arthenica:mobile-ffmpeg-full:4.4' }依赖 ;Java 代码 :import com.arthenica.mobileffmpeg.Config; import com.arthenica.mobileffmpeg.FFmpeg; int rc = FFmpeg.execute("-version"); if (rc == Config.RETURN_CODE_SUCCESS) { Log.i(Config.TAG, "命令执行成功"); } else if (rc == Config.RETURN_CODE_CANCEL) { Log.i(Config.TAG, "用户取消了命令"); } else { Log.i(Config.TAG, String.format("命令执行失败, 返回值=%d", rc)); } // 打印命令行输出 Config.printLastCommandOutput(Log.INFO);Kotlin 代码 :import com.arthenica.mobileffmpeg.Config import com.arthenica.mobileffmpeg.FFmpeg val rc = FFmpeg.execute("-version") if (rc == Config.RETURN_CODE_SUCCESS) { Log.i(Config.TAG, "命令执行成功") } else if (rc == Config.RETURN_CODE_CANCEL) { Log.i(Config.TAG, "用户取消了命令") } else { Log.i(Config.TAG, String.format("命令执行失败, 返回值=%d", rc)) } // 打印命令行输出 Config.printLastCommandOutput(Log.INFO)经过测试 , 在 Android 10 的 华为 Mate 30 手机中 , 测试正常 , 可以成功打印出 ffmpeg -version 命令输出结果 ;
一、查看具体的 ffmpeg 命令分类所支持的参数查看具体的 ffmpeg 命令分类所支持的参数语法如下 :ffmpeg -h 参数类型=参数名称参数类型 指的是下面的参数去掉 s 之后的字符串 , 如 " 显示可用的复用器 " 对应的 参数类型 是 muxer ;-formats show available formats // 显示可用格式 , 其等价于 muxers + demuxers 组合 -muxers show available muxers // 显示可用的复用器 -demuxers show available demuxers // 显示可用的解复用器 -devices show available devices // 显示可用设备 -codecs show available codecs // 显示可用的编解码器 , 其等价于 encoders + decoders 组合 -decoders show available decoders // 显示可用的解码器 -encoders show available encoders // 显示可用的编码器 -bsfs show available bit stream filters // 显示可用的比特流 filters 过滤器 -protocols show available protocols // 显示可用协议 , 如 rtmp , rtsp 等 ; -filters show available filters // 显示可用的过滤器 , 可用于 : 改变播放速度 , 加水印 , 加 Logo -pix_fmts show available pixel formats // 显示可用的像素格式 -layouts show standard channel layouts // 显示标准声道名称 -sample_fmts show available audio sample formats // 显示可用的音频采样格式 -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 // 显示可用的硬件加速方法 二、查询 " 复用器 " 类型 设置 flv 视频格式时 所支持的参数查询 " 复用器 " 类型 设置 flv 视频格式时 所支持的参数 的 命令 : 如果在命令中使用了 flv 视频 , 其解复用器可以设置的参数类型 ;ffmpeg -h muxer=flv执行过程 : 打印出的 flv 视频格式支持的解复用器 ;命令行输出 :D:\ffmpeg>ffmpeg -h muxer=flv ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Muxer flv [FLV (Flash Video)]: Common extensions: flv. Mime type: video/x-flv. Default video codec: flv1. Default audio codec: mp3. flv muxer AVOptions: -flvflags <flags> E.......... FLV muxer flags (default 0) aac_seq_header_detect E.......... Put AAC sequence header based on stream data no_sequence_end E.......... disable sequence end for FLV no_metadata E.......... disable metadata for FLV no_duration_filesize E.......... disable duration and filesize zero value metadata for FLV add_keyframe_index E.......... Add keyframe index metadata D:\ffmpeg>三、查询 " 过滤器 " 类型设置 atempo 时所支持的参数查询 " 过滤器 " 类型设置 atempo 时所支持的参数 的 命令 : 如果在命令中使用了 修改视频速率的 过滤器 , 可以设置的参数类型 ;ffmpeg -h filter=atempo执行过程 : 打印出设置 atempo 过滤器时可以设置的参数 ;命令行输出 :D:\ffmpeg>ffmpeg -h filter=atempo ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Filter atempo Adjust audio tempo. Inputs: #0: default (audio) Outputs: #0: default (audio) atempo AVOptions: tempo <double> ..F.A....T. set tempo scale factor (from 0.5 to 100) (default 1) D:\ffmpeg>查询结果 : 可设置 tempo 参数 , 配速取值范围从 0.5 0.50.5 ~ 100 100100 , 默认为 1 11 ;atempo AVOptions: tempo <double> ..F.A....T. set tempo scale factor (from 0.5 to 100) (default 1)四、查询 " 编码器 " 类型设置 libx264 时所支持的参数查询 " 编码器 " 类型设置 libx264 时所支持的参数 的 命令 : 如果在命令中使用了 libx264 编码器 , 可以设置的参数类型 ;ffmpeg -h encoder=libx264执行过程 : 打印出设置 atempo 过滤器时可以设置的参数 ;命令行输出 :D:\ffmpeg>ffmpeg -h encoder=libx264 ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Encoder libx264 [libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10]: General capabilities: delay threads Threading capabilities: other Supported pixel formats: yuv420p yuvj420p yuv422p yuvj422p yuv444p yuvj444p nv12 nv16 nv21 yuv420p10le yuv422p10le yuv444p10le nv20le gray gray10le libx264 AVOptions: -preset <string> E..V....... Set the encoding preset (cf. x264 --fullhelp) (default "medium") -tune <string> E..V....... Tune the encoding params (cf. x264 --fullhelp) -profile <string> E..V....... Set profile restrictions (cf. x264 --fullhelp) -fastfirstpass <boolean> E..V....... Use fast settings when encoding first pass (default true) -level <string> E..V....... Specify level (as defined by Annex A) -passlogfile <string> E..V....... Filename for 2 pass stats -wpredp <string> E..V....... Weighted prediction for P-frames -a53cc <boolean> E..V....... Use A53 Closed Captions (if available) (default true) -x264opts <string> E..V....... x264 options -crf <float> E..V....... Select the quality for constant quality mode (from -1 to FLT_MAX) (default -1) -crf_max <float> E..V....... In CRF mode, prevents VBV from lowering quality beyond this point. (from -1 to FLT_MAX) (default -1) -qp <int> E..V....... Constant quantization parameter rate control method (from -1 to INT_MAX) (default -1) -aq-mode <int> E..V....... AQ method (from -1 to INT_MAX) (default -1) none 0 E..V....... variance 1 E..V....... Variance AQ (complexity mask) autovariance 2 E..V....... Auto-variance AQ autovariance-biased 3 E..V....... Auto-variance AQ with bias to dark scenes -aq-strength <float> E..V....... AQ strength. Reduces blocking and blurring in flat and textured areas. (from -1 to FLT_MAX) (default -1) -psy <boolean> E..V....... Use psychovisual optimizations. (default auto) -psy-rd <string> E..V....... Strength of psychovisual optimization, in <psy-rd>:<psy-trellis> format. -rc-lookahead <int> E..V....... Number of frames to look ahead for frametype and ratecontrol (from -1 to INT_MAX) (default -1) -weightb <boolean> E..V....... Weighted prediction for B-frames. (default auto) -weightp <int> E..V....... Weighted prediction analysis method. (from -1 to INT_MAX) (default -1) none 0 E..V....... simple 1 E..V....... smart 2 E..V....... -ssim <boolean> E..V....... Calculate and print SSIM stats. (default auto) -intra-refresh <boolean> E..V....... Use Periodic Intra Refresh instead of IDR frames. (default auto) -bluray-compat <boolean> E..V....... Bluray compatibility workarounds. (default auto) -b-bias <int> E..V....... Influences how often B-frames are used (from INT_MIN to INT_MAX) (default INT_MIN) -b-pyramid <int> E..V....... Keep some B-frames as references. (from -1 to INT_MAX) (default -1) none 0 E..V....... strict 1 E..V....... Strictly hierarchical pyramid normal 2 E..V....... Non-strict (not Blu-ray compatible) -mixed-refs <boolean> E..V....... One reference per partition, as opposed to one reference per macroblock (default auto) -8x8dct <boolean> E..V....... High profile 8x8 transform. (default auto) -fast-pskip <boolean> E..V....... (default auto) -aud <boolean> E..V....... Use access unit delimiters. (default auto) -mbtree <boolean> E..V....... Use macroblock tree ratecontrol. (default auto) -deblock <string> E..V....... Loop filter parameters, in <alpha:beta> form. -cplxblur <float> E..V....... Reduce fluctuations in QP (before curve compression) (from -1 to FLT_MAX) (default -1) -partitions <string> E..V....... A comma-separated list of partitions to consider. Possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all -direct-pred <int> E..V....... Direct MV prediction mode (from -1 to INT_MAX) (default -1) none 0 E..V....... spatial 1 E..V....... temporal 2 E..V....... auto 3 E..V....... -slice-max-size <int> E..V....... Limit the size of each slice in bytes (from -1 to INT_MAX) (default -1) -stats <string> E..V....... Filename for 2 pass stats -nal-hrd <int> E..V....... Signal HRD information (requires vbv-bufsize; cbr not allowed in .mp4) (from -1 to INT_MAX) (default -1) none 0 E..V....... vbr 1 E..V....... cbr 2 E..V....... -avcintra-class <int> E..V....... AVC-Intra class 50/100/200 (from -1 to 200) (default -1) -me_method <int> E..V....... Set motion estimation method (from -1 to 4) (default -1) dia 0 E..V....... hex 1 E..V....... umh 2 E..V....... esa 3 E..V....... tesa 4 E..V....... -motion-est <int> E..V....... Set motion estimation method (from -1 to 4) (default -1) dia 0 E..V....... hex 1 E..V....... umh 2 E..V....... esa 3 E..V....... tesa 4 E..V....... -forced-idr <boolean> E..V....... If forcing keyframes, force them as IDR frames. (default false) -coder <int> E..V....... Coder type (from -1 to 1) (default default) default -1 E..V....... cavlc 0 E..V....... cabac 1 E..V....... vlc 0 E..V....... ac 1 E..V....... -b_strategy <int> E..V....... Strategy to choose between I/P/B-frames (from -1 to 2) (default -1) -chromaoffset <int> E..V....... QP difference between chroma and luma (from INT_MIN to INT_MAX) (default 0) -sc_threshold <int> E..V....... Scene change threshold (from INT_MIN to INT_MAX) (default -1) -noise_reduction <int> E..V....... Noise reduction (from INT_MIN to INT_MAX) (default -1) -x264-params <dictionary> E..V....... Override the x264 configuration using a :-separated list of key=value parameters D:\ffmpeg>五、查询命令设置项以及具体参数想要对一个视频进行编码操作 , 查询编码器 , 如只知道 264 , 不知道具体的编码器名称 , 先使用如下名称 , 查询到具体的编码器名称 ;ffmpeg -encoders | findstr 264查询结果是 V..... libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264) , 编码器的名称是 libx264 ;D:\ffmpeg>ffmpeg -encoders | findstr 264 ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 V..... libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264) V..... libx264rgb libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264) V....D h264_amf AMD AMF H.264 Encoder (codec h264) V....D h264_mf H264 via MediaFoundation (codec h264) V....D h264_nvenc NVIDIA NVENC H.264 encoder (codec h264) V..... h264_qsv H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264) V..... nvenc NVIDIA NVENC H.264 encoder (codec h264) V..... nvenc_h264 NVIDIA NVENC H.264 encoder (codec h264) D:\ffmpeg>然后查询如果编码器设置为 libx264 都需要设置哪些参数 ;使用ffmpeg -h encoder=libx264命令即可查询 libx264 编码器的详细参数设置 ;
一、ffmpeg 命令帮助文档查询 ffmpeg 基本信息 :ffmpeg -h 查询 ffmpeg 高级信息 :ffmpeg -h long查询 ffmpeg 所有信息 :ffmpeg -h full 三种帮助信息的关系 : 所有信息 包含 高级信息 , 高级信息 包含 基本信息 ;1、FFmpeg 命令帮助基本信息将 ffmpeg 基本信息输出到文件中 : 将信息输出到文件中 , 使用 > 符号 , 后面跟上文件名称 , 就会将信息输出到该文件名对应的目录中 ;ffmpeg -h > ffmpeg_h.txt在 " D:\ffmpeg " 目录下执行 上述命令 , 在该目录下生成了 ffmpeg_h.txt 文件 ;ffmpeg_h.txt 文件中的输出内容如下 :Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... Getting help: -h -- print basic options -h long -- print more options -h full -- print all options (including all format and codec specific options, very long) -h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter/bsf/protocol See man ffmpeg for detailed description of the options. 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 -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. -bits_per_raw_sample number set the number of bits per raw sample -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) -bits_per_raw_sample number set the number of bits per raw sample -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 preset2、FFmpeg 命令帮助高级信息将 FFmpeg 高级帮助信息导出到 ffmpeg_h_long.txt 文件中 ;ffmpeg -h long > ffmpeg_h_long.txt输出内容展示 :Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... Getting help: -h -- print basic options -h long -- print more options -h full -- print all options (including all format and codec specific options, very long) -h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter/bsf/protocol See man ffmpeg for detailed description of the options. 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 -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. -bits_per_raw_sample number set the number of bits per raw sample -vol volume change audio volume (256=normal) Advanced global options: -cpuflags flags force specific cpu flags -hide_banner hide_banner do not show program banner -copy_unknown Copy unknown stream types -benchmark add timings for benchmarking -benchmark_all add timings for each task -progress url write program-readable progress information -stdin enable or disable interaction on standard input -timelimit limit set max runtime in seconds in CPU user time -dump dump each input packet -hex when dumping packets, also dump the payload -vsync video sync method -frame_drop_threshold frame drop threshold -async audio sync method -adrift_threshold threshold audio drift threshold -copyts copy timestamps -start_at_zero shift input timestamps to start at 0 when using copyts -copytb mode copy input stream time base when stream copying -dts_delta_threshold threshold timestamp discontinuity delta threshold -dts_error_threshold threshold timestamp error delta threshold -xerror error exit on error -abort_on flags abort on the specified condition flags -filter_complex graph_description create a complex filtergraph -lavfi graph_description create a complex filtergraph -filter_complex_script filename read complex filtergraph description from a file -auto_conversion_filters enable automatic conversion filters globally -stats_period time set the period at which ffmpeg updates stats and -progress output -debug_ts print timestamp debugging info -intra deprecated use -g 1 -sameq Removed -same_quant Removed -deinterlace this option is deprecated, use the yadif filter instead -psnr calculate PSNR of compressed frames -vstats dump video coding statistics to file -vstats_file file dump video coding statistics to file -vstats_version Version of the vstats format to use. -qphist show QP histogram -vc channel deprecated, use -channel -tvstd standard deprecated, use -standard -isync this option is deprecated and does nothing -sdp_file file specify a file in which to print sdp information -qsv_device device set QSV hardware device (DirectX adapter index, DRM path or X11 display name) -init_hw_device args initialise hardware device -filter_hw_device device set hardware device used when filtering 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 Advanced per-file options: -map [-]input_file_id[:stream_specifier][,sync_file_id[:stream_specifier]] set input stream mapping -map_channel file.stream.channel[:syncfile.syncstream] map an audio channel from one stream to another -map_chapters input_file_index set chapters mapping -accurate_seek enable/disable accurate seeking with -ss -itsoffset time_off set the input ts offset -itsscale scale set the input ts scale -dframes number set the number of data frames to output -re read input at native frame rate -shortest finish encoding within shortest input -bitexact bitexact mode -copyinkf copy initial non-keyframes -copypriorss copy or discard frames before start time -tag fourcc/tag force codec tag/fourcc -q q use fixed quality scale (VBR) -qscale q use fixed quality scale (VBR) -profile profile set profile -attach filename add an attachment to the output file -dump_attachment filename extract an attachment into a file -stream_loop loop count set number of times input stream shall be looped -thread_queue_size set the maximum number of queued packets from the demuxer -find_stream_info read and decode the streams to fill missing information with heuristics -autorotate automatically insert correct rotate filters -autoscale automatically insert a scale filter at the end of the filter graph -muxdelay seconds set the maximum demux-decode delay -muxpreload seconds set the initial demux-decode delay -time_base ratio set the desired time base hint for output stream (1:24, 1:48000 or 0.04166, 2.0833e-5) -enc_time_base ratio set the desired time base for the encoder (1:24, 1:48000 or 0.04166, 2.0833e-5). two special values are defined - 0 = use frame rate (video) or sample rate (audio),-1 = match source time base -bsf bitstream_filters A comma-separated list of bitstream filters -fpre filename set options from indicated preset file -max_muxing_queue_size packets maximum number of packets that can be buffered while waiting for all streams to initialize -muxing_queue_data_threshold bytes set the threshold after which max_muxing_queue_size is taken into account -dcodec codec force data codec ('copy' to copy stream) 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) -bits_per_raw_sample number set the number of bits per raw sample -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 Advanced Video options: -pix_fmt format set pixel format -intra deprecated use -g 1 -rc_override override rate control override for specific intervals -sameq Removed -same_quant Removed -passlogfile prefix select two pass log file name prefix -deinterlace this option is deprecated, use the yadif filter instead -psnr calculate PSNR of compressed frames -vstats dump video coding statistics to file -vstats_file file dump video coding statistics to file -vstats_version Version of the vstats format to use. -intra_matrix matrix specify intra matrix coeffs -inter_matrix matrix specify inter matrix coeffs -chroma_intra_matrix matrix specify intra matrix coeffs -top top=1/bottom=0/auto=-1 field first -vtag fourcc/tag force video tag/fourcc -qphist show QP histogram -force_fps force the selected framerate, disable the best supported framerate selection -streamid streamIndex:value set the value of an outfile streamid -force_key_frames timestamps force key frames at specified timestamps -hwaccel hwaccel name use HW accelerated decoding -hwaccel_device devicename select a device for HW acceleration -hwaccel_output_format format select output format used with HW accelerated decoding -vc channel deprecated, use -channel -tvstd standard deprecated, use -standard -vbsf video bitstream_filters deprecated -vpre preset set the video options to the indicated preset 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 Advanced Audio options: -atag fourcc/tag force audio tag/fourcc -sample_fmt format set sample format -channel_layout layout set channel layout -guess_layout_max set the maximum number of channels to try to guess the channel layout -absf audio bitstream_filters deprecated -apre preset set the audio options to the indicated preset 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 3、FFmpeg 命令帮助完整信息执行如下命令 , 将完整帮助信息导出到 ffmpeg_h_full.txt 文件中 , 这个帮助文档有 1001 10011001 KB , 放到博客资源中了 ;ffmpeg -h full > ffmpeg_h_full.txt二、ffplay 命令帮助文档使用如下命令 , 查看 ffplay 命令的帮助文档 ;ffplay -h将帮助文档输出到文件中 :ffplay -h > ffplay_h.txt三、ffprobe 命令帮助文档使用如下命令 , 查看 ffprobe 命令的帮助文档 ;ffprobe -h将帮助文档输出到文件中 :ffprobe -h > ffprobe_h.txt四、帮助命令查找技巧ffmpeg , ffplay , ffprobe 命令部分参数是通用的 , 但是有些不通用 ;命令搜索技巧 : 查找 " 264 " 字符串相关的命令 ;ffmpeg -h full | findstr 264
一、FFmpeg 帮助信息在 【FFmpeg】FFmpeg 帮助文档使用 博客中使用ffmpeg -h命令 , 可以在命令行输出 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 + demuxers 组合 -muxers show available muxers // 显示可用的复用器 -demuxers show available demuxers // 显示可用的解复用器 -devices show available devices // 显示可用设备 -codecs show available codecs // 显示可用的编解码器 , 其等价于 encoders + decoders 组合 -decoders show available decoders // 显示可用的解码器 -encoders show available encoders // 显示可用的编码器 -bsfs show available bit stream filters // 显示可用的比特流 filters 过滤器 -protocols show available protocols // 显示可用协议 , 如 rtmp , rtsp 等 ; -filters show available filters // 显示可用的过滤器 , 可用于 : 改变播放速度 , 加水印 , 加 Logo -pix_fmts show available pixel formats // 显示可用的像素格式 -layouts show standard channel layouts // 显示标准声道名称 -sample_fmts show available audio sample formats // 显示可用的音频采样格式 -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 // 显示可用的硬件加速方法 二、显示版本信息 -version帮助文档对应内容 :-version show version // 显示版本 显示版本信息命令 :ffmpeg -version执行过程 : 打印出的版本号是 ffmpeg version n4.4-19-g8d172d9409 ;命令行输出 :D:\ffmpeg>ffmpeg -version ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100三、ffmpeg 命令输出的固定信息关于 ffmpeg 不管执行什么命令 , 都会打印出当前的以下信息 :版本号信息 ffmpeg version n4.4-19-g8d172d9409版权信息 Copyright编译器信息 built with gcc 10-win32 (GCC) 20210408编译配置信息 configuration:各个库的版本信息如下libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100四、显示编译配置信息 -buildconf帮助文档对应内容 :-buildconf show build configuration // 显示编译配置显示编译配置信息命令 : FFmpeg 进行编译时 , 先配置 configure 文件 , 然后根据 configure 配置生成 Makefile 文件 , 再执行编译操作 ;ffmpeg -buildconf执行过程 : 打印出的编译时的 configure 配置信息 ;命令行输出 :D:\ffmpeg>ffmpeg -buildconf ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp D:\ffmpeg>上述的 configuration: 后面的一行配置 与 ffmpeg -buildconf 打印出来的内容是一样的 ,各个模块都编译成动态库 , 不支持静态库 ; --enable-shared --disable-static支持 sdl2 , 这是做播放显示用的 ; --enable-sdl2支持 H.264 , H.265 编码 : --enable-libx264 --enable-libx265五、显示可用格式 -formats1、基础命令帮助文档对应内容 :-formats show available formats // 显示可用格式 , 其等价于 muxers + demuxers 组合 显示可用格式命令 :ffmpeg -formats执行过程 :命令行输出 :D:\ffmpeg>ffmpeg -formats ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 File formats: D. = Demuxing supported .E = Muxing supported -- D 3dostr 3DO STR E 3g2 3GP2 (3GPP2 file format) E 3gp 3GP (3GPP file format) D 4xm 4X Technologies E a64 a64 - video for Commodore 64 D aa Audible AA format files D aac raw ADTS AAC (Advanced Audio Coding) D aax CRI AAX DE ac3 raw AC-3 D ace tri-Ace Audio Container D acm Interplay ACM D act ACT Voice file format D adf Artworx Data Format D adp ADP D ads Sony PS2 ADS E adts ADTS AAC (Advanced Audio Coding) DE adx CRI ADX D aea MD STUDIO audio D afc AFC DE aiff Audio IFF D aix CRI AIX DE alaw PCM A-law D alias_pix Alias/Wavefront PIX image DE alp LEGO Racers ALP DE amr 3GPP AMR D amrnb raw AMR-NB D amrwb raw AMR-WB E amv AMV D anm Deluxe Paint Animation D apc CRYO APC D ape Monkey's Audio DE apm Ubisoft Rayman 2 APM ... 打印的内容太多 , 省略部分 ... D:\ffmpeg>名称中带 D 说明支持解复用 , 名称中带 E 说明支持复用 ; D. = Demuxing supported .E = Muxing supported只支持解复用的格式 : 前面带 D ;D 3dostr 3DO STR支持复用的格式 : 前面带 E ;E 3g2 3GP2 (3GPP2 file format)支持复用与解复用的格式 : 前面带 DE ;DE ac3 raw AC-32、查询指定格式信息如果要查询 flv 格式相关的 复用 / 解复用 信息 , 使用如下命令 :ffmpeg -formats | findstr flv执行过程 :命令行输出 :D:\ffmpeg>ffmpeg -formats | findstr flv ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 DE flv FLV (Flash Video) D live_flv live RTMP FLV (Flash Video) D:\ffmpeg>flv 格式的文件可以支持复用和解复用 ;DE flv FLV (Flash Video)rtmp 协议的 flv 直播流 只支持解复用 , 不支持复用 ;D live_flv live RTMP FLV (Flash Video)六、显示可用复用器 -muxers1、基础命令帮助文档对应内容 :-muxers show available muxers // 显示可用的复用器显示可用复用器命令 :ffmpeg -muxers执行过程 :命令行输出 : 在命令行中输出的都是支持复用器的格式 , 左侧都是 E , 没有 D ;D:\ffmpeg>ffmpeg -muxers ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 File formats: D. = Demuxing supported .E = Muxing supported -- E 3g2 3GP2 (3GPP2 file format) E 3gp 3GP (3GPP file format) E a64 a64 - video for Commodore 64 E ac3 raw AC-3 E adts ADTS AAC (Advanced Audio Coding) E adx CRI ADX E aiff Audio IFF E alaw PCM A-law E alp LEGO Racers ALP E amr 3GPP AMR E amv AMV E apm Ubisoft Rayman 2 APM E apng Animated Portable Network Graphics E aptx raw aptX (Audio Processing Technology for Bluetooth) E aptx_hd raw aptX HD (Audio Processing Technology for Bluetooth) E argo_asf Argonaut Games ASF E asf ASF (Advanced / Active Streaming Format) E asf_stream ASF (Advanced / Active Streaming Format) E ass SSA (SubStation Alpha) subtitle E ast AST (Audio Stream) E au Sun AU E avi AVI (Audio Video Interleaved) E avm2 SWF (ShockWave Flash) (AVM2) E avs2 raw AVS2-P2/IEEE1857.4 video E bit G.729 BIT file format E caf Apple CAF (Core Audio Format) E cavsvideo raw Chinese AVS (Audio Video Standard) video E codec2 codec2 .c2 muxer E codec2raw raw codec2 muxer E crc CRC testing E dash DASH Muxer E data raw data E daud D-Cinema audio E dirac raw Dirac E dnxhd raw DNxHD (SMPTE VC-3) E dts raw DTS2、查询指定格式信息查找 flv 格式相关信息 : 只打印出了 E flv FLV (Flash Video) 选项 ;ffmpeg -muxers | findstr flvD:\ffmpeg>ffmpeg -muxers | findstr flv ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 E flv FLV (Flash Video) D:\ffmpeg>七、显示可用解复用器 -demuxers1、基础命令帮助文档对应内容 :-demuxers show available demuxers // 显示可用的解复用器显示可用解复用器命令 :ffmpeg -demuxers执行过程 :命令行输出 : 在命令行中输出的都是支持解复用器的格式 , 左侧都是 D , 没有 E ;D:\ffmpeg>ffmpeg -demuxers ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 File formats: D. = Demuxing supported .E = Muxing supported -- D 3dostr 3DO STR D 4xm 4X Technologies D aa Audible AA format files D aac raw ADTS AAC (Advanced Audio Coding) D aax CRI AAX D ac3 raw AC-3 D ace tri-Ace Audio Container D acm Interplay ACM D act ACT Voice file format D adf Artworx Data Format D adp ADP D ads Sony PS2 ADS D adx CRI ADX D aea MD STUDIO audio D afc AFC D aiff Audio IFF D aix CRI AIX D alaw PCM A-law D alias_pix Alias/Wavefront PIX image D alp LEGO Racers ALP D amr 3GPP AMR D amrnb raw AMR-NB D amrwb raw AMR-WB D anm Deluxe Paint Animation D apc CRYO APC D ape Monkey's Audio D apm Ubisoft Rayman 2 APM D apng Animated Portable Network Graphics D aptx raw aptX D aptx_hd raw aptX HD D aqtitle AQTitle subtitles D argo_asf Argonaut Games ASF D argo_brp Argonaut Games BRP D asf ASF (Advanced / Active Streaming Format) D asf_o ASF (Advanced / Active Streaming Format) D ass SSA (SubStation Alpha) subtitle2、查询指定格式信息查找 flv 格式解复用器 :ffmpeg -demuxers | findstr flvD:\ffmpeg>ffmpeg -demuxers | findstr flv ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 D flv FLV (Flash Video) D live_flv live RTMP FLV (Flash Video) D:\ffmpeg>八、显示可用设备 -devices帮助文档对应内容 :-devices show available devices // 显示可用设备显示可用设备命令 :ffmpeg -devices执行过程 :命令行输出 :D:\ffmpeg>ffmpeg -devices ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Devices: D. = Demuxing supported .E = Muxing supported -- D dshow DirectShow capture D gdigrab GDI API Windows frame grabber D lavfi Libavfilter virtual input device E sdl,sdl2 SDL2 output device D vfwcap VfW video capture D:\ffmpeg>输入与输出标志 : D 开头的是输入设备 , 支持解复用 ; E 开头的是输出设备 , 支持复用 ; D. = Demuxing supported .E = Muxing supported设备介绍 :设备 D dshow DirectShow capture 指的是录制相关 , 摄像头录制 , 麦克风录制等 ;设备 D lavfi Libavfilter virtual input device 是虚拟的输入设备 , 用于测试 ;设备 E sdl,sdl2 SDL2 output device 输出设备 , 播放视频时 , 使用该模块作为输出 ;设备 D vfwcap VfW video capture 摄像头采集设备 ;九、显示可用的编解码器 -codecs1、基本指令帮助文档对应内容 :-codecs show available codecs // 显示可用的编解码器 , 其等价于 encoders + decoders 组合显示可用的编解码器命令 :ffmpeg -codecs执行过程 :命令行输出 :D:\ffmpeg>ffmpeg -codecs ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Codecs: D..... = Decoding supported .E.... = Encoding supported ..V... = Video codec ..A... = Audio codec ..S... = Subtitle codec ...I.. = Intra frame-only codec ....L. = Lossy compression .....S = Lossless compression ------- D.VI.S 012v Uncompressed 4:2:2 10-bit D.V.L. 4xm 4X Movie D.VI.S 8bps QuickTime 8BPS video .EVIL. a64_multi Multicolor charset for Commodore 64 (encoders: a64multi ) .EVIL. a64_multi5 Multicolor charset for Commodore 64, extended with 5th color (colram) (encoders: a64multi5 ) D.V..S aasc Autodesk RLE D.V.L. agm Amuse Graphics Movie D.VIL. aic Apple Intermediate Codec DEVI.S alias_pix Alias/Wavefront PIX image DEVIL. amv AMV Video D.V.L. anm Deluxe Paint Animation D.V.L. ansi ASCII/ANSI art DEV..S apng APNG (Animated Portable Network Graphics) image D.V.L. arbc Gryphon's Anim Compressor D.V.L. argo Argonaut Games Video DEVIL. asv1 ASUS V1 DEVIL. asv2 ASUS V2 D.VIL. aura Auravision AURA D.VIL. aura2 Auravision Aura 2 DEV.L. av1 Alliance for Open Media AV1 (decoders: libdav1d libaom-av1 av1 av1_cuvid av1_qsv ) (encoders: libaom-av1 librav1e libsvtav1 ) D.V... avrn Avid AVI Codec DEVI.S avrp Avid 1:1 10-bit RGB Packer D.V.L. avs AVS (Audio Video Standard) video DEV.L. avs2 AVS2-P2/IEEE1857.4 (decoders: libdavs2 ) (encoders: libxavs2 ) D.V.L. avs3 AVS3-P2/IEEE1857.10 (decoders: libuavs3d ) DEVI.S avui Avid Meridien Uncompressed DEVI.S ayuv Uncompressed packed MS 4:4:4:4 D.V.L. bethsoftvid Bethesda VID video D.V.L. bfi Brute Force & Ignorance D.V.L. binkvideo Bink video D.VI.. bintext Binary text D.VI.S bitpacked Bitpacked DEVI.S bmp BMP (Windows and OS/2 bitmap) D.V..S bmv_video Discworld II BMV video D.VI.S brender_pix BRender PIX image编码器类型说明 : 下面注释中说明了编码器的支持类型 , 编码 / 解码 / 视频 / 音频 / 字幕 / 内部帧 / 有损 / 无损 ;Codecs: D..... = Decoding supported 支持解码 .E.... = Encoding supported 支持编码 ..V... = Video codec 视频编解码器 ..A... = Audio codec 音频编解码器 ..S... = Subtitle codec 字幕编解码器 ...I.. = Intra frame-only codec 内部帧编码器 , 每帧都独立编码 , 不需要参考其它帧 ; ....L. = Lossy compression 有损压缩 .....S = Lossless compression 无损压缩 2、查询 H.264 编解码器信息查询 H.264 编解码器信息 :ffmpeg -codecs | findstr 264执行过程 :命令行输出 :D:\ffmpeg>ffmpeg -codecs | findstr 264 ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_qsv h264_cuvid ) (encoders: libx264 libx264rgb h264_amf h264_mf h264_nvenc h264_qsv nvenc nvenc_h264 ) D:\ffmpeg>h264 编解码器的属性是 DEV.LSD 表示支持解码E 表示支持编码V 表示视频编码L 表示有损压缩S 表示无损压缩十、显示可用的解码器 -decoders帮助文档对应内容 :-decoders show available decoders // 显示可用的解码器显示可用的解码器命令 :ffmpeg -decoders执行过程 :命令行输出 :D:\ffmpeg>ffmpeg -decoders ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Decoders: V..... = Video A..... = Audio S..... = Subtitle .F.... = Frame-level multithreading ..S... = Slice-level multithreading ...X.. = Codec is experimental ....B. = Supports draw_horiz_band .....D = Supports direct rendering method 1 ------ V....D 012v Uncompressed 4:2:2 10-bit V....D 4xm 4X Movie V....D 8bps QuickTime 8BPS video V....D aasc Autodesk RLE V....D agm Amuse Graphics Movie VF...D aic Apple Intermediate Codec V....D alias_pix Alias/Wavefront PIX image V....D amv AMV Video V....D anm Deluxe Paint Animation V....D ansi ASCII/ANSI art VF...D apng APNG (Animated Portable Network Graphics) image V....D arbc Gryphon's Anim Compressor V....D argo Argonaut Games Video V....D asv1 ASUS V1 V....D asv2 ASUS V2 V....D aura Auravision AURA V....D aura2 Auravision Aura 2 V..... libdav1d dav1d AV1 decoder by VideoLAN (codec av1) V....D libaom-av1 libaom AV1 (codec av1) V....D av1 Alliance for Open Media AV1 V..... av1_cuvid Nvidia CUVID AV1 decoder (codec av1) V....D av1_qsv AV1 video (Intel Quick Sync Video acceleration) (codec av1) V....D avrn Avid AVI Codec V....D avrp Avid 1:1 10-bit RGB Packer V....D avs AVS (Audio Video Standard) video V..... libdavs2 libdavs2 AVS2-P2/IEEE1857.4 (codec avs2) V....D libuavs3d libuavs3d AVS3-P2/IEEE1857.10 (codec avs3) V....D avui Avid Meridien Uncompressed V....D ayuv Uncompressed packed MS 4:4:4:4 V....D bethsoftvid Bethesda VID video V....D bfi Brute Force & Ignorance V....D binkvideo Bink video V....D bintext Binary text V..X.. bitpacked Bitpacked V....D bmp BMP (Windows and OS/2 bitmap)十一、显示可用的编码器 -encoders帮助文档对应内容 :-encoders show available encoders // 显示可用的编码器显示可用的编码器命令 :ffmpeg -encoders执行过程 :命令行输出 :D:\ffmpeg>ffmpeg -encoders ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Encoders: V..... = Video A..... = Audio S..... = Subtitle .F.... = Frame-level multithreading ..S... = Slice-level multithreading ...X.. = Codec is experimental ....B. = Supports draw_horiz_band .....D = Supports direct rendering method 1 ------ V..... a64multi Multicolor charset for Commodore 64 (codec a64_multi) V..... a64multi5 Multicolor charset for Commodore 64, extended with 5th color (colram) (codec a64_multi5) V..... alias_pix Alias/Wavefront PIX image V..... amv AMV Video V..... apng APNG (Animated Portable Network Graphics) image V..... asv1 ASUS V1 V..... asv2 ASUS V2 V..... libaom-av1 libaom AV1 (codec av1) V....D librav1e librav1e AV1 (codec av1) V..... libsvtav1 SVT-AV1(Scalable Video Technology for AV1) encoder (codec av1) V..... avrp Avid 1:1 10-bit RGB Packer V..... libxavs2 libxavs2 AVS2-P2/IEEE1857.4 (codec avs2) V..X.. avui Avid Meridien Uncompressed V..... ayuv Uncompressed packed MS 4:4:4:4 V..... bmp BMP (Windows and OS/2 bitmap) VF.... cfhd GoPro CineForm HD V..... cinepak Cinepak V..... cljr Cirrus Logic AccuPak V.S... vc2 SMPTE VC-2 (codec dirac) VFS... dnxhd VC3/DNxHD V..... dpx DPX (Digital Picture Exchange) image VFS... dvvideo DV (Digital Video) VF.... exr OpenEXR image V.S... ffv1 FFmpeg video codec #1 VF.... ffvhuff Huffyuv FFmpeg variant V..... fits Flexible Image Transport System V..... flashsv Flash Screen Video V..... flashsv2 Flash Screen Video Version 2 V..... flv FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (codec flv1) V..... gif GIF (Graphics Interchange Format) V..... h261 H.261 V..... h263 H.263 / H.263-1996 V.S... h263p H.263+ / H.263-1998 / H.263 version 2 V..... libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264) V..... libx264rgb libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)十二、命令行分页显示 " | more"如果命令行中输出命令过多 , 可以进行分页显示 , 在命令后面加上 | more 可以进行分页显示 , 长按回车 , 可以显示后面的内容 ;ffmpeg -codecs | more执行过程 : 打印时会自动命令行输出 :D:\ffmpeg>ffmpeg -codecs | more ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Codecs: D..... = Decoding supported .E.... = Encoding supported ..V... = Video codec ..A... = Audio codec ..S... = Subtitle codec ...I.. = Intra frame-only codec ....L. = Lossy compression .....S = Lossless compression ------- D.VI.S 012v Uncompressed 4:2:2 10-bit D.V.L. 4xm 4X Movie D.VI.S 8bps QuickTime 8BPS video .EVIL. a64_multi Multicolor charset for Commodore 64 (encoders: a64multi ) .EVIL. a64_multi5 Multicolor charset for Commodore 64, extended with 5th color (colram) (encoders: a64multi5 ) D.V..S aasc Autodesk RLE D.V.L. agm Amuse Graphics Movie D.VIL. aic Apple Intermediate Codec DEVI.S alias_pix Alias/Wavefront PIX image DEVIL. amv AMV Video D.V.L. anm Deluxe Paint Animation D.V.L. ansi ASCII/ANSI art DEV..S apng APNG (Animated Portable Network Graphics) image D.V.L. arbc Gryphon's Anim Compressor D.V.L. argo Argonaut Games Video DEVIL. asv1 ASUS V1 DEVIL. asv2 ASUS V2 D.VIL. aura Auravision AURA D.VIL. aura2 Auravision Aura 2 DEV.L. av1 Alliance for Open Media AV1 (decoders: libdav1d libaom-av1 av1 av1_cuvid av1_qsv ) (encoders: libaom-av1 librav1e libsvtav1 ) D.V... avrn Avid AVI Codec DEVI.S avrp Avid 1:1 10-bit RGB Packer D.V.L. avs AVS (Audio Video Standard) video DEV.L. avs2 AVS2-P2/IEEE1857.4 (decoders: libdavs2 ) (encoders: libxavs2 ) D.V.L. avs3 AVS3-P2/IEEE1857.10 (decoders: libuavs3d ) DEVI.S avui Avid Meridien Uncompressed DEVI.S ayuv Uncompressed packed MS 4:4:4:4 D.V.L. bethsoftvid Bethesda VID video D.V.L. bfi Brute Force & Ignorance D.V.L. binkvideo Bink video D.VI.. bintext Binary text D.VI.S bitpacked Bitpacked DEVI.S bmp BMP (Windows and OS/2 bitmap) D.V..S bmv_video Discworld II BMV video D.VI.S brender_pix BRender PIX image D.V.L. c93 Interplay C93 D.V.L. cavs Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile) D.V.L. cdgraphics CD Graphics video D.V..S cdtoons CDToons video D.VIL. cdxl Commodore CDXL video DEV.L. cfhd GoPro CineForm HD DEV.L. cinepak Cinepak D.V.L. clearvideo Iterated Systems ClearVideo DEVIL. cljr Cirrus Logic AccuPak D.VI.S cllc Canopus Lossless Codec D.V.L. cmv Electronic Arts CMV video (decoders: eacmv ) D.V... cpia CPiA video format D.VILS cri Cintel RAW D.V..S cscd CamStudio (decoders: camstudio ) D.VIL. cyuv Creative YUV (CYUV) ..V.LS daala Daala D.VILS dds DirectDraw Surface image decoder -- More --
一、报错信息在应用中执行二进制可执行程序 , 将二进制文件拷贝到了 data/user/0/cn.example/files/ 目录下 ,2021-11-11 15:23:49.288 15975-16036/cn.example E/FFmpeg: Exception while trying to run: [Ljava.lang.String;@b54f6fa java.io.IOException: Cannot run program "/data/user/0/cn.example/files/ffmpeg": error=13, Permission denied at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050) at java.lang.Runtime.exec(Runtime.java:698) at java.lang.Runtime.exec(Runtime.java:563) at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10) at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38) at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10) at android.os.AsyncTask$3.call(AsyncTask.java:389) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:292) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:929) Caused by: java.io.IOException: error=13, Permission denied at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:133) at java.lang.ProcessImpl.start(ProcessImpl.java:141) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) at java.lang.Runtime.exec(Runtime.java:698) at java.lang.Runtime.exec(Runtime.java:563) at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10) at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38) at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10) at android.os.AsyncTask$3.call(AsyncTask.java:389) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:292) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:929) 二、解决方案开始以为没有可执行权限 , 使用如下代码为 /data/user/0/cn.example/files/ffmpeg 文件赋予执行权限 ;new File(getFilesDir(), "ffmpeg")setExecutable(true);上述代码赋予权限成功 , 仍然报错 ;最终原因是在 Android 10 1010 以上的系统中 , Google 官方禁止应用程序从 /data/user 目录运行二进制文件 ;如果要使用 FFmpeg , 推荐使用 https://github.com/tanersener/mobile-ffmpeg ;
一、码率与帧率帧率 : 帧频率 , 视频中每秒钟含有视频帧的帧数 , 一秒钟刷新多少张图像 , 连续移动的图像至少每秒 15 1515 帧 , 才能形成肉眼观察的连续播放效果 , 低于这个帧率 , 画面有卡顿感 ;码率 : 比特率 , 数据率 ; 每秒处理的位数 ;码率的单位是 bps , 表示每秒处理的位数 , 除以 8 88 就是每秒的字节数 ;该参数决定了音视频文件的播放质量 , 码率越大 , 视频质量越高 ;视频文件 中 码率 和 帧率 决定了视频的质量 ;根据 码率 和 时长 可以计算出视频文件的字节大小 ;二、ffmpeg、ffplay、ffprobe 可执行文件之前安装 Windows 中 FFmpeg 运行环境时 , 向 " C:\Windows " 目录下拷贝了 3 33 个可执行程序 , 分别是 ffmpeg , ffplay , ffprobe ;ffmpeg : 音视频编码器 ; 音视频剪辑 , 格式转换 ;ffplay : 媒体播放器 ; 提供 播放音视频文件 , 音视频同步 , 暂停 , 快进 , 快退 , 逐帧播放 等功能 ;ffprobe : 多媒体流分析器 ;
一、ffplay 命令行参数 - 音频滤镜1、设置音频滤镜 -af 参数ffplay 命令的 -af 参数用于 设置 音频滤镜 ( Audio Filter ) , 用于 对 音频流 应用 各种 处理 和 转换 效果 ;多个 音频滤镜 可以组合在一起 , 形成一个 " 音频滤镜链 " , 音频滤镜 之间 使用 逗号 隔开 , 并按照指定的顺序 将 转换效果 应用于 正在播放的 音频 ;" 音频滤镜链 " 是一个 描述 音频滤镜 及其 参数 的字符串 , 可以通过 该参数 来 设置 音效 , 调整音量 , 改变音频 采样率 , 进行 音频 重采样 ;设置 " 音频滤镜链 " 会 降低 音频播放性能 , 尤其是 正在 处理高质量或高采样率的音频时 ;使用 复杂的 " 音频滤镜链 " 时 , 建议关闭不必要的程序和功能 , 以确保流畅的播放体验 ;单个 音频滤镜 示例 : 执行ffplay -af "volume=0.5" fengjing.mp4命令 , 将音量设置为 50% 音量 , 执行效果如下 :2、常用的 音频滤镜 参数ffplay 的 -af 参数 可以 设置 一个或多个 音频滤镜 , 这些 滤镜 可以改变音频的 音量 / 采样率 / 声道数 等效果 , 下面是 一些 常用的 -af 参数选项 :volume=volume : 设置 音频音量 , volume 是一个 乘数 , 可以设置一个 小数 或 整数 ,volume=0.5 就是将音量降低一半 ,volume=2 是 将音量 提高为原来的 2 倍 ;atempo=tempo : 设置 音频播放速度 , 参数值是一个浮点数 , tempo 参数值 > 1 时 音频播放速度加快 , 小于 1 时音频播放速度减慢 ;atempo=0.5 设置 0.5 倍速度播放 ;atempo=2.0 设置 2 倍速度播放 ;aresample=resampler_options : 设置音频重采样 ; 该 音频滤镜 可以用来改变音频的 采样率 / 格式 / 声道布局 ;aresample=44100 可以将 音频的采样率 从 原始值 改变为 44100 Hz ;aformat=sample_fmts : 强制转换音频样本格式 , 如 : 修改 位深度 和 编码方式 ;aformat=sample_fmts=s16 将 播放的音频 转为 16 位 有符号整数 编码 ;ffplay 的 -af 参数主要用于实时应用音频效果 , 如调整音量 / 改变播放速度等 ;在 播放前 转换音频格式 , 建议使用 ffmpeg 命令 , 先转码 , 再使用 ffplay 播放 ;achannelmap=channel_layout : 重新映射音频声道 ;bass=gain : 调整低音增益 ;treble=gain : 调整高音增益 ;3、音频滤镜链 示例多个 音频滤镜 示例 : 执行ffplay -af "volume=0.25,atempo=2.0" fengjing.mp4命令 , 将音量设置为 0.25 倍 , 播放速度设置为 2 倍 , 执行效果如下 :二、ffplay 命令行参数 - 统计信息1、设置统计信息 -stats 参数ffplay 命令的 -stats 参数 用于 在 命令行 中 打印 统计信息 , 这些统计信息 包括显示流的持续时间编解码器参数流中的当前位置音频 / 视频同步差值 ;该 参数 选项 在默认情况下 是 启用状态 , 在 默认的 视频播放 过程中 可以看到这些统计信息 ;执行ffplay fengjing.mp4命令 , 下图中 红色矩形框 中的内容 , 就是 播放时的 统计信息 ;统计信息内容如下 :Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'fengjing.mp4': 0B f=0/0 Metadata: major_brand : isom minor_version : 512 compatible_brands: mp41 creation_time : 2024-02-09T06:29:29.000000Z encoder : Bandicam 4.5.0.1587 / GDI / Nvidia NVENC encoder-eng : Bandicam 4.5.0.1587 / GDI / Nvidia NVENC Duration: 00:01:01.78, start: 0.000000, bitrate: 1783 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 752x420 [SAR 1:1 DAR 188:105], 1580 kb/s, 28.61 fps, 30 tbr, 30k tbn, 60 tbc (default) Metadata: creation_time : 2024-02-09T06:29:29.000000Z handler_name : VideoHandler vendor_id : [0][0][0][0] Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 195 kb/s (default) Metadata: creation_time : 2024-02-09T06:29:29.000000Z handler_name : SoundHandler vendor_id : [0][0][0][0] 37.74 A-V: -0.030 fd= 67 aq= 30KB vq= 108KB sq= 0B f=0/0部分内容解析 :Duration: 00:01:01.78, start: 0.000000, bitrate: 1783 kb/s : 是 码流长度 1 分钟零 1 秒 , 开始时间 0 , 比特率是 1783 kb/s ;37.74 A-V: -0.030 : 当前播放到了 37.74 秒 , 音视频 差值 -0.030 秒 ;creation_time : 2024-02-09T06:29:29.000000Z : 表示当前音频的创建时间是 2024 年 2 月 9 号 ;2、关闭统计信息 -nostats 参数ffplay 命令的 -nostats 参数 用于 关闭 统计信息 , 使用该参数后 , 不再显示 如下信息 :显示流的持续时间编解码器参数流中的当前位置音频 / 视频同步差值 ;执行ffplay -nostats fengjing.mp4命令 , 可以关闭 统计信息 ;在下图中 , 可以看到 下半部分 都是空白的 , 没有打印出 播放时 的 统计信息 ;三、ffplay 命令行参数 - 同步时钟类型1、设置同步时钟类型 -sync 参数ffplay 命令的 -sync 参数 用于 设置 同步时钟类型 , 可以指定音频流时钟视频流时钟外部时钟三种 时钟 选项 , 同步时钟类型 又称为 " 主时钟 " , 这是 ffplay 播放器 用于同步 音频流 和 视频流 的时钟 ;执行ffplay -sync audio fengjing.mp4命令 , 将 音频流时钟 设置为 主时钟 ;2、同步时钟类型参数选项列举ffplay 命令 -sync 参数值 选项 :audio : 将 音频流时钟 设置为 主时钟 , 该设置 是 默认设置 , ffplay 将 根据 音频流的播放速度 来 调整视频流 的播放速度 , 以确保 音频 和 视频 之间的同步 ;video : 将 视频流时钟 设置为 主时钟 , ffplay 将 根据 视频流的播放速度 来调整 音频流的播放速度 ;ext : 使用 外部时钟 ; 使用 外部设备 或 信号作为 主时钟 , 视频流的播放速度 和 音频流的播放速度 与 其他设备或信号 的 时钟 进行 同步 ;执行ffplay -sync video fengjing.mp4 命令 , 将 视频流时钟 设置为 主时钟 ;执行ffplay -sync ext fengjing.mp4命令 , 将 外部电脑的时钟 设置为 主时钟 ;