aac

Can I use AVCaptureSession to encode an AAC stream to memory?

我怕爱的太早我们不能终老 提交于 2019-12-03 03:59:10
问题 I'm writing an iOS app that streams video and audio over the network. I am using AVCaptureSession to grab raw video frames using AVCaptureVideoDataOutput and encode them in software using x264. This works great. I wanted to do the same for audio, only that I don't need that much control on the audio side so I wanted to use the built in hardware encoder to produce an AAC stream. This meant using Audio Converter from the Audio Toolbox layer. In order to do so I put in a handler for

I converted CAF to AAC format using TPAACAudioConverter but converted file duration is 0

匿名 (未验证) 提交于 2019-12-03 03:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using AVAudioRecorder. I record the sound in caf format. After that i convert the file caf to aac format using TPAACAudioConverter . It works fine but converted file duration is 00:00. Is there any way to get duration of aac audio file. 回答1: The AAC format doesn't support for some simulator.You can check it on your device. It will works fine and you may get AAC audio file duration. 回答2: Can you playback the caf file ? If you only want to record a sound from microphone to an aac file, you can use Audio Queue Services (I can post some code

How to generate the AAC ADTS elementary stream with Android MediaCodec

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: What I am trying to do: use Android's MediaCodec to encode raw PCM audio samples into a raw AAC file. The problem I have: when I use FFMPEG to pack the generated raw AAC file into an M4A container, FFMPEG complains about missing codec parameters in the file. Details: Since I can't find any MediaCodec sample code for the audio encoder that generates an output AAC file, I tried to modify the video encoder into an audio encoder. The original code is here: source_code I configured the audio encoder like this: mEncoderFormat = MediaFormat

Error when decode AAC with avcodec_decode_audio4()

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to decode AAC with FFmpeg native decoder and encountered an error SSR is not implemeted. Update your FFmpeg version to newest from Git. If the problem still occurs, it mean that your file has a feature which has not implemented. Function avcodec_decode_audio4() return -1163346256. Is this because of FFmpeg version? I downloaded shared and dev version from here . Is this up to date? Here is the source code: #include "stdafx.h" #include "stdio.h" #include "conio.h" extern "C" { #ifndef __STDC_CONSTANT_MACROS #define __STDC_CONSTANT

Video file formats supported in iPhone

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: What are the the video file formats supported by the iPhone OS? Thanks 回答1: Quoting the iPhone OS Technology Overview : iPhone OS provides support for full-screen video playback through the Media Player framework (MediaPlayer.framework). This framework supports the playback of movie files with the .mov, .mp4, .m4v, and .3gp filename extensions and using the following compression standards: H.264 video, up to 1.5 Mbps, 640 by 480 pixels, 30 frames per second, Low-Complexity version of the H.264 Baseline Profile with AAC-LC audio up

Non-monotonous DTS in output stream previous current changing to This may result in incorrect timestamps in the output file

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am having a file.txt with rather close snippets file 'input.mp4' inpoint 1.5402465510368346 outpoint 2.722609395980835 file 'input.mp4' inpoint 3.192511146068573 outpoint 7.074568028450012 file 'input.mp4' inpoint 7.851800565719604 outpoint 9.023683423995971 file 'input.mp4' inpoint 10.054571752548219 outpoint 12.008032734394073 file 'input.mp4' inpoint 18.70977670431137 outpoint 21.20993923664093 file 'input.mp4' inpoint 24.51183382153511 outpoint 26.465287650823594 ... I concat them with ffmpeg -safe 0 -f concat -i file.txt out.mp4 and I

FFmpeg iOS -> output file is invalid

匿名 (未验证) 提交于 2019-12-03 01:22:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using following library to convert mkv to mp4: https://github.com/SterlingOnLoop/FFmpegWrapper . - (void)convertUsingFFmpegWrapper { NSString *mp4Extension = @"mp4"; NSString *mkvExtension = @"mkv"; NSString *videoName = @"file1"; // NSString *videoName = @"file2"; NSString *mkvVideoFilePath = [[NSBundle mainBundle] pathForResource:videoName ofType:mkvExtension]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = paths[0]; NSString *mp4VideoFilePath = [NSString

ios fdk-aac pcm to aac sample

匿名 (未验证) 提交于 2019-12-03 01:06:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Here is the encoding part sample code. I don't understand the endcode function's working mode. I don't know how to split the pcm raw data frame by frame or just encode the data once for all. I need some guide or just code... NSData *data = [NSData dataWithContentsOfURL: [[NSBundle mainBundle] URLForResource: @"sourcePCM" withExtension:@"raw"]]; AACENC_OutArgs out_args = { 0 }; AACENC_ERROR err; int out_identifier = OUT_BITSTREAM_DATA; uint8_t *output_data = calloc(encoder_info.maxOutBufBytes, 1); int read = data.length; void *in_ptr = data

ffmpeg aac解码pcm

匿名 (未验证) 提交于 2019-12-03 00:19:01
下面将aac解码成pcm的代码,主要是参考某位博主的博客,原文地址忘记在哪了! #include<stdio.h> #include<stdlib.h> #include<string.h> #define __STDC_CONSTANT_MACROS extern "C" { #include <libavcodec/avcodec.h> #include <libavformat/avformat.h> #include <libavdevice/avdevice.h> #include<libswresample/swresample.h> } #define MAX_AUDIO_FRAME_SIZE 192000 #define SAMPLE_PRT(fmt...) \ do {\ printf("[%s]-%d: ", __FUNCTION__, __LINE__);\ printf(fmt);\ }while(0) const char *in_file = "./hefang.aac"; const char *out_file = "./hefang.pcm"; int main() { //注册所有的工具 av_register_all(); AVFormatContext *fmt_ctx = NULL; AVCodecContext *cod_ctx =

多媒体开发(12):解码aac到wav文件

匿名 (未验证) 提交于 2019-12-02 23:38:02
版权声明:转载就注明出处,谢谢。 https://blog.csdn.net/freejet2018/article/details/90766983 简单来说,aac是一种音频编码格式,需要解码后才能用于音频输出。aac编码格式,已经是一种很常见的音频编码格式,以至于很多系统都支持aac的编解码,比如iOS上的AudioConverterRef接口、Android上的MediaCodec接口等。 但是,不要以为用了系统的接口就是用了硬件解码,因为,这个系统接口有可能最终还是使用软件解码,比如有些手机(比如小米)的MediaCodec对于acc的解码,就是软解码,用的是google提供的OMX.google.aac.decoder,不要以为用了系统接口解码的速度就飞快了,要真是硬件支持才行的。 那什么是硬解码,什么是软解码呢?很简单,如果硬件芯片专门来做解码,就是硬解码,比如使用GPU或DSP之类的模块来处理解码就是硬解码(一般不会使用CPU),这需要硬件上的支持。而软解码就是用软件来解码了,就相当你写一个程序来解码,使用CPU来做事。优缺点方面,硬解速度快功耗低但兼容性差,软解速度慢功耗高但兼容性好。 但话说回来,不是非得要硬解码的,对于音频来说,当今的手机,除非你要大量的音效运算或合成处理,否则一般的解码,用软解码就足够了,根本就不需要硬解,硬解是视频的事情。 对于aac的解码