I am using Android MediaCodec : ExtractMpegFramesTest for grabbing frames from video but now i am not getting any useful information on google for How can i create video from frames.png in android?
You can try INDE Media Pack - https://software.intel.com/en-us/articles/intel-inde-media-pack-for-android-tutorials
It has transcoding\remuxing functionality as MediaComposer class and several sample effects like JpegSubstituteEffect - it shows how substitute video frame by a picture from jpg file. You can take black video as a refefence and put images on it with a possibility to set duration, add audio track with help of audio effect etc.
Related
Hello I am recording audio using MediaRecorder and save it in MP4 format. and upload to the server. as well record video as MP4 using camera and upload to server.
So while I am receive my uploaded item from server as uploaded url list. and I am playing all it in VideoView. video and audio play good. now here is the thing while I am playing video it's display video frame on video view but while playing audio it's black. basically audio and video file extension are MP4 so I can't make different while adding it in to VideoView other wise I'll add imageview and display some default image and hide VideoView.
so is there any way to record audio with cover image so while I am playing it in Video view so it display that cover image...
I know that using ffmpeg we can do this but I got lots of error while compiling it in my windows pc. so is there any way to add cover image while record audio with pure android api? sorry for bad english.
I google everything but I can't find any solution for convert audio file to video file with using image. So I have to go with FFMPEG.
So I add WritingMinds java FFMPEG in my project using gradle dependency. Then convert MP4 audio with cover image into the MP4 video.
There are some limitation in this precompile library. like it not work in android 24 and some commands like -speed, cpu-used, -deadline which are most important for all the operation(But still we can perform other operation). there are some disadvantage also like slow speed, and some features which required for specific operation are not include in the compile library. (So I gave advice to compile your own ffmpeg library for android project in linux or mac pc(windowns have lots of issues)).
I hope this will help someone who's this type of scenario :)
I am struggling with recording and editing videos. For editing, I found a useful library in Android named ffmpeg4Android. However, I am still get stuck in recording video. Here is what I want:
1/ Add text or images in video while recording
2/ Add filter while recording video
I found there is a library GPUImage for Android but it has only some examples related to taking a photo, not to recording video)
Please let me know if you have any ways or any suggested libraries which can do it.
Thank you in advance!
Links which I read when researching:
Add overlay while record video on Android
How to Record video with GPUImage?
FFMpeg add text to actual video file after recording in Android
You can add an overlay image on video using a blend filter.
You cannot add text directly but you can add the text to the image writing on a canvas.
android-gpuimage library does not natively support video recording but you can try using the android-gpuimage-videorecording library. It is a fork of the gpu-image for android that provides also the video recording functionality
android-gpuimage-videorecording
see the GPUImageMovieWriter class
It should point you in the right direction for developing your own video writer on top of GPUImage.
The idea is to:
draw on current screen surface
switch to encoder input surface and draw previous frame buffer again on it
switch back to screen surface
other useful links: EGL surface helper, Media encoder
I am using below demo for creating slow and fast motion video in android application.
https://github.com/google/grafika
I am able to play slow and fast motion video in application but now i want to export this video to SD card.
I use TextureView to show video in app.
I use this java file to control speed of video.
https://github.com/google/grafika/blob/master/src/com/android/grafika/SpeedControlCallback.java
How can i do this?
any help will be appreciated.
Hi you have to use a MediaMuxer, call AddTrack for the video track and write the data to this track to the muxer after encoding each frame. You can see some examples in grafika page, one of them could be this: https://github.com/google/grafika/blob/master/src/com/android/grafika/ContinuousCaptureActivity.java (here you canhow to do both displaying on screen and recording on SD)
and another one: https://github.com/google/grafika/blob/master/src/com/android/grafika/CameraCaptureActivity.java
Also you can find more examples here:
http://www.bigflake.com/mediacodec/
Thanks
I am working on video processing app where i have to draw some shape on video like circle,line etc on video and save as mp4 file so when user play again video shows shapes as part of video, in sort i have to extract frames from video, modify them then replace the frames with edited frames.
Please let know how can i achieve this using without third party library or with it.
Thanks in advance
Is it possible to create video of series of Images present on SdCard using MediaCodec? if yes, can anyone share me the link?
I want to import images from sdCard and create video from those images, any suggestions???
I want to do this programmatically. I've tried using jcodec library but the process is very slow and I want to fasten up a little bit more.
Is there any chances that MediaCodec can do that in my ADT and in much faster way.
Importing images from SdCard --> making a good quality .mp4 video (faster than jcodec way).
You can try INDE Media Pack - https://software.intel.com/en-us/articles/intel-inde-media-pack-for-android-tutorials
It has transcoding\remuxing functionality as MediaComposer class and several sample effects like JpegSubstituteEffect - it shows how substitute video frame by a picture from jpg file. You can take black video as a refefence and put images on it with a possibility to set duration, add audio track with help of audio effect etc.