Git Product home page Git Product logo

android-aac-enc's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-aac-enc's Issues

Missing files ?

Hi,
I'm getting compile errors because of references to

import com.todoroo.aacenc.R;

But no such file exists

Also in package com.todoroo.aacenc;
various errors due to references to R e.g.

    setContentView(R.layout.main);

"Pop" at start of file after conversion.

After encoding a wav to aac using this library there appears to be a "pop" sound at the start of the aac file that is not present in the original uncompressed file. You can clearly see this in the waveform:

Uncompressed:
image

Compressed:
image

Any ideas about why this is happening?

AACTrackImpl crashes when Track is longer than 11 seconds

Hi @timsu and others,
encoding to aac works like a charm, but it crashes at this part, when my track is longer than 11 seconds or something like 1024 Bytes:

            try {
                new AACToM4A().convert(TestWearActivity.this, aacFile, m4aFileString);
                Log.i(TAG, "File Saved!");
            } catch (IOException e) {
                Log.e(TAG, "error converting", e);
            }

Here's the stacktrace

04-14 11:43:11.386    7586-7672/com.myapplication W/linkerlibaac-encoder.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
04-14 11:43:11.678    7586-7672/com.myapplication W/System.errwell you got 274432
04-14 11:43:11.720    7586-7604/com.myapplication V/com.myapplication.common.InternetReachability$NetworkCheckTaskNetwork is available
04-14 11:43:11.720    7586-7604/com.myapplication V/com.myapplication.activity.MainActivityInternet is available
04-14 11:43:11.786    7586-7672/com.myapplication I/DefaultMp4BuilderCreating Mp4TrackImpl com.googlecode.mp4parser.authoring.tracks.AACTrackImpl@3948bde4
04-14 11:43:11.808    7586-7672/com.myapplication E/artInvalid capacity given to PushLocalFrame: 755
    --------- beginning of crash
04-14 11:43:11.809    7586-7672/com.myapplication A/libcFatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffffc in tid 7672 (AsyncTask #5)
04-14 11:43:11.915      181-181/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-14 11:43:11.915      181-181/? I/DEBUGBuild fingerprint: 'google/razor/flo:5.0.2/LRX22G/1649326:user/release-keys'
04-14 11:43:11.915      181-181/? I/DEBUGRevision: '0'
04-14 11:43:11.915      181-181/? I/DEBUGABI: 'arm'
04-14 11:43:11.916      181-181/? I/DEBUGpid: 7586, tid: 7672, name: AsyncTask #5  >>> com.myapplication <<<
04-14 11:43:11.916      181-181/? I/DEBUGsignal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xfffffffc
04-14 11:43:11.949      181-181/? I/DEBUGr0 00000000  r1 00000000  r2 00000000  r3 fffffaa0
04-14 11:43:11.949      181-181/? I/DEBUGr4 00000000  r5 00000043  r6 a4498080  r7 9928e610
04-14 11:43:11.949      181-181/? I/DEBUGr8 9928e670  r9 b4ffca64  sl 00000000  fp 137c5000
04-14 11:43:11.949      181-181/? I/DEBUGip b6fc79b8  sp 9928e4e8  lr b4ec079f  pc b4ec07a8  cpsr 68070030
04-14 11:43:11.950      181-181/? I/DEBUGbacktrace:
04-14 11:43:11.950      181-181/? I/DEBUG﹕ #00 pc 001c77a8  /system/lib/libart.so (art::JNI::PopLocalFrame(_JNIEnv*, _jobject*)+283)
04-14 11:43:11.950      181-181/? I/DEBUG﹕ #01 pc 000b5f2d  /system/lib/libart.so (art::CheckJNI::PopLocalFrame(_JNIEnv*, _jobject*)+56)
04-14 11:43:11.950      181-181/? I/DEBUG﹕ #02 pc 0001e0a1  /system/lib/libjavacore.so
04-14 11:43:11.950      181-181/? I/DEBUG﹕ #03 pc 00021985  /system/lib/libjavacore.so
04-14 11:43:11.950      181-181/? I/DEBUG﹕ #04 pc 00021c99  /system/lib/libjavacore.so
04-14 11:43:11.950      181-181/? I/DEBUG﹕ #05 pc 00271d63  /data/dalvik-cache/arm/system@framework@boot.oat
04-14 11:43:12.297      181-181/? W/debuggerdtype=1400 audit(0.0:12): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=7640 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
04-14 11:43:12.297      181-181/? W/debuggerdtype=1400 audit(0.0:13): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=7640 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
04-14 11:43:13.278      181-181/? W/debuggerdtype=1400 audit(0.0:14): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=7640 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
04-14 11:43:13.278      181-181/? W/debuggerdtype=1400 audit(0.0:15): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=7640 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
04-14 11:43:13.308      181-181/? W/debuggerdtype=1400 audit(0.0:16): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=7640 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
04-14 11:43:13.308      181-181/? W/debuggerdtype=1400 audit(0.0:17): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=7640 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
    --------- beginning of system

My PCM file has sample rate 44100Hz @ 16bit
The encoder is initialized with the following line of code:

encoder.init(128000, 1, 44100, 16, aacFileString);

It would be really great, if you could help me.

Greetings,
Frank

How to use

What is the reason for your project?
You didn't explain how to use, how to compile.
No inforation at all. Project is made for eclipse, gradle is not supported.

I pulled this in and I'm now getting a crash per 1024 samples:

03-07 15:42:31.151 5562 5562 F DEBUG : ABI: 'arm64'
03-07 15:42:31.151 5562 5562 F DEBUG : pid: 3395, tid: 5239, name: Thread-27 >>> system_server <<<
03-07 15:42:31.151 5562 5562 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
03-07 15:42:31.151 5562 5562 F DEBUG : x0 0000000000000000 x1 0000000000001477 x2 0000000000000006 x3 0000000000000008
03-07 15:42:31.151 5562 5562 F DEBUG : x4 2029613128207463 x5 8000000000000000 x6 0000007fa7ae3000 x7 0000000000000000
03-07 15:42:31.151 5562 5562 F DEBUG : x8 0000000000000083 x9 ffffffffffffffdf x10 0000000000000000 x11 0000000000000001
03-07 15:42:31.151 5562 5562 F DEBUG : x12 ffffffffffffffff x13 0000000000000000 x14 0000000000000000 x15 00018690d2803d98
03-07 15:42:31.151 5562 5562 F DEBUG : x16 0000007fa74d8ec8 x17 0000007fa7482828 x18 0000000000000000 x19 0000007f7d3d24f8
03-07 15:42:31.152 5562 5562 F DEBUG : x20 0000000000000006 x21 0000007f7d3d2450 x22 000000000000006e x23 00000000000003b0
03-07 15:42:31.152 5562 5562 F DEBUG : x24 0000000000000220 x25 0000007f84673020 x26 0000007f832b52ad x27 00000000000003ae
03-07 15:42:31.152 5562 5562 F DEBUG : x28 0000007f7cc6a020 x29 0000007f7d3d1200 x30 0000007fa747fcd0
03-07 15:42:31.152 5562 5562 F DEBUG : sp 0000007f7d3d11e0 pc 0000007fa7482830 pstate 0000000060000000
03-07 15:42:31.159 5562 5562 F DEBUG :
03-07 15:42:31.159 5562 5562 F DEBUG : backtrace:
03-07 15:42:31.160 5562 5562 F DEBUG : #00 pc 000000000006c830 /system/lib64/libc.so (tgkill+8)
03-07 15:42:31.160 5562 5562 F DEBUG : #1 pc 0000000000069ccc /system/lib64/libc.so (pthread_kill+64)
03-07 15:42:31.160 5562 5562 F DEBUG : #2 pc 0000000000023ea0 /system/lib64/libc.so (raise+24)
03-07 15:42:31.160 5562 5562 F DEBUG : #3 pc 000000000001c924 /system/lib64/libc.so (abort+52)
03-07 15:42:31.160 5562 5562 F DEBUG : #4 pc 0000000000012a9c /system/lib64/libaac-encoder.so (TnsDetect+1116)
03-07 15:42:31.160 5562 5562 F DEBUG : #5 pc 000000000000e76c /system/lib64/libaac-encoder.so (psyMain+2444)
03-07 15:42:31.160 5562 5562 F DEBUG : #6 pc 00000000000058dc /system/lib64/libaac-encoder.so (AacEncEncode+196)
03-07 15:42:31.160 5562 5562 F DEBUG : #7 pc 0000000000004e94 /system/lib64/libaac-encoder.so (voAACEncGetOutputData+172)
03-07 15:42:31.160 5562 5562 F DEBUG : #8 pc 0000000000003f34 /system/lib64/libaac-encoder.so (Java_com_android_server_AACEncoder_encode+396)
03-07 15:42:31.161 5562 5562 F DEBUG : #9 pc 0000000000e5673c /data/dalvik-cache/arm64/system@framework@[email protected] (offset 0xe15000)
03-07 15:42:34.038 2943 2943 E : debuggerd: worker process 5562 timed out
03-07 15:42:34.047 2943 2943 E : debuggerd: killing target 3395
03-07 15:42:34.202 3108 3108 E : eof
03-07 15:42:34.202 3108 3108 E : failed to read size

samplerate?

Apparently sample rate is the length(time in milliseonds) of the pcm recording and it is relevant to the .aac conversion. But somehow it has to be 8000!
This is not realistic, can you please explain this limitation so I can fork and fix this?

android 5.0 crash

android-aac-enc android 5.0 problem:
Fatal signal 11 (SIGSEGV), code 1, fault addr 0x82df8000 in tid 12653 (Thread-589)

RunTime Exception

When the file size is large, I see:
09-04 01:54:46.442: E/AndroidRuntime(2359): java.lang.RuntimeException: An error occured while executing doInBackground()
09-04 01:54:46.442: E/AndroidRuntime(2359): at android.os.AsyncTask$3.done(AsyncTask.java:278)
09-04 01:54:46.442: E/AndroidRuntime(2359): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
09-04 01:54:46.442: E/AndroidRuntime(2359): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
09-04 01:54:46.442: E/AndroidRuntime(2359): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
09-04 01:54:46.442: E/AndroidRuntime(2359): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
09-04 01:54:46.442: E/AndroidRuntime(2359): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
09-04 01:54:46.442: E/AndroidRuntime(2359): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
09-04 01:54:46.442: E/AndroidRuntime(2359): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
09-04 01:54:46.442: E/AndroidRuntime(2359): at java.lang.Thread.run(Thread.java:856)
09-04 01:54:46.442: E/AndroidRuntime(2359): Caused by: java.lang.RuntimeException: too many PopLocalFrame calls
09-04 01:54:46.442: E/AndroidRuntime(2359): at libcore.io.Posix.writev(Native Method)
09-04 01:54:46.442: E/AndroidRuntime(2359): at libcore.io.BlockGuardOs.writev(BlockGuardOs.java:196)
09-04 01:54:46.442: E/AndroidRuntime(2359): at java.nio.IoVec.doTransfer(IoVec.java:81)
09-04 01:54:46.442: E/AndroidRuntime(2359): at java.nio.FileChannelImpl.transferIoVec(FileChannelImpl.java:327)
09-04 01:54:46.442: E/AndroidRuntime(2359): at java.nio.FileChannelImpl.write(FileChannelImpl.java:505)
09-04 01:54:46.442: E/AndroidRuntime(2359): at java.nio.channels.FileChannel.write(FileChannel.java:716)
09-04 01:54:46.442: E/AndroidRuntime(2359): at com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder$InterleaveChunkMdat.getBox(DefaultMp4Builder.java:448)
09-04 01:54:46.442: E/AndroidRuntime(2359): at com.coremedia.iso.IsoFile.getBox(IsoFile.java:177)
09-04 01:54:46.442: E/AndroidRuntime(2359): at com.todoroo.aacenc.AACToM4A.convert(AACToM4A.java:40)

09-04 01:54:46.442: E/AndroidRuntime(2359): at android.os.AsyncTask$2.call(AsyncTask.java:264)
09-04 01:54:46.442: E/AndroidRuntime(2359): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
09-04 01:54:46.442: E/AndroidRuntime(2359): ... 5 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.