随笔分类 - ffmpeg
摘要:/** * Convert valid timing fields (timestamps / durations) in a packet from one * timebase to another. Timestamps with unknown values (AV_NOPTS_VALUE)
阅读全文
摘要:/** * @defgroup opt_set_funcs Option setting functions * @{ * Those functions set the field of obj with the given name to value. * * @param[in] obj A
阅读全文
摘要:linesize说明 #define AV_NUM_DATA_POINTERS 8 /** * For video, size in bytes of each picture line. * For audio, size in bytes of each plane. * * For audio
阅读全文
摘要:av_image_fill_arrays是FFmpeg中用于填充图像数据指针数组的函数之一。在音视频处理领域,正确使用av_image_fill_arrays函数可以帮助我们有效地处理图像数据。 av_image_fill_arrays函数原型 /** * Setup the data pointe
阅读全文
摘要:av_samples_fill_arrays是FFmpeg中一个非常重要的函数,用于填充音频数据的指针数组。在音视频处理中,经常需要处理音频数据,而av_samples_fill_arrays可以正确地组织音频数据,以便后续处理和编解码。 av_samples_fill_arrays函数的原型: /
阅读全文
摘要:目录导语一、FFmpeg简介二、FFmpeg主要模块功能介绍1. libavformat2. libavcodec3. libavutil4. libavdevice5. libavfilter6. libswscale7. libswresample三、性能数据分析四、结论 导语 FFmpeg是一
阅读全文
摘要:基础 filter: 数据处理器 filter_chain: 链表链接链接所有的filter filter_graph:数据处理管理器 查看filter的相关事项:ffmpeg -h filter=filter_name $ ffmpeg -h filter=crop Filter crop Cro
阅读全文
摘要:AVInputFormat 1. AVInputFormat是demuxer或者indev AVInputFormat *previn = NULL, *in; for (int i = 0; (in = (AVInputFormat*)demuxer_list[i]); i++) { if (pr
阅读全文
摘要:time_base的定义与使用方法 在ffmpeg中,time_base是一种时间基准用于表示时间戳。在视频编解码过程中,每帧或者每个音频样本都有自己的时间戳,以表示该帧或样本在时间轴上的位置。time_base就是用来指定这些时间戳的时间基准。它是一个有理数类型,表示每个时间单位(通常是秒)有多少
阅读全文
摘要:tbn tbn: the time base in AVStream that has come from the container 视频流时长的精确度time_base,即1s = 90000个刻度 视频总时长T = AVStream.duration * AVStream.time_base
阅读全文
摘要:官方源码 /** * Initialize the AVCodecContext to use the given AVCodec. Prior to using this * function the context has to be allocated with avcodec_alloc_c
阅读全文
摘要:官方源码 /** * Stream structure. * New fields can be added to the end with minor version bumps. * Removal, reordering and changes to existing fields requi
阅读全文
摘要:结构体AVClass /** * Describe the class of an AVClass context structure. That is an * arbitrary struct of which the first field is a pointer to an * AVCla
阅读全文
摘要:结构体AVCodecContext 点击这里查看AVCodecContext 结构体AVCodec 点击这里查看AVCodec 函数声明avcodec_alloc_context3 /** * Allocate an AVCodecContext and set its fields to defa
阅读全文
摘要:AVCodec typedef struct AVCodec { /** * Name of the codec implementation. * The name is globally unique among encoders and among decoders (but an * enc
阅读全文
摘要:结构体AVCodecContext typedef struct AVCodecContext { /** * information on struct for av_log * - set by avcodec_alloc_context3 */ const AVClass *av_class;
阅读全文
摘要:关键函数 /** * Find a registered encoder with a matching codec ID. * 利用编码器ID查找编码器(AVCodec.id) * @param id AVCodecID of the requested encoder * @return An
阅读全文
摘要:1. 获取编码器AVCodec avcodec_find_encoder avcodec_find_encoder_by_name 2. 分配编码上下文AVCodecContext avcodec_alloc_context3 3. 设置编码参数 3.1 音频 ctx->codec_id = AV_
阅读全文
摘要:存储方式差异 音视频都有packed和planar两种存储方式 packed方式为多个声道交错存储,比如双声道data[0] = LRLRLR… planar方式为多个声道独立存储,比如双声道data[0] = LLL… data[1] = RRR… 图示yuv444p与yuv444 对于plana
阅读全文
摘要:音频量化格式和相关的工具函数 类型说明 AVSampleFormat /** * Audio sample formats * * - The data described by the sample format is always in native-endian order. * Sample
阅读全文
浙公网安备 33010602011771号