aac

PCM to AAC conversion using mediacodec

岁酱吖の 提交于 2019-12-02 18:11:02
I am using a media codec class in Android (Jelly Bean) to encode PCM format to AAC. The file was encoded but no music player is able to play that file. I was not able to find any working code or proper documentation on the net. This is my code: public void doConvert() { new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... params) { try { int codecCount = MediaCodecList.getCodecCount(); for ( int i=0; i < codecCount; i++) { MediaCodecInfo info = MediaCodecList.getCodecInfoAt(i); Logger.getLogger(MainActivity.class.getSimpleName()).log(Level.INFO, info.getName());

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

只谈情不闲聊 提交于 2019-12-02 17:21:31
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 AVCaptudeAudioDataOutput 's audio frames: - (void)captureOutput:(AVCaptureOutput *)captureOutput

MediaExtractor does not understand audio/aacp streams

吃可爱长大的小学妹 提交于 2019-12-02 16:51:55
问题 I have my own MediaDataSource : class MyDataSource extends MediaDataSource { private static final String TAG = "MyDataSource"; private HttpURLConnection connection; private BufferedInputStream inputStream; MyDataSource(@NonNull URL streamURL) throws Throwable { this.connection = (HttpURLConnection) streamURL.openConnection(); this.connection.setRequestMethod("GET"); this.connection.addRequestProperty("Icy-Metadata", "0"); this.connection.connect(); int responseCode = this.connection

MediaExtractor does not understand audio/aacp streams

岁酱吖の 提交于 2019-12-02 09:29:46
I have my own MediaDataSource : class MyDataSource extends MediaDataSource { private static final String TAG = "MyDataSource"; private HttpURLConnection connection; private BufferedInputStream inputStream; MyDataSource(@NonNull URL streamURL) throws Throwable { this.connection = (HttpURLConnection) streamURL.openConnection(); this.connection.setRequestMethod("GET"); this.connection.addRequestProperty("Icy-Metadata", "0"); this.connection.connect(); int responseCode = this.connection.getResponseCode(); if (responseCode != 200) throw new IOException("http response code " + responseCode); for

Error when decode AAC with avcodec_decode_audio4()

眉间皱痕 提交于 2019-12-02 00:07:56
问题 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" {

Packing RAW AAC into m4a container?

痴心易碎 提交于 2019-12-01 18:14:30
问题 I have an Android app using FAAC to convert raw PCM into raw AAC, but now I don't know how it can be packed into m4a container. I've searched on the net and found a lot of info, but none of them solves my question. Most of them referring ffmpeg / mp4box command line, but what I need is to solve this in Android environment, which means either Java Eclipse, or JNI. Any hint please? 回答1: This AACEncoder Project on Github seems to be great! And it works for me. It actually has the ability encode

Java play AAC encoded audio ( JAAD decoder )

萝らか妹 提交于 2019-12-01 14:58:11
I have struggled with playing aac encoded audio files with Java a while now. We had a group project at the end of our first semester and wanted to have a background music and few soundeffects in there. At the end we used WAV files, as we couldn't get the AAC's to play. This weekend I gave it another try and searched along again, and have got a working code searched together from different sites, but nowhere was a complete working solution. For a more comfortable usage in future projects I made me a small library for aac playback. As it was hard to find th working solution, I wanted to share it

Java play AAC encoded audio ( JAAD decoder )

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 14:00:39
问题 I have struggled with playing aac encoded audio files with Java a while now. We had a group project at the end of our first semester and wanted to have a background music and few soundeffects in there. At the end we used WAV files, as we couldn't get the AAC's to play. 回答1: This weekend I gave it another try and searched along again, and have got a working code searched together from different sites, but nowhere was a complete working solution. For a more comfortable usage in future projects

how can I use html5 <audio> tag to play aac file?

試著忘記壹切 提交于 2019-12-01 04:03:48
<audio controls> <source src="xxx.aac" type="audio/aac"> </audio> I can get it to work in safari but doesn't work in chrome and firefox. any solution? Only Safari and IE support .aac. Here is what each browser supports: Internet Explorer 9.0+: .mp3, .aac Chrome: .ogg, .mp3, .wav, .aac* Firefox: .ogg, .wav Safari: .mp3, .aac, .wav Opera: .ogg, .wav * Chrome seems to support .aac but it isn't included in the list of officially supported file extensions. I suggest using both .ogg and .mp3 or .ogg and .aac to cover all bases. References HTML 5 Doctor - HTML5 audio, the state of play Chromium -

How do I programmatically convert mp3 to an itunes-playable aac/m4a file?

爷,独闯天下 提交于 2019-11-30 15:31:18
I've been looking for a way to convert an mp3 to aac programmatically or via the command line with no luck. Ideally, I'd have a snippet of code that I could call from my rails app that converts an mp3 to an aac. I installed ffmpeg and libfaac and was able to create an aac file with the following command: ffmpeg -i test.mp3 -acodec libfaac -ab 163840 dest.aac When i change the output file's name to dest.m4a, it doesn't play in iTunes. Thanks! FFmpeg provides AAC encoding facilities if you've compiled them in. If you are using Windows you can grab full binaries from here ffmpeg -i source.mp3