自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(130)
  • 收藏
  • 关注

原创 usbcamera拔掉设备崩溃

崩溃堆栈如下:解决办法:

2020-07-11 10:45:26 867

原创 h265获取解码头

vps、sps、pps信息见上图:获取代码如下: void getH265Head(char* extradata,int len) { LOGD("getH265Head width : %d,height : %d,len : %d",mWidth,mHeight,len); if(extradata != NULL && len>22) ...

2018-05-15 10:44:04 3327

原创 vs2015编译ffmpeg

参考如下几篇博客,一般就能成功:https://blog.csdn.net/ET_Endeavoring/article/details/75331359https://blog.csdn.net/JiffyChen/article/details/74552402https://blog.csdn.net/huangyifei_1111/article/details/77573944https...

2018-03-29 18:18:42 367

原创 Anroid camera + mediacodec

具体代码参考:https://github.com/google/grafika/tree/master/src/com/android/grafika主要流程:1、生成一个oes textrure2、通过上面生成的oes  texture,new一个surfacetexture,设置回调surfacetexture.setOnFrameAvailableListener(CB);

2017-10-21 14:35:16 753

原创 记录android离屏渲染的一些资料

1、http://www.jianshu.com/p/8793f0fbd1e62、http://blog.csdn.net/junzia/article/details/53861519

2017-09-18 10:40:56 1814

原创 几个移动端直播SDK开源地址

ios直播sdk:https://github.com/runner365/LiveVideoCoreSDKios带滤镜的直播sdk:https://github.com/runner365/GPUImageRtmpPushandroid直播sdk:https://github.com/runner365/android_rtmppush_s

2017-09-15 14:50:16 7874 2

原创 AVAssetWriter保存MP4(PBJVision)

#import "PBJMediaWriter.h"#import "PBJVisionUtilities.h"#import "PBJVision.h"#import #import #define LOG_WRITER 0#if !defined(NDEBUG) && LOG_WRITER# define DLog(fmt, ...) NSLog((@"writer: "

2017-09-15 11:44:11 3256

原创 obs之libx264编码

obs中使用libx264编码的例子,包含了动态设置码率。#include "Main.h"#include #include extern "C"{#include "../x264/x264.h"}void get_x264_log(void *param, int i_level, const char *psz, va_list argptr){ S

2017-09-01 15:09:24 1564

原创 obs之lame编码

obs之lame编码。#include "Main.h"#include "../lame/include/lame.h"const int audioBlockSize = 4; //output is 2 16bit channelsstruct AACDataPacket{ List Packet; inline void FreeData() {Pa

2017-09-01 15:01:50 444

原创 obs之libfaac编码

obs源码之libaac编码。#include "Main.h"#include "../libfaac/include/faac.h"//AAC is pretty good, I changed my mindclass AACEncoder : public AudioEncoder{ UINT curBitRate; bool bFirstPacket

2017-09-01 14:58:33 503

原创 ios libfdk-aac encode

使用libfdk-aac编码。#import "FDKAACEncoder.h"#include "aacenc_lib.h"#define PROFILE_AAC_LC 2#define PROFILE_AAC_HE 5#define PROFILE_AAC_HE_v2 29#define PROFILE_AAC_LD 23#define PROFILE_AAC_ELD 39

2017-09-01 14:46:18 1001

原创 ios libx264 h264 encode

#import "X264Encode.h"#include "x264.h"#define KEY_FRAME_INTERVAL 30typedef struct{ x264_param_t * param; x264_t *handle; x264_picture_t * picture; x264_nal_t *nal;} X264Encode

2017-09-01 14:43:49 358

原创 ios ffmpeg audio decode

ffmepg解码音频。#import "FFMpegAudioDecoder.h"#ifdef __cplusplusextern "C" {#endif #include #include #include #include #ifdef __cplusplus};#endif@interface FFMpegAudioDecoder(){

2017-09-01 11:07:37 411

原创 ios ffmpeg(libfdk-aac) aac encode

使用ffmpeg编码aac,使用libfdk-aac。#import "FFMpegAACEncoder.h"#ifdef __cplusplusextern "C" {#endif #include #include #include #include #ifdef __cplusplus};#endif#define ENCODE_SIZE 102

2017-09-01 11:04:25 590

原创 ios ffmpeg h264 decode

ios使用ffmpeg解码h264数据封装。#import "FFMpegAVCDecoder.h"#ifdef __cplusplusextern "C" {#endif #include #include #include #include #ifdef __cplusplus};#endif@interface FFMpegAVCDecoder(

2017-09-01 10:56:30 403

原创 ios ffmpeg h264 encode

简单封装了下,ffmepg需要包含libx264。#import "FFMpegAVCEncode.h"#ifdef __cplusplusextern "C" {#endif #include #include #include #include #ifdef __cplusplus};#endif@implementation FFMpegAV

2017-09-01 10:53:24 365

原创 lame example

#include "codec.h" // self#include // std::ofstream#include // std::logic_error#include "../lameplus/lameplus.h" // LamePlus#include "../wave/wave.h"

2017-08-24 12:12:47 353

原创 ios build lame

1、下载编译脚本:https://github.com/kewlbear/lame-ios-build2、下载lame:http://lame.sourceforge.net3、将下载的lame-3.99.5放到编译脚本那个目录,重命名为lame4、运行:./build-lame.sh

2017-08-22 17:55:24 818

原创 ffmpeg encode/decode example

00001 /*00002 * Copyright (c) 2001 Fabrice Bellard00003 *00004 * Permission is hereby granted, free of charge, to any person obtaining a copy00005 * of this software and associated documentati

2017-08-18 17:41:47 1620

原创 iOS build faad

1、新建目录xxx,下载faad(http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz)到xxx,解压,重命名为faad。2、编写build.sh,把下面这段抄进去#!/bin/shCONFIGURE_FLAGS="--enable-static --with-pic"

2017-08-17 17:03:39 710

原创 iOS ffmpeg + libfdk-aac

1、编译fdk-aac:http://blog.csdn.net/u011270282/article/details/772593202、编译ffmpeg脚本:https://github.com/kewlbear/FFmpeg-iOS-build-script3、build-ffmpeg.sh修改#FDK_AAC=`pwd`/..

2017-08-17 11:26:20 1437

原创 ios build fdk-aac

1、下载fdk-aachttps://github.com/mstorsjo/fdk-aac2、需要安装automake libtool,运行:brew install automake libtool3、下载build脚本https://github.com/kewlbear/fdk-aac-build-script-for-iOS

2017-08-16 17:42:52 1336

原创 VTDecompressionSessionDecodeFrame -8969

解码时候,需要用h264数据长度替换0x00 0x00 0x00 0x01,注意长度大小端,否则会出现-8969错误-(int)decode:(char*)buf len:(int)len {    CVPixelBufferRef outputPixelBuffer = NULL;        CMBlockBufferRef blo

2017-08-15 15:09:28 1662

原创 ios ffmpeg+libx264

1、编译x264脚本:https://github.com/depthlove/x264-iOS-build-script2、编译ffmpeg脚本:https://github.com/kewlbear/FFmpeg-iOS-build-script3、build-ffmpeg.sh修改:#X264=`pwd`

2017-08-11 16:13:13 695

转载 iOS 使用FFmpeg

原文:http://www.jianshu.com/p/ec432a8f5729如何在iOS上集成 FFmpeg,来,博主带大家往坑里走了。我们此次入坑需要的工具:1、gas-preprocessor2、yasm 1.2.03、FFmpeg-iOS-build-script(ps:这个脚本真是业界良心呀,帮我们省下了不少心。)好了,刀已经有了,但是怎么优雅的

2017-08-11 14:38:06 462

转载 OpenGL 错误获取glGetError()

转载:http://blog.csdn.net/u010270148/article/details/52934295如果函数参数不符或者不符合当前上下文设置的状态,则会导致 OpenGL Error。已 error code 来表示。绝大多数情况下 OpenGL functions 产生 errors,则不会生效。少数有效。OpenGL Error 存储在一个队列中,直到该错

2017-08-07 17:21:51 18860

原创 iOS获取音频设备信息

方法1:        CFDictionaryRef descDictRef = nil;        UInt32 refSize = sizeof(descDictRef);        status = AudioSessionGetProperty(kAudioSessionProperty_AudioRouteDescription, &refSize,

2017-07-26 10:15:36 1296

原创 Android7 mediacodec SEI

发现Android7使用mediacodec进行avc编码,得到的第一个关键帧的h264数据中包含SEI这种nal。如果我们不需要,或者加上之后对我们有影响,可以去掉。private int findNextNalPos(byte[] buf,int pos) {    for (int i = pos; i ; i++) {        if

2017-06-08 20:46:06 1383

原创 iOS 使用mp4v2合成的视频注意事项

使用MP4v2合成视频,发现AVPlayer播放都是从第二个关键帧开始播放,调试发现原来第一个关键帧前面有个SEI。比如iOS,使用AVAssetWriter录制视频,再使用AVAssetReader读取h264数据,再通过MP4v2合成视频,读取到的第一个关键帧是包含一个SEI的。读到的第一个h264 buf格式是这样的: SEI长

2017-06-08 20:36:10 1809

原创 CMSampleBufferRef获取h264 char*数据及sps/pps

直接看代码:CMBlockBufferRef blockBuffer = CMSampleBufferGetDataBuffer(sampleBuf);    size_t len_offset = 0 , len_total = 0 ;    char * addr = NULL ;    OSStatus status = CMBlock

2017-05-23 12:10:00 1820

转载 学习OpenGL-ES: 2 - EGL解析

原文:http://www.cnblogs.com/kiffa/archive/2013/02/21/2921123.html1, 前言在前文(学习OpenGL-ES: 1 - 像素、颜色、显存、环境初始化和EGL)中提到EGL是本地平台和OpenGL ES之间的抽象层,其完成了本地相关的环境初始化和上下文控制工作,以保证OpenGL ES的平台无关性。主要包含如下

2017-05-17 17:07:49 559

转载 ANDROID 高性能图形处理 之 OPENGL ES

原文:http://tangzm.com/blog/?p=20在之前的介绍中我们说到在Android 4.2上使用RenderScript有诸多限制,我们于是尝试改用OpenGL ES 2.0来实现滤镜。本文不详细介绍OpenGL ES的规范以及组成部分,感兴趣的同学可以阅读 《OpenGL -ES Programming Guide》。这本书是OpenGL ES的权威

2017-05-16 11:27:59 1315

原创 AVAssetWriter写h264数据

AVAssetWriterInput按如下初始化:CMFormatDescriptionRef videoFormat = NULL;CMVideoFormatDescriptionCreate(kCFAllocatorDefault, kCMVideoCodecType_H264, 480, 480, NULL, &videoFormat);AVAssetWriter

2017-05-12 20:48:03 2251 4

转载 基于Surface的视频编解码与OpenGL ES渲染

http://blog.csdn.net/gh_home/article/details/523999591. 概述这篇文章所做的事情是这样的: 1. 从一个.mp4文件中解码视频流到surface上 2. 利用OpenGL ES渲染改变视频流中每一帧的内容 3. 将改变后的视频流重新编码输出到一个新的.mp4文件所有代码可在此处下载:https

2017-04-28 17:56:53 4624

原创 mediacodec surfaceview解码失败

原来在configure的时候设置了sps/pps(如下),发现有些机型解码失败,dequeueInputBuffer、queueInputBuffer这些老是异常MediaFormat format = MediaFormat.createVideoFormat("video/avc", 480, 480);//format.setByteBuffer("

2017-04-27 17:43:00 1801

原创 iOS GPUimageCamera锁屏崩溃解决方法

- (void)observeGlobalNotifications{ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onApplicationWillResignActive) name:UIApplicationWillResignActiveNotification object:

2017-04-27 16:47:35 830

转载 细数AVPlayer的那些坑

http://ivanyuan.farbox.com/post/shi-pin-bo-fang-de-na-xie-keng最近一直在做视频动态挂件以及一个视频播放的功能,在开始做之前,先学习了苹果的官方文档RosyWriter,熟悉了短视频拍摄、滤镜处理的一些小技巧,同学也学习了下GPUImage,最后在踩了很多坑以后才实现了视频挂件的处理。这次主要是总结和记录下视频

2017-04-21 14:38:35 28925 4

转载 iOS 后台运行实现总结

原文:http://www.jianshu.com/p/d3e279de2e32iOS 后台运行的规则应用的运行状态分为以下五种:Not running:应用还没有启动,或者应用正在运行但是途中被系统停止。Inactive:当前应用正在前台运行,但是并不接收事件(当前或许正在执行其它代码)。一般每当应用要从一个状态切换到另一个不同的状态时,中途过渡会短暂停留在此状态。唯

2017-03-29 16:44:43 5428

原创 AudioUnitRender -10876

iOS使用AudioUnit录音,在录音回调中使用AudioUnitRender播放录制的人声时,返回-10876这个错误。这里https://www.osstatus.com/search/results?platform=all&framework=all&search=-10876查询到错误码:kAudioUnitErr_NoConnection。解决方法:[[A

2017-03-14 12:14:56 3500

转载 IOS硬件解码VTDecompressionSession失效

原文:http://blog.5ibc.net/p/33817.html编码、解码失效都可以restart一下。IOS硬件解码VideoToolbox在应用中进入后台VTDecompressionSession失效解决办法*前段时间在IOS上用VideoToolbox进行视频播放器硬件解码时遇到一个问题,就是播放器进入进入到后台后再切换回来会导致VTDecompressionSes

2017-03-09 11:57:53 1250

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除