FFmpegMediaMetadataRetriever icon indicating copy to clipboard operation
FFmpegMediaMetadataRetriever copied to clipboard

Implement MediaDataSource please

Open salememd opened this issue 8 years ago • 6 comments

I'm seeking to load a video from Byte array, MediaMetadataRetriever have the ability to do that by using setDataSource(MediaDataSource dataSource) any alternative available in FFmpegMediaMetadataRetriever?

salememd avatar Dec 10 '17 13:12 salememd

I need this too, I want to get a frame of encrypted video (CipherInputStream)

AvatarQing avatar Jan 07 '18 04:01 AvatarQing

@salememd Did you resolve this issue?

HBiSoft avatar Jan 28 '18 10:01 HBiSoft

@HBiSoft I dropped FFmpegMediaMetadataRetriever I used MediaCodec & ImageReader to grab frames it's working well MediaCodec uses MediaExtractor which is support MediaDataSource https://developer.android.com/reference/android/media/MediaCodec.html

salememd avatar Jan 28 '18 11:01 salememd

@salememd Can you post your solutions using MediaCodec & ImageReader to grab frames. I don't want to built and include ffmpeg only to get the frame.

Thamizhan avatar May 04 '18 11:05 Thamizhan

@Thamizhan hope this helps you VideoPreview class uses VideoProcessor class and implements OnImageAvailableListener which will be triggered when a frame available to process

VideoProcessor uses MediaCodec class to decode video you shouldn't change VideoProcessor class, just customize your VideoPreview

https://gist.github.com/salememd/e78bb82559585239ee6f9128b10913a4

this video shows how I was able to grab frames from video and preview them on surface using the above code https://www.youtube.com/watch?v=FgQzLKTuAzY

salememd avatar May 04 '18 14:05 salememd

@salememd Late reply... The problem I have is that I don't want to display the image on the surface, I would like to save the Surface as a Bitmap on the device.

HBiSoft avatar Sep 09 '18 12:09 HBiSoft