android media codec Unable to instantiate a decoder for type 'video/mp4' -


working on implementing mediamuxer class. takes inputs mediacodec class (one audio , 1 video). throws error when trying encode "video/mp4"

code:

string mime = mimetypemap.getsingleton()                 .getmimetypefromextension("mp4");         codec = mediacodec.createencoderbytype(mime); 

error:

unable instantiate decoder type 'video/mp4' 

notice error decoder , call create encoder.

i figure out in minute, here else runs this.

after lot of fumbling around found documented, android recomended media formats, following dbro , fadden's examples, mediamuxer works taking following types of mediaencoder inputs create elmetary h.264 stream , mux mp4 file:

private static final string video_mime_type = "video/avc"; private static final string audio_mime_type = "audio/mp4a-latm"; 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -