aac

How to encode audio to AAC with profile FF_PROFILE_AAC_LOW

我只是一个虾纸丫 提交于 2019-12-12 03:24:41
问题 I try to encode audio to AAC with profile FF_PROFILE_AAC_LOW by the following settings. oc_cxt->profile = FF_PROFILE_AAC_LOW; Also from the output of av_dump_format , I got this Metadata: encoder : Lavf57.36.100 Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s But the output is different. Everything is ok, except the output is AAC , not AAC (LC) . By using ffprobe to detect, the output information is $ ffprobe o.m4a ... Stream #0:0(und): Audio: aac (mp4a /

How to recognize the audio stream format?

走远了吗. 提交于 2019-12-12 00:33:57
问题 Here I have the code which records a audio stream to file. The problem is I'd like to save this file with correct file extension (mainly .mp3 and .aac). How can I achieve this? URLConnection conn = new URL(StringUrls[0]).openConnection(); InputStream in = conn.getInputStream(); BufferedOutputStream bufOutstream = new BufferedOutputStream(new FileOutputStream(new File(env.getExternalStorageDirectory()+"/temp.file"))); byte[] buffer = new byte[4096]; int len = in.read(buffer); while (len != -1)

AVAudioRecorder Losing Last Seconds

混江龙づ霸主 提交于 2019-12-11 23:35:40
问题 I'm using AVAudioRecorder to record an audio file of varying length with the following configuration: - (AVAudioRecorder*)recorder { if(!_recorder) { // Set the audio file NSArray *pathComponents = [NSArray arrayWithObjects:[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject], @"ExamTranscript.m4a", nil]; self.soundFileURL = [NSURL fileURLWithPathComponents:pathComponents]; // Define the recorder setting NSMutableDictionary *recordSetting = [

Merge MDAT atoms of MP4 files

允我心安 提交于 2019-12-11 16:46:46
问题 I have a series of MP4 files (H.264 video, AAC audio, 16KHz). I need to merge them together programmatically (Objective-C, iOS) but the final file will be too large to hold in memory so I can't use the AVFramework to do this for me. I have written code which will do the merge and takes care of all of the MP4 atoms (STBL, STSZ, STCO etc.) based on just concatenating the contents of the respective MDATS. The problem I have is that while the resultant file plays, the audio gradually gets out of

Verify video encoding is H.264

只愿长相守 提交于 2019-12-11 10:05:21
问题 I need to verify that a video file is (in Java): Video is H.264 Encoded Audio is AAC Encoded I've looked into JMF and Xuggle. Xuggle makes it easier to load and decode the file and turn it into another format, but I've not been able to figure out how to determine the encoding of the file that I've loaded as of yet. So Im wondering if Xuggle has the capability to simply return the type of Video & Audio encoding a file has or do I need to read the bits of the file to determine this myself? If I

How to create an audio file metadata header if I am streaming data to icecast?

牧云@^-^@ 提交于 2019-12-11 07:55:08
问题 How do I send the metadata header to the icecast server ? I am recording in AAC and streaming it to the icecast server through ios but the file shows corrupt . I suspect that the metadata needs to be added to be able to play a file. How do i send the metadata ? SHould i send it as a string ? What should be the format ? 回答1: The metadata is not required for a stream to function. If your data is corrupt, you are either encoding it wrong or are sending the wrong Content-Type header. That being

ios fdk-aac pcm to aac sample

匆匆过客 提交于 2019-12-11 06:55:46
问题 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,

静态编译ffmpeg

我只是一个虾纸丫 提交于 2019-12-10 15:31:40
静态编译ffmpeg 这两天折腾了一下完全静态编译ffmpeg,期望通过这种方式实现编译出来的ffmpeg能够在各个linux发现版上运行。进而可以延伸到编译出来完全静态的依赖ffmpeg库的应用程序,从而简化产品在各个linux发行版的产品编译和部署区分,减少开发和维护成本。 经过尝试,最终确实编译出来完全静态的ffmpeg,但是也发现了隐患,具体在"一些问题"中描述。所以,我对完全静态编译持保留意见,需要根据实际的使用情况来定。下面的文字,就是我整理的本次尝试的要点了。 1. 静态编译 首先,查看一下之前编译出来的ffmpeg的动态库链接情况。可以看出它链接了许多动态库,这些库有些是系统自带的,有的需要自己安装。 [root@root tmp]# ldd ffmpeg linux-vdso.so.1 => (0x00007fff133fe000) libm.so.6 => /lib64/libm.so.6 (0x00007fb094f81000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb094d65000) librt.so.1 => /lib64/librt.so.1 (0x00007fb094b5c000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fb094958000)

Muxing a H.264 Annex B & AAC stream using libavformat with vcopy/acopy

我与影子孤独终老i 提交于 2019-12-10 11:52:29
问题 I'm doing some integration work with video (H.264) and audio (AAC) from an IP camera. I've made a bit of progress and I can store the video & audio streams individually with the ability to play it back using VLC player. The H.264 is being stored in Annex B format and the audio is using an adts formatted file. I'm now trying to mux the streams into an MP4 file without doing any decoding or encoding but so far haven't managed to find the answer. I can do this manually with ffmpeg: ffmpeg -i

OMX.google.aac.encoder do not work in MediaCodec when encode pcm to aac

落花浮王杯 提交于 2019-12-10 11:50:54
问题 I am encoding pcm track of wav file into aac using MediaCodec on Android 4.1, on my S3, there are two encoders, OMX.google.aac.encoder and OMX.SEC.aac.enc, the first one is used if call createEncoderByType, but it does not work, the output can't be played(has no sound), if call createByCodecName with "OMX.SEC.aac.enc", it works. While on my HTC ONE, there is only "OMX.google.aac.encoder", and does not work. I think my code has no problem, because it was copied from google, and the second