5

I working on android.I am working on an application where I need to programatically access the frame buffer /dev/graphics/fb0 of a video in android.I have researched lot and was able to find a resource that explains how it can be done through shell command https://www.youtube.com/watch?v=BUPPyR6VasI but I want to achieve the same programatically. Any one having any idea how can it be achieved.I would really appreciate any ideas..

Thanks

munna Sharma
  • 53
  • 1
  • 8

1 Answers1

0

Reading enter link description here, it looks like fb0 has restricted permissions for security reasons -- were permission not closed an app could spy on user activities outside a given app. Your app won't programmatic have access to it, on non-rooted phones anyway. If you need screen shots of your app, the usual approach is to get a bitmap from a parent layout in your app using this pattern. That is allowed.

Community
  • 1
  • 1
JASON G PETERSON
  • 2,193
  • 1
  • 18
  • 19
  • :Thanks a ton for replying ...OK I get your point regarding thefb0 thing...and i am now instead trying to take the screen shots continously of the video as long as it is playing and save those screen shots as images...i am able to take the screen shot just for once not continously...can you please help me with achieving this?? – munna Sharma Dec 13 '14 at 11:44
  • I actually want to extract the image frame buffers from the video file for the later processing and I am stuck at this.. – munna Sharma Dec 13 '14 at 11:58
  • I was thinking you were trying to take a screenshot video. If you're wanting to extract bitmaps from an existing video file, explore using a library like ffmpeg (asked a question about it here: http://stackoverflow.com/questions/17483764/extracting-bitmaps-from-video-without-resorting-to-ffmpeg). ffmpeg will do this but it's a challenge to incorporate for this simple use case. `VideoPlayer` doesn't seem to offer methods for frame grabbing, so you're left to big libraries like ffmpeg. Perhaps post more details about your exact challenge, and you might get some wiser responses. – JASON G PETERSON Dec 13 '14 at 13:11
  • If the `getBitmapBackground` is sort of working for your case, you could explore putting the commands into timer that runs inside an `AsyncTask`. Something like this: http://stackoverflow.com/questions/17654982/periodically-executing-asynctask-class-object-updated. – JASON G PETERSON Dec 13 '14 at 13:15
  • Thanks sir for your replies..My exact challenge is that I have to search for a marker or a string from a live streaming video over the smart TV which is connected to the STB via HDMI cable...To search for the string i have to grab the frame buffers of the video..So this is my first step to grab the frame buffers and for the next step I need to process those buffers for finding that string... – munna Sharma Dec 18 '14 at 04:54
  • Moreover I am working on windows is it possible to use ffmpeg on windows?? – munna Sharma Dec 18 '14 at 06:38