In my app I record a video and I wanna overlay the url of my company on the right bottom of that video. I record video with MediaRecorder and there is no problem with the recording, but for adding text to the video I haven't been successful. I searched and found some library like FFmpeg and JavaCV which let user overlay a text on the video but I don't know if there is any way for using them in Android. after that found OnPreviewFrame which returns each frame of the camerapreivew. I want to get all frames after user touch record button and draw text using canvas to each frame and then save all those frame together until recording video stops, and videos duration are fix and 15 seconds. Is it a good solution? if it is, how should I implement OnPreviewFrame function? I know how to draw canvas but I don't know how to convert data[] to the bitmap.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Handling ffmpeg library interface change when upgr
Using that method will be pretty heavy performance wise. I would definitely suggest you to take a deeper look into ffmeg. I believe that it is not that hard to use, and there are simple libs for ffmeg without hustle with NDK. Take a look at this library and check if there is function that you need available.
This command would be something that you are looking for.
If you still want to use something else than ffmeg I would suggest you to take a look at MediaMetadataRetriever
This method would be something that you could use. It gives you bitmap to draw on. But still it is going to be slow as hell. I tried do create gifs using this method, and after some time went back to ffmeg.
Hope it helps.