
音视频学习例子
文章平均质量分 52
音视频实践小例子和详解
太极者,无极而生
记录学习和工作编程点点滴滴
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
FFMPEG封装文件逻辑和流程
*封装文件逻辑和流程和相应的FFMPEG函数封装逻辑AVFormatContext* out_ctx;先申明封装信息上下文avformat_alloc_output_context2(&out_ctx,NULL,NULL,out_file);//创建输出文件空间,根据即将输出的文件名、获取封装信息上下文AVFormatContextAVStream *st = avformat_new_stream(out_ctx,NULL);//添加音视频流avcodec_parameters_c原创 2021-12-02 11:15:06 · 590 阅读 · 0 评论 -
ffmpeg 推流MP4文件,采用rtmp协议
本程序ffmpeg版本是:ffmpeg version 3.2.4 Copyright © 2000-2017 the FFmpeg developers。不同ffmpeg版本会稍微有点不同,比如最明显ffmpeg 4.0和ffmpeg 3.0少了一些注册类函数(如:av_register_all())还有编解码函数方式等。本程序是经过ffmpeg 推流FLV文件,采用rtmp协议这个例子修改而来的。下面分二部分:一、和上面例子有那些区分;二、源代码分享一、和上面例子有那些区分;1、赋值配置.原创 2020-12-09 21:54:20 · 3989 阅读 · 2 评论 -
ffmpeg 推流FLV文件,采用rtmp协议
想看懂这个代码需要掌握以下音视频基础知识1、音视频时间基是什么?FFMPEG之TimeBase成员理解补充:封装/解封装、编码/解码、采集/显示这三个层面中的taimeBase是代表不同的意思的,需要通过转换才可以进行上下层的交互。2、ffmpeg中对AVRational结构体理解ffmpeg # AVRational假如一秒25帧就是1/25;那么换算成每毫秒25帧就是1000* 1 /25 = 1000/25;换算成每微妙25帧话就是1000*1000/25(每一毫秒等于1000微妙)。.原创 2020-12-02 15:47:11 · 2162 阅读 · 0 评论 -
ffmpeg muxing.c demo 流程图和源代码
/* * Copyright (c) 2003 Fabrice Bellard * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including..原创 2020-10-21 15:18:12 · 388 阅读 · 0 评论 -
ffmpeg avio_reading.c 例子流程图
ffmpeg avio_reading.c例子讲解,从视频文件数据读到内存里面原创 2020-10-20 15:14:45 · 206 阅读 · 0 评论 -
ffmpeg demo decode_video.c例子流程图
(ffmpeg库 decode_video.c例子详解,对例子代码进行注释,以助于理解)源代码原创 2020-10-20 11:18:46 · 565 阅读 · 0 评论 -
ffmpeg库 decode_video.c例子详解,读取视频编码文件后解码每帧保存为pgm图像
/** * @file * video decoding with libavcodec API example * * @example decode_video.c */#include <stdio.h>#include <stdlib.h>#include <string.h>#include <libavcodec/avcodec.h>#define INBUF_SIZE 4096/* example fo..原创 2020-10-16 19:45:11 · 1000 阅读 · 0 评论 -
ffmpeg avio_reading.c例子讲解,从视频文件数据读到内存里面
需要用到变量初始化 AVFormatContext *fmt_ctx = NULL; AVIOContext *avio_ctx = NULL; uint8_t *buffer = NULL, *avio_ctx_buffer = NULL; size_t buffer_size, avio_ctx_buffer_size = 4096; char *input_filename = NULL; int ret = 0; struct buffer_data原创 2020-10-15 20:39:18 · 797 阅读 · 0 评论 -
使用ffmpeg把视频文件拆分成多张ppm格式图片
使用ffmpeg把视频文件拆分成多张ppm格式图片#include <stdio.h>#include "libavcodec/avcodec.h"#include "libavformat/avformat.h"#include "libavutil/pixfmt.h"#include "libswscale/swscale.h"///现在我们需要做的是让SaveFra...原创 2020-07-29 12:03:31 · 766 阅读 · 0 评论