Screen Capture and native.newVideo not playing well together (Video Thumbnail)

I have been trying all the different APIs for grabbing the screen and no matter what I do the native.newVideo content is not part of the capture.

Is there no way to literally capture the screen?

Trying to create a Thumbnail of a Video and not having any luck.

Any bright idea on this or any other ideas on creating a Video Thumbnail would be greatly appreciated.

Cheers,

m

Corona’s screen capture APIs only capture what is rendered in OpenGL, such as your display objects.

It *cannot* capture native UI such a video, text fields, text boxes, web views, maps, etc.

If you’re trying to capture the screenshot for marketing purposes, then you should use Apple or Google’s tools to do so.  For example, you can capture an Android device’s screen that is connected to your PC using the Android SDK’s “Monitor” or “ddms” tool while the device is connected via USB.

   http://developer.android.com/tools/debugging/ddms.html

And Apple provides instructions on how to capture an iOS device’s screen here…

   https://developer.apple.com/library/ios/recipes/xcode_help-devices_organizer/articles/capture_screenshots_from_device.html

Well i’m trying to capture a thumbnail of a video inside the app.  Your saying that there is no way to get a native screen capture of the screen so that I can clip that down to what I need … Inside of the app.

Not a marketing problem

If there is no such thing it certainly would be nice to have a API call something like

native.screenCapture -> returns an image that we can then do what we want with it.

Corona does not provide an API to capture a video frame.

You can attempt to do so via native code and Corona Enterprise, but I think that’s more trouble than it’s worth.

I don’t need to have Corona Capture a video frame.  I just need Corona to be able to take a native.screenShot or similar where everything is captured.  I can get the frame of the image that I need from that.

Certainly something like native.screenShot would have value for others developing apps, etc.  

Thanks for your consideration.

There are two seemingly relevant requests on our feedback site:

http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/3647148-screen-recording

and

http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/4784494-capture-screen-from-simulator

While the are different, they are the same.  I would suggest voting up one of these two topics to show interest in this feature.  The first one has the most votes.  I’m not sure in good faith I can combine the two, since one is asking this for the simulator, others are wanting it for the device.

Rob

>> I just need Corona to be able to take a native.screenShot or similar where everything is captured.

Hate to rain on the parade here, but I’m pretty sure this isn’t possible.  The problem is that the native Android APIs for capturing UI won’t capture anything from a threaded “SurfaceView”, which is what Google/Android uses to render OpenGL and Video content.  Meaning that OpenGL rendering and VideoView playback is not performed via the application’s main UI thread, but on a separate thread, and composited to a single surface by the Android operating system outside of the application.  This makes capturing a mix of OpenGL/VideoView and UI impossible by the native application developer.  Note that the same is true on WP8 as well.  (I’m not an iOS developer, so, I can’t comment as to what’s possible on that platform.)

So, I suggest that you save your vote.  I’m pretty sure what you want can’t be done.  You’ll need to come up with a different solution on your end for video thumbnails.

ok so why when i run my little test app on the android and I take a screen shot (holding down the appropriate droid buttons) i get exactly what I want.  A screen shot that includes the native.newVideo content that is currently displayed.

That is what I would expect from corona’s soon to be released:  native.screenShot

Google created the Android operating system and has access to private/internal APIs that 3rd party native app developers do not.

If you don’t believe me on this, then Google it.  Check stackoverflow.

Well i do believe you … i am officially rained on :frowning: … how about opening a video file and parsing out a frame … sounds nightmarish.

Sorry.  Wasn’t trying to be difficult.  Just honest.  The 3rd party screenshot taking apps that I’ve seen require the device to be *rooted* in order to get access to Google’s private/internal APIs.  Otherwise, I’m not sure how else you can do it.

Now, there are native APIs to capture a frame from a VideoView.  This is useful for apps that create their own videos via the camera.  You can submit a feature request for this if you want.

Corona’s screen capture APIs only capture what is rendered in OpenGL, such as your display objects.

It *cannot* capture native UI such a video, text fields, text boxes, web views, maps, etc.

If you’re trying to capture the screenshot for marketing purposes, then you should use Apple or Google’s tools to do so.  For example, you can capture an Android device’s screen that is connected to your PC using the Android SDK’s “Monitor” or “ddms” tool while the device is connected via USB.

   http://developer.android.com/tools/debugging/ddms.html

And Apple provides instructions on how to capture an iOS device’s screen here…

   https://developer.apple.com/library/ios/recipes/xcode_help-devices_organizer/articles/capture_screenshots_from_device.html

Well i’m trying to capture a thumbnail of a video inside the app.  Your saying that there is no way to get a native screen capture of the screen so that I can clip that down to what I need … Inside of the app.

Not a marketing problem

If there is no such thing it certainly would be nice to have a API call something like

native.screenCapture -> returns an image that we can then do what we want with it.

Corona does not provide an API to capture a video frame.

You can attempt to do so via native code and Corona Enterprise, but I think that’s more trouble than it’s worth.

I don’t need to have Corona Capture a video frame.  I just need Corona to be able to take a native.screenShot or similar where everything is captured.  I can get the frame of the image that I need from that.

Certainly something like native.screenShot would have value for others developing apps, etc.  

Thanks for your consideration.

There are two seemingly relevant requests on our feedback site:

http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/3647148-screen-recording

and

http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/4784494-capture-screen-from-simulator

While the are different, they are the same.  I would suggest voting up one of these two topics to show interest in this feature.  The first one has the most votes.  I’m not sure in good faith I can combine the two, since one is asking this for the simulator, others are wanting it for the device.

Rob

>> I just need Corona to be able to take a native.screenShot or similar where everything is captured.

Hate to rain on the parade here, but I’m pretty sure this isn’t possible.  The problem is that the native Android APIs for capturing UI won’t capture anything from a threaded “SurfaceView”, which is what Google/Android uses to render OpenGL and Video content.  Meaning that OpenGL rendering and VideoView playback is not performed via the application’s main UI thread, but on a separate thread, and composited to a single surface by the Android operating system outside of the application.  This makes capturing a mix of OpenGL/VideoView and UI impossible by the native application developer.  Note that the same is true on WP8 as well.  (I’m not an iOS developer, so, I can’t comment as to what’s possible on that platform.)

So, I suggest that you save your vote.  I’m pretty sure what you want can’t be done.  You’ll need to come up with a different solution on your end for video thumbnails.

ok so why when i run my little test app on the android and I take a screen shot (holding down the appropriate droid buttons) i get exactly what I want.  A screen shot that includes the native.newVideo content that is currently displayed.

That is what I would expect from corona’s soon to be released:  native.screenShot

Google created the Android operating system and has access to private/internal APIs that 3rd party native app developers do not.

If you don’t believe me on this, then Google it.  Check stackoverflow.

Well i do believe you … i am officially rained on :frowning: … how about opening a video file and parsing out a frame … sounds nightmarish.