当前位置:网站首页>FFmpeg multimedia file processing (ffmpeg prints audio and video Meta information)
FFmpeg multimedia file processing (ffmpeg prints audio and video Meta information)
2022-08-09 13:51:00 【One Leaf Knows Autumn @qqy】
Print audio/video information
- avdevice_register_all()
- avformat_open_input()/avformat_close_input
- av_dump_format()
Practice
int main(int argc, const char * argv[]) {int ret = 0;AVFormatContext *fmt_ctx = NULL; //Create AVFormatContext format context pointerav_log_set_level(AV_LOG_INFO); //Set the log print levelavdevice_register_all(); //Register all devicesret = avformat_open_input(&fmt_ctx, "./test.mp4", NULL, NULL); //The third parameter is the format of the input file, NULL willChoose according to the file suffix name. If the file suffix name is not mp4, but the data format is mp4, the third parameter should be specified as mp4, and the fourth parameter is to pass some parameters from the command line. Generally, it is set to NULL.Yesif(ret < 0){av_log(NULL, AV_LOG_ERROR, "Can't open file:%s\n", av_err2str(ret));}av_dump_format(fmt_ctx, 0, "./Fairytale Town.flac", 0); //The second parameter is the index value of the stream, just fill in 0 directly, it should represent the first video stream, the fourth parameter refers to the input stream or the output stream, here is the direction toffmpeg input file so use 0, if it is ffmpeg output file, it will be 1avformat_close_input(&fmt_ctx);return 0;}
边栏推荐
- ArcEngine(九)图形绘制
- GIN Bind模式获取参数和表单验证
- 5G China unicom AP:B SMS ASCII 转码要求
- Unicom network management protocol block diagram
- FFmpeg多媒体文件处理(ffmpeg操作目录及list的实现)
- 时间序列分析课程实验报告
- The sword refers to Offer 57 - II. and is a continuous positive sequence of s (sliding window)
- Dry+Bean+Dataset R语言数据分析,报告英文
- The FPGA - work summary recently
- WSA工具箱安装应用商店提示无法工作怎么解决?
猜你喜欢
从NPU-SLAM-EDA技术分析
FPGA中串口通信的时钟频率和波特率计数
Anta and Huawei Sports Health jointly verify the champion running shoes and lead Chinese sports with innovation
30行代码实现蚂蚁森林自动偷能量
5G China unicom AP:B SMS ASCII Transcoding Requirements
基于 R 语言的判别分析介绍与实践 LDA和QDA
阿里大淘系模型治理阶段性分享
npm install失败
kustomize入门示例及基本语法使用说明
第六届“强网杯”全国网络安全挑战赛
随机推荐
第六届“强网杯”全国网络安全挑战赛
技术分享 | 接口自动化测试如何处理 Header cookie
万物皆可柯里化的 Ramda.js
novel research
Redis源码剖析之跳表(skiplist)
NFS 特别注意权限的问题
一维数组&指针
陈强教授《机器学习及R应用》课程 第十八章作业
正则表达式-re模块
七夕力扣刷不停,343. 整数拆分(剑指 Offer 14- I. 剪绳子、剑指 Offer 14- II. 剪绳子 II)
Uni - app - uview Swiper shuffling figure component, click on the links to jump (click to get the item after the row data, remove data operation)
[MRCTF2020]套娃-1
gin的中间件和路由分组
jenkins api create custom pipeline
19、学习MySQL 索引
5G China unicom general exception handling
handwritten big pile
read stream 特别注意
电脑重装系统还原0x80070005错误如何解决
Sandbox中的进程/线程相关-2