Android : Capture current frame from streaming video - android

I made a video player by TextureView and Mediaplayer. And I want to capture current frame. I found some questions about this. But They deal with capturing video from local video file. But I need capturing current video frame from streaming video. How can i do this?
Thanks!

Related

how to tik tok record video in partistions with switch camera and merge after recording in android

I am trying to create video recording functionality like tik tok (musically) application. In which when i touch and hold recording button then video will be recorded and after release button video recording pause not stop and user also switch camera while recording video. The video will be fixed duration. After complete video recording the whole video will be merge.
But When i record video from front camera then video is flipped and after merge video, the orientation is change. I am merging the videos using mp4parser library. How to implement this functionality?

Record video with text/image over camera(Surface view or Texture view)

I m working on a project, where I need to record video from camera. At the time of recording we are showing some text over screen. But we are not able to record that text along with preview part. Is this posible to record both.
I am using https://github.com/googlesamples/android-Camera2Video example to record video.
Please help.
I actually don't think that's possible. You can fetch video frames from a camera preview, but there's no good way to encode them back to video. The MediaRecorder can only record the actual direct camera input into a video file.
I will suggest you to look at MediaCodec and MediaMuxer
Also, see this post if you can use ffmpeg.

Is there a way of playing a video with a alpha channel on android?

I have a set of video animations with an alpha channel. I would like the user of the android app to record a video and play the animation that overlay the camera view at the same time. I have searched the Internet but didn't find any solution to achieve this. Have you any ideas of how that can be achieved?
For Preview:
You could try using opencv to read the video frame by frame and then overlay it with the camera frame and display it on a textureview.
[EDIT]: This doesn't work since opencv on android doesn't have the ability to extract frames from a video, as there is no native ffmpeg support.
For Recording:
You cannot record video this way and your best bet is to use ffmpeg to overlay the animation video on the recorded video.
Opencv4android: http://docs.opencv.org/2.4/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html
Read Video frame by frame: (http://answers.opencv.org/question/5768/how-can-i-get-one-single-frame-from-a-video-file/)
Blending frames on opencv: (http://docs.opencv.org/2.4/doc/tutorials/core/adding_images/adding_images.html)
FFFMPEG on Android: https://android-arsenal.com/details/1/931

get frame rate of saved video file programatically android

I am using Media codec and I am saving the video which is fine but when I tried to encode this video I dont know on which frame rate I will get the frames and also while converting images to video.

Capture video from playing video on Android

Is it possible to capture video from a playing video (not from the camera) on Android? I mean, that it records a video from surface video output.
As far as I know, mediaRecorder can record it only from Camera. But, I'm trying to trim a video for a specific range while it plays this video.
Is it possible?

Categories

Resources