![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
音视频开发
文章平均质量分 54
SuperYang_
山高人为峰
展开
-
QT音频播放
提取音频PCM文件ffmpeg.exe -i 1080.mp4 -f s16le 1080.pcm原创 2021-01-03 22:51:20 · 642 阅读 · 5 评论 -
FFmpeg+qt音视频开发
音视频开发基础知识https://blog.csdn.net/SuperYang_/article/details/112082230FFmpeg、Qt Creator环境搭建+测试程序https://blog.csdn.net/SuperYang_/article/details/112108842FFmpeg解封装https://blog.csdn.net/SuperYang_/article/details/112122006FFmpeg解码https:/...原创 2021-01-03 17:55:08 · 664 阅读 · 2 评论 -
FFmpeg音频重采样
函数1> swr_alloc:申请内存2> swr_alloc_set_opts:设置参数 @param SwrContext *s:音频重采样上下文 @param int64_t out_ch_layout:输出的声道样式 @param AVSampleFormat out_sample_fmt:输出的采样格式 @param int out_sample_rate:输出采样率 @param int64_t in_ch_layout:输入...原创 2021-01-03 14:17:53 · 1506 阅读 · 0 评论 -
FFmpeg视频像素格式转换和尺寸转换
优缺点相比openGL shader转换来说,ffmpeg转换相对简单,但是效率相对较低函数1> sws_getContext:获取上下文2> sws_getCachedContext:获取上下文,与sws_getContext区别在于内存空间由调用者自己管理 @param SwsContext *context:格式转换上下文 @param int srcW, int srcH, enum AVPixelFormat srcFormat:输入格式...原创 2021-01-03 13:38:34 · 1688 阅读 · 1 评论 -
FFmpeg解码
结构AVCodecContext 相关函数:avcodec_alloc_context3(申请一块AVCodecContext空间)、avcodec_free_context(释放AVCodecContext空间)AVFrane 1> uint8_t *data[AV_NUM_DATA_POINTERS]:数据内容,视频表示一行数据,音频表示一个通道数据 2> int line_size[AV_NUM_DATA_POINTERS]:数据大小,视频表示一...原创 2021-01-03 12:36:51 · 998 阅读 · 0 评论 -
FFmpeg解封装
结构AVFormatContext 1> AVIOContext *pb:文件IO的上下文,自定义格式时使用 2> char filename[1024]:保存打开的文件名,经常用到,例如断开重连 3> unsigned int nb_streams:流数量 4> AVStream **streams:具体流内容,通常只有视频、音频,偶尔也会有字幕之类的 5> int64_t duration:总长度,以AV_TIME_BA...原创 2021-01-03 02:55:14 · 1146 阅读 · 0 评论 -
FFmpeg+qt creator环境搭建+测试程序
QT下载Index of /official_releases/qtFFmpeg下载Download FFmpeg测试程序#include <QCoreApplication>extern "C" { // FFmpeg使用c编写 #include <libavcodec/avcodec.h>}#include <iostream>using namespace std;#pragma comment(lib..原创 2021-01-02 18:12:38 · 482 阅读 · 0 评论 -
音视频开发基础知识
1. MPEG-4是一套用于音、视频信息的压缩编码标准(注意:MPEG-4是一套标准,不等同于.mp4文件)2.常用的封装格式:AVI、FLV、ts、ASF、mp4等3.常用的编码格式: 视频:H264(AVC Part10)、WMV、XviD(Part2)、mjpeg等 音频:acc(有损压缩)、mp3(有损压缩)、ape(无损压缩)、flac(无损压缩)4. 封装格式和编码格式5. 像素格式有BGRA、RGBA、ARGB32、RGB32、YUV420(Y表示明亮度...原创 2021-01-02 01:48:38 · 619 阅读 · 1 评论