Private static final int AUDIO_FORMAT = AudioFormat. Cmd output would just pulse on momentarily, and wouldn’t stay on for the duration of the motion. Here is what logcat has to say when I run that command: 12-04 20:14:14.401 4520 4524 I OMXClient: IOmx. If you didn’t include the seal-in circuit around the. Encoder failed (err-38) Stopping encoder and muxer. Private static final int CHANNEL_CONFIG = AudioFormat.CHANNEL_IN_MONO john A seal-in is like a flip-flop circuit in electronics, or a memory bit in a computer. Private static final int SAMPLES_PER_FRAME = 1024 Fixed the workflow for adding sound and animating to sound. Private static final int SAMPLE_RATE = 44100 Now create great stop motion movies and time lapse videos also on your iPhone - Remember flip books They are a fun way to take your animation from the virtual into the physical world, ideal for school assignments. Private static final String AUDIO_MIME_TYPE = "audio/mp4a-latm" Private SurfaceTextureManager mStManager (Update: as of API 21, BUFFERFLAGSYNCFRAME is deprecated in favor of BUFFERFLAGKEYFRAME. The sync frames will have the BUFFERFLAGSYNCFRAME flag set. Private static final int BIT_RATE = 2000000 Make sure you are passing all of the MediaCodec.BufferInfo values through to the MediaMuxer - that's where the flags are. Private static final int IFRAME_INTERVAL = 10 // 5 seconds between I-frames Private static final int FRAME_RATE = 15 // 30fps Private static final String VIDEO_MIME_TYPE = "video/avc" // H.264 Advanced Video Coding Private static final int TRACK_COUNT = 2 * Class for recording a reply including a text message. Import static .Preconditions.checkNotNull It does not work (the generated file is not valid), but if I comment one of the threads (either audio or video), it works ok. It spawns 2 threads for recording audio and video. I wrote a main class that performs the encoding. I use OpenGL to overlay text on the image while recording. Below method almost works - MediaMuxer do NOT respect MediaFormat.KEY_WIDTH and MediaFormat.KEY_HEIGHT - extracted File is "re-compressed", weight is a bit smaller, but resolution is the same as in original video File.I'm trying to encode video from camera and audio from microphone using MediaCodec and MediaMuxer. So I've decided to use native Android ways to do this, MediaMuxer and MediaCodec - they are available from API18 and API16 respectivelly (older devices users: sorry but they also often have "lower-res" camera). No wai! (12 Mb to 1 Mb is nice result, but still too many flaws) on my pretty fast almost-current flagship device whole process lasts about length_of_video*4 seconds and also this lib weight is 9 Mb, this amount increases my app size. I'm looking for efficient way to reduce some video weight (as a File, for upload) and obvious answer for that is: lets reduce resolution! (fullHD or 4K not needed, simple HD is sufficient for me) I've tried lot of ways which should work through lot of APIs (needed 10) and best way was using android-ffmpeg-java, BUT.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |