
ffmpeg
七个橘子多少钱
这个作者很懒,什么都没留下…
展开
-
ffmpeg api H264视频编码
// rgb h264 转 mp4extern"C"{#include<libavformat/avformat.h>#include<libswscale/swscale.h>}#include<iostream>usingnamespacestd;#pragmacomment(lib,"avformat.lib")#pragmacomment(lib,"avcodec.lib")#pragmacomment(li...原创 2021-07-05 19:09:01 · 388 阅读 · 1 评论 -
ffmpeg API 视频解码
#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>extern "C"{ #include <libavcodec\avcodec.h> #include <libavformat\avformat.h> #include <libavutil\opt.h> #include <libswscale\swscale.h>}#pragma comment(lib,"avcodec..原创 2021-07-01 09:02:44 · 166 阅读 · 0 评论 -
ffmpeg(3) 使用ffmpeg API打开摄像头
代码与打开音频设备类似,使用命令“ffmpeg -list_devices true -f dshow -i dummy”查看自己电脑上的设备名称。bool openvideodevice(){ char *cameraname ="video=Chicony USB2.0 Camera"; AVFormatContext *ctx = NULL; AVInputFormat *ift = NULL; AVDictionary *dty = NULL; i原创 2021-05-15 22:57:38 · 1345 阅读 · 0 评论 -
ffmpeg(2) ffmpeg打开音频设备并录制音频生成pcm文件
在ffmpeg(1)的基础上增加代码bool openaudio(){ char *name = "audio=麦克风 (Realtek High Definition Audio)"; int ret = 0; AVFormatContext *avformatcontext = NULL; AVDictionary *dt = NULL; int count = 0; AVPacket pkt; avdevice_regis原创 2021-05-12 22:40:39 · 473 阅读 · 0 评论 -
ffmpeg(1)通过ffmpeg API 打开音频设备的简单例子
本人是在QT搭建的FFMPEG开发环境,但没有掺杂QT的代码,所以代码在其他平台是通用的先创建一个头文件 ffmpegtest.h#include <iostream>#include <stdio.h>#include <cstdio>#include <string.h>#include <stdlib.h>#include <stdint.h>#include <dshow.h>exter原创 2021-05-09 20:49:28 · 1177 阅读 · 0 评论