![]() Once you have the encoded frames available as OpenGL ES textures, you can perform various efficient transformations and effects in OpenGL shaders. You can achieve this with the help of a SurfaceTexture, which can then be used to create a Surface for the decoder. ![]() MediaCodec decoder will make the decoded frames available to OpengGL ES as a texture. MediaExtractor will extract the necessary information and encoded chunks from a video file, in the right format and size, so that it can be directly fed into a MediaCodec decoder. For this you can use the MediaExtractor class. To edit a video file and convert it to grayscale, you first need to extract the encoded frames. Editing Video Using Android's Standard APIs It allows you to connect 2 Android devices through USB OTG and perform many of the tasks that are normally only accessible from a developer machine via ADB directly from your Android phone/tablet. If you you're an Android enthusiast that likes to learn more about Android internals, I highly recommend to check out my Bugjaeger app. The code was tested on Android 6 Marshmallow (API level 23) and Pie (API level 28), but it should also work on Lollipop (API level 22). You can find the sample code related to this post on github. If something in this tutorial won't be completely clear to you, I also recommend that you check out these previous posts. This tutorial expands on the information from these previous posts and solves another part in the video processing puzzle. I already showed how to create a video from multiple input images and also how to add audio to existing video file in my previous posts. So if you're building some kind of Android video editing app, this tutorial might be something for you. In this post I would like to show how to convert an existing video file into a grayscale version using only the standard Android APIs without external libraries.Įven though the goal of the post is very specific, you can use the information for a multitude of video editing features. Used together with OpengGL ES, you get access to powerful APIs for manipulating and editing video files. Android's MediaCodec API offers functionality that allows you to decode and encode video and audio efficiently, possibly also with hardware acceleration. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |