当前位置:网站首页>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;}
边栏推荐
- #WeArePlay | 与更多开发者一起,探索新世界
- LnReader编译
- FFmpeg多媒体文件处理(ffmpeg操作目录及list的实现)
- ArcEngine(九)图形绘制
- R语言kaggle 游戏数据探索与可视化
- 剑指 Offer 43. 1~n 整数中 1 出现的次数(递归、数学)
- 万物皆可柯里化的 Ramda.js
- 【FPGA教程案例48】图像案例8——基于FPGA的RGB图像转化为HSV图像的实现,通过MATLAB进行辅助验证
- 七夕力扣刷不停,343. 整数拆分(剑指 Offer 14- I. 剪绳子、剑指 Offer 14- II. 剪绳子 II)
- 陈强教授《机器学习及R应用》课程 第十四章作业
猜你喜欢
19、学习MySQL 索引
Jenkins API groovy calling practice: Jenkins Core Api & Job DSL to create a project
电脑重装系统还原0x80070005错误如何解决
联通网管协议框图
FPGA-近日工作总结
jenkins api创建自定义pipeline
Anta and Huawei Sports Health jointly verify the champion running shoes and lead Chinese sports with innovation
Jenkins API groovy调用实践: Jenkins Core Api & Job DSL创建项目
阿里大淘系模型治理阶段性分享
快来扔鸡蛋。
随机推荐
昇腾AI开发者创享日南京站!一起CANN机器狗+AI机械臂实现硬核智慧救援!燃爆现场~
glibc memory management model freeing C library memory cache
5G 联通网管设计思路
安踏携手华为运动健康共同验证冠军跑鞋 创新引领中国体育
我的2020年终总结
CPU-MIPS32 instruction architecture (unlocked pipeline microprocessor)
GIN Bind模式获取参数和表单验证
telnet+ftp to control and upgrade the device
Bitmaps and bit operations
The sword refers to Offer 57 - II. and is a continuous positive sequence of s (sliding window)
GIN file upload and return
七夕力扣刷不停,343. 整数拆分(剑指 Offer 14- I. 剪绳子、剑指 Offer 14- II. 剪绳子 II)
OOM排查和处理
如何求最大公约数?
陈强教授《机器学习及R应用》课程 第十五章作业
Final assignment of R language data analysis in a university
Jenkins API groovy调用实践: Jenkins Core Api & Job DSL创建项目
Microsoft 10/11 命令行打开系统设置页(WUAP,!WIN32)
ftplib+ tqdm 上传下载进度条
ARM板卡增加路由功能