OnlyInAmerica / HWEncoderExperiments

Deprecated ( See https://github.com/Kickflip/kickflip-android-sdk for my current work). Experiments with Android 4.3's MediaCodec and MediaMuxer
122 stars 61 forks source link

Crashes on Nexus 4 with Android 4.3 #1

Closed fyhertz closed 10 years ago

fyhertz commented 11 years ago

Hi there,

The app crashes when configure is called for the MediaCodec encoding video :( The color format you use is probably not supported on my phone :(

Anyway, that's not really why I'm writing to you :) I would like to test the AAC stuff, so how could I simply disable all the video encoding part of your code ? What should I comment out ?

I have tried to use the MediaCodec API to encode AAC myself, but for some reason I can't figure out, faac won't decode anything. I am basically feeding a MediaCodec with AudioRecord, and using the MediaMuxer to mux the track into an mp4 file. No error are reported by any of the APIs involved but it seems that the encoder is just outputting garbage :/ I have tried different objects types (AAC LC, AAC Main...) and it doesn't make any difference.

Have you encountered a similar problem ?

(I could not find your email anywhere)

Cheers, Simon

OnlyInAmerica commented 11 years ago

Hey hey!

I made a branch for you that shows plain and simple AAC encoding with samples from AudioRecord. I just verified it works on my Galaxy Nexus, see if it helps...

You're right about the ColorFormat, for most every phone besides the Galaxy Nexus and it's rare TI SOC you'll want COLOR_FormatYUV420PackedSemiPlanar.

Awesome work on libstreaming!

Cheers, indeed!

fyhertz commented 11 years ago

Awesome !

Works perfectly :) You probably saved me a loooot of time.

Many thanks !