ICode9

精准搜索请尝试: 精确搜索
  • FFmpeg学习:复用器的使用(录制摄像头和麦克风数据,输出mkv文件)2022-07-21 11:02:20

    介绍 本文在上一篇复用器的使用基础上,将输入文件改为摄像头和麦克风 目前只是单线程 代码如下: 点击查看代码 #include <iostream> #define __STDC_CONSTANT_MACROS //它允许C++程序使用C99标准中指定的 stdint.h 宏,而这些宏不在C++标准中。 //诸如 UINT8_MAX , INT64_MIN 和 I

  • C/C++音视频高级开发 FFmpeg编程入门2022-07-05 23:03:20

    1 播放器框架 2 常用音视频术语 • 容器/文件(Conainer/File):即特定格式的多媒体文件,比如mp4、flv、mkv等。 • 媒体流(Stream):表示时间轴上的一段连续数据,如一段声音数据、一段视频数据或一段字幕数据,可以是压缩 的,也可以是非压缩的,压缩的数据需要关联特定的编解码器(有些码流音频他是

  • FFmpeg中的关键方法及结构体(二)avformat_open_input2022-05-26 22:02:13

    avformat_open_input 该方法声明在libavformat/avformat.h:2093 int avformat_open_input(AVFormatContext **ps, const char *url, const AVInputFormat *fmt, AVDictionary **options); 方法实现位于libavformat/demux.c:207,该方法主要用来选择IO以及

  • ffmpeg avformat_open_input 返回 -1094995529 问题排查2022-04-12 11:34:43

    使用场景:live555 mediaServer作为服务端, 客户端ffmpeg rtsp拉流 问题:开始拉流正常,但多次之后 avformat_open_input 总是返回 -1094995529,导致触发超时回调 原因:只调用 avformat_free_context() 释放了 AVFormatContext ,rtsp 连接未关闭,多次之后无法再建立连接 解决方法:调用 avform

  • ffmpeg重要函数和结构体整理2022-01-20 11:34:24

    ffmpeg、ffplay    自己学习记录,方便以后查看。  ======================================================================================================================= ffmpeg关键结构体类型: 1)解协议 AVIOContext,URLProtocol,URLContext主要存储视音频使用的协

  • 第一个FFMPEG程序2021-11-27 11:03:25

    1.将相关的库及头文件添加 2.在代码中加头文件 extern "C"{ #include <libavcodec/avcodec.h> #include <libavformat/avformat.h>}; 注意加extern "C" 3.代码 AVFormatContext *pFormatCtx = avformat_alloc_context(); if (avformat_open_input(&pFormatCtx, &

  • avformat_find_stream_Info2021-10-12 16:34:04

    avformat_find_stream_Info声明: 所属库:libavformat(lavf) 头文件:avformat.h 声明: 从如下声明的解释可以获知以下几点信息 1)该函数将读取媒体文件的音视频包去获取流信息。本函数常用于avformat_open_input()函数之后,在avformat_open_input()函数中会调用输入文件格式的read_hea

  • 【流媒体开发】17、FFmpeg基础入门2021-09-26 21:02:16

    一、播放器框架 二、常用音视频概念 容器/文件(Conainer/File): 即特定格式的多媒体文件,比如mp4、flv、mkv等。媒体流(Stream): 表示时间轴上的一段连续数据,如一段声音数据、一段视频数据或一段字幕数据,可以是压缩的,也可以是非压缩的,压缩的数据需要关联特定的编解码器(有些码流音频

  • ffmpeg创建输出上下文(AVFormatContext)方法2021-09-22 18:30:41

    方法1 原型: int avformat_alloc_output_context2(AVFormatContext **ctx, ff_const59 AVOutputFormat *oformat, const char *format_name, const char *filename); 使用: int ret = avformat_alloc_output_context2(&ofmt_ctx, NULL, NULL, destMedia); 说明: 该方法等同于方法2

  • 梳理FFmpeg基础知识2021-09-16 15:32:44

    基本步骤 八大函数库的作用 Acvodec: 编解码库 Avdevice:设备输入输出库 Avformat:封装格式相关库 Swscale:视频像素格式转换库 swresample:音频采样数据库 avfilter:滤镜特效库 Avutil:工具库 Postproc:宏文件库 基本步骤 注册函数 av_register_all() 头文件(libavformat

  • FFmpeg打开rtsp流2021-09-12 12:58:48

    函数 avformat_open_input 代码 AVFormatContext *qFormatCtx = NULL; //封装格式上下文 是描述一个媒体文件或媒体流的构成和基本信息的结构体 //获取文件路径 const char *out_filename="rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k

  • FFmpeg多媒体文件处理(ffmpeg打印音视频Meta信息)2021-07-31 22:01:59

    打印音/视频信息 avdevice_register_all()avformat_open_input()/avformat_close_inputav_dump_format() 实战 int main(int argc, const char * argv[]) { int ret = 0; AVFormatContext *fmt_ctx = NULL; //创建AVFormatContext格式上下文指针 av_log_se

  • ffmpeg学习------avformat_open_input()2021-06-19 21:59:17

    打开输出的流和读取头信息。其原型如下: int avformat_open_input(AVFormatContext **ps, const char *url, AVInputFormat *fmt, AVDictionary **options) ps:函数调用成功之后处理过的 AVFormatContext 结构体。url:打开的视音频流的 URL。fmt:强制指定 AVFormatContext 中 AVInpu

  • 线程及视频解码过程6-162021-06-17 09:03:02

    线程 一、为了让音视频更好的解码,这里我们需要采用多线程,用一个线程解码视频,一个线程解码音频,我们需要: 1.调用线程库 #include <thread> 2.std:thread t1(); 创建相应线程。 3、为了让每个线程更好的区分资源属于哪一个线程,我们可以用类来实现线程,在对应得类中用成员来区分。 例如

  • FFmpeg代码架构2021-05-23 21:03:46

    FFmpeg模块分类 打开FFmpeg源码,会发现有一系列libavxxx的模块,这些模块很好地划分了代码的结构和分工。 libavformat,format,格式封装 libavcodec,codec,编码、解码 libavutil,util,通用音视频工具,像素、IO、时间等工具 libavfilter,filter,过滤器,可以用作音视频特效处理 libavdevice,dev

  • ffmpeg学习(4)协议解析、封装解析2021-04-18 12:59:07

    这里介绍ffmpeg打开一个输入进行协议封装解析,输入可以是本地文件、也可以是视频流信息。以一个最简单示例代码开始,后面再对代码进行说明。 示例代码 #include <stdio.h> #ifdef __cplusplus extern "C" { #endif #include "libavformat/avformat.h" #ifdef __cplusplu

  • FFmpeg - AVFormatContext2021-03-16 20:31:23

      struct AVFormatContext             简介: 描述了一个媒体文件或媒体流的构成和基本信息,位于avformat.h文件中。     关注 笔者 - jxd 微信公众号搜索 “码农总动员” 了解更多你不知道的XX,O(∩_∩)O

  • avformat_open_input 阻塞 and 设置超时时间2021-02-26 17:31:02

    在编写能够适配 h264 和 h265 编码的MP4播放器时遇到的问题.(PS如果iOS系统播放器能够满足这一点我也不至于会累成狗).于是有了以下的尝试. 完美解析播放 本地mp4 (h264编码)完美解析播放 本地mp4 (h265编码)解析网络mp4 (海鸟) 视频地址 http://vjs.zencdn.net/v/oceans.mp4 卡

  • FFmpeg 获取H264流中的sps pps2021-01-27 17:31:17

    H.264的SPS和PPS串,包含了初始化H.264解码器所需要的信息参数,包括编码所用的profile,level,图像的宽和高,deblock滤波器等。 (1)avcC的数据结构: aligned(8) class AVCDecoderConfigurationRecord { unsigned int(8) configurationVersion = 1; unsigned int(8) AVCProfileIndicatio

  • ffmpeg 取摄像头数据(二)2021-01-08 16:00:54

    通过ffmpeg取摄像头原始数据 windows下打开的设备名“HD webcam”,通过设备管理器查看;linux下一般插入USB设备后,会在生成设备节点/dev/video0,如果没有的话通过lsusb查看,可以看到有挂载信息(usb摄像头驱动vid、pid),此时可能是uvc驱动的问题,有的裁剪版操作系统就会出现这种,比如ope

  • 音视频流媒体之_FFmpeg(从入门到精通)之第一节(FFmpeg的基本组成)2020-01-26 11:01:47

    FFmpeg框架的基本组成包含AVFormat,AVCodec,AVFilter,AVDevice,AVUtil等模板库: (1)FFmpeg的封装模块AVFormat AVFormat中实现了目前媒体领域中的绝大多数媒体封装格式,包括封装和解封装,如MP4,FLV,KV,TS,等文件封装格式,RTMP,RTSP,MMS,HLS等网络协议封装格式。FFmpeg是否支持某种媒体封装格

  • FFmpeg使用c语言sdk实现打印视频的信息2019-12-31 11:03:39

    主要使用函数 ffmpeg中的所有编解码库,网络协议注册到程序里面来:av_register_all() 打开一个多媒体文件:avformat_open_input() 关闭一个多媒体文件:avformat_close_input() 打印meta信息:av_dump_format() 实例 vim meta_info.c #include <libavutil/log.h> #include <libavformat/

  • ffmpeg中c语言sdk多媒体互转主要使用的api2019-12-31 11:00:57

    多媒体互转的主要使用API 分配一个输出上下文的空间:avformat_alloc_output_context2(); 释放输出上下文的空间:avformat_free_context(); 生成一个新的流:avformat_new_stream(); 拷贝视频的参数:avcodec_parameters_copy(); 生成多媒体文件头:avformat_write_header() 写入多媒体数

  • FFmpeg 常用API2019-12-14 22:58:01

    一、通用API 1.1 av_register_all() 初始化 libavformat 和注册所有的复用器、解复用器和协议处理器。如果不调用这个函数,可以调用下面的三个函数来选择支持的格式。 注册复用器的函数是av_register_output_format()。 注册解复用器的函数是av_register_input_format()。 注册协

  • ffmpeg rtsp转 rtmp2019-04-25 20:51:38

    原文:https://www.jianshu.com/p/69eede147229 #include <iostream> using namespace std; //引入头文件 extern "C" { #include "libavformat/avformat.h" //引入时间 #include "libavutil/time.h" } //引入库 #pragma comment(lib,"avforma

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有