4

Part of a web application I am developing requires the ability to capture still images from a Flash or HTML5 video playing with in a browser.

Is there a Python library out there that could help me along with this task?

UPDATE

Actually, users of this web app will also have to have the ability to

  1. Draw a crop box on top of the Flash/HTML5 video player
  2. Be able to resize that box if necessary
  3. Capture the image with in the crop box frame
  4. Have that image be saves and sent to the server

Also, this video image crop/capture tool will also have to be restricted to the perimeter of the video frame. I don't want users getting confused and potentially capturing an image outside of the video frame because all we are concerned about is the content of the video.

2 Answers2

1

What about capturing it inside Flash and sending it as BiteArray to the server?

daniel.sedlacek
  • 8,129
  • 9
  • 46
  • 77
  • well the caveat is that the Flash videos the web app users will access are not owned by me so I will not be able to program in that functionality into the Flash player. Plus what about HTML5 video? What I would really need is a tool that can simply look at the video and take screen captures of certain frames which will be selected by the user. Actually its a bit more complex so I will update my question with additional details. –  Nov 09 '10 at 15:28
0

If you know Python, http://pyjs.org could be useful.

EDIT I just saw there's "Python" written on the title, so you obviously know Python. My bad, i'm overtired.

Jorge Guberte
  • 10,464
  • 8
  • 37
  • 56
  • Jorge I checked the demo section of Pyjamas but could not find an example that would solve my problem. Do you know Pyjamas well? If so can you point out the functions that would be able to help me? –  Nov 10 '10 at 04:18
  • No, i don't know it very well, unfortunately. But something ocurred to me, independently on Pyjamas... when you wish to take the screenshot, get the coordinates (time&space) and send to a Python script on the server-side. From that you fetch a still from the video and crop it using an image library. You then won't need to send the image to the server, just the parameters, and the server processes it. I have a feeling it could work. – Jorge Guberte Nov 10 '10 at 05:49
  • Jorge Well I still have quite a bit to learn but yeah, it sounds like a simple and elegant solution that I originally thought might be possible but, since I do not have that much experience I had to ask. Thanks :) –  Nov 10 '10 at 14:40
  • No problems. I'm not very experienced either, but, well, we'll get there. ;) – Jorge Guberte Nov 11 '10 at 02:00