Home / Topic / Using video

Using video

Viewing 9 posts - 1 through 9 (of 9 total)
  • Anonymous
    #9287

    From time to time users ask me about what can be done with video (several Kwik users come from After Effects/Premiere world). As i was discussing this topic with one of them this week, I decided to share the conversation here as well. Feel free to join!About Videos:Currently Kwik only works with full page (original Corona implementation) videos (you need a button who triggers a video, who opens full screen). Few months ago Ansca updated the video API, which will be reflected in the next version of Kwik (K2) but not in the current one. Considering K2 is a little far from release, I will do my best to help you with the new implementation, if you go this route. In the new API, you can have a video in any part of your screen and it does not need to be started by a button (for example, you may set a video to play as soon as a page start, with sizes of 320x480, in position 0,0). This offers much more control. With this, you can have a video occupying part of your screen and buttons in the other parts (again, you cannot have any layers on top of a video window).I don't know how familiar you are with other apps (if you are not, I suggest you to download/buy a few ones to get some inspiration) but several designers have been creative while using video. Take Morris Lessmore for example: each page start with a video which transitions to an interactive area (although people think you are playing with the video, what happened was the video was removed at the end, showing the last frame of it (a layer behind) which have all the interactivity. This could be an idea for you. Have I tested if it works with Corona? Not yet, but I believe so.Another option for you is to work like the Stella and Sam : some pages are video, other are images with interactions.The usual path for current Kwik users is to design their apps to avoid videos, due their lack of interactivity. It requires to think deeply on the transition from a media (video) which is really different than a "regular" app.Regarding layers and sprite sheets, there is no limitations for any of them. You can have as many layers and/sprite sheets per page but you need to be conscious that large image files use more memory (so, it is always important to optimize them after export). You mentioned the start effect (again, without seeing it is hard to provide suggestion) as a potential difficult one, maybe it can be accomplished with a movie clip. For example, Sparky the Shark has a beautiful rainy scene. The perfect rain was made with 6 images running as a movie clip. For most eyes (especially children), mine included, the effect is perfect.About music, same tips as images: optimize them as much as possible, especially if you plan to use the Sync text and audio feature, which requires the full song being loaded into memory before to start.Using Kwik for the first time in a project like you describe can be a real challenge. My suggestion (to everyone) is, start with something simple (a test project). Get familiar with the product and learn how to "trick" the system. I have seen several apps made with the plugin where I had to ask the designer: "is it really 100% Kwik? How did you do that?". The more you know about the product limitation, the more you will find workaround for them. Also, whenever is possible, script your story. I gave a session on that at http://www.youtube.com/watch?v=Q5HdI81o2I4&list=UUynBxZa1jQOx1uza0BboEXg&index=3&feature=plcp (it may give you some more ideas).Alex

    jamilebilbaosd7083
    Participant
    #12112

    We are currently in development of an interactive book with lots of character animation. Its a bit like an interactive 3D animated movie. Our characters use a lot of screenspace ( close-ups ) and we think that spritesheets are impractical and Movie clips will use too much memory.Because we render all characters with background, it should be easy to crop all videos to custom sizes and insert them on a background png in Kwik matching the rendered position.Some character animations should start with timers , others with autostart on pagecall and others on touch events.And everything should be repeatable. Is that possible? And what about memory management, if I crossfade to next or previous page with other videos?What happens to videos on a Ipad 3 Retina? A video bigger than HD resolution is nonsense.  Maybe you can help us a littlebit?

    Anonymous
    #12113

    I see a few issues with your suggested approach:- Kwik currently uses the old Corona video API, meaning you cannot have video in a window at this moment (you need to attach a video to a button. when it is clicked, it will open the video in a full screen on top of the "kwik" page;- If you decide to manually code the video part using the new API (it will be available in K2 but not in K1), I strongly suggest you to test it. Video will always appear on top of everything (so, no animations or buttons, anything, will appear on top of the video window) and it may be a challenge to match positions;- As mentioned in the previous comment, you will be in charge of memory handling when changing pages, due the manual coding;- never tried video on the new iPad and really don't know how the scale will work in this case.Do you have coding skills at your company? If so, your team can quickly test the scenarios you are planning. If not, let me know and I will point you some postings from Ansca on the new video API.

    jamilebilbaosd7083
    Participant
    #12114

    Well, we are artists….  But i am learning Corona Coding in the moment, and i think, i understand it quite well. Maybe we go the route of morris lessmore, we will test everything out.If you have some tips on using the new video api, your help would be very cool!

    Anonymous
    #12115

    Let me know when you start your tests and I will provide my comments, if you want. My pleasure 🙂

    jamilebilbaosd7083
    Participant
    #12116

    Super! Thank you very much. I think we start tomorrow. Just waiting for the new ipad….

    jamilebilbaosd7083
    Participant
    #12117

    Hi Alex,I have made a little test with 2 pages and new.nativeVideo. Works almost as expected! I have buttons behind! the videos that can restart them while playing. Very good...2 chanels of page-audio + 1 channel of video-embedded audio no problem.Removing the videos on page change also works.Unfortunately, video listeners do not work ( cannot remove the videos when they have ended.)Do you know a trick to achieve that?I could send you a test build if you want. But how?

    Anonymous
    #12118

    Have you checked this thread: http://blog.anscamobile.com/2012/02/webview-video-and-network-updates/Based on your info, it seems you need to remove the videos the moment they end, right? Check the code below for an example:

    Code:
    local function videoListener( event )    if event.phase == "ready" then        print( "Video is ready." )     elseif event.phase == "ended" then        print( "Video playback has ended." )        --move the video out window        webView.x = 5000        -- remove the webView as with any other display object        webView:removeSelf()        webView = nil    end end local videoObj = native.newVideo( 0, 0, 320, 480 ) videoObj:addEventListener( "video", videoListener ) -- load a video and jump to 0:30 videoObj:load( "myvideo.m4v", system.DocumentsDirectory ) videoObj:play()

    Let me know if it worked.

    jamilebilbaosd7083
    Participant
    #12119

    Good idea to pause and move the video out of the window! Works great. If i restart the video, i move it to the original position and it plays again. No need to remove it.When the video is finally removed only on page change, everything works fine. Thank you very much for your help!

Viewing 9 posts - 1 through 9 (of 9 total)

The forum ‘Most Common Questions’ is closed to new topics and replies.

Privacy Preference Center

Strictly Necessary

these coolies are for WP-SpamShield, gdpr-wp, woocommerce, paypal

PHPSESSID, SJECT16, JCS_INENREF, JCS_INENTIM, gdpr, woocommerce_cart_hash, woocommerce_items_in_cart, woocommerce_recently_viewed, wordpress_, wordpress_logged_in_, wordpress_sec_, wordpress_test_cookie, wp_woocommerce_session_, AKDC, akavpau_ppsd

Functionality

WordPress cookie created when auto-saving a post in the editor.

wp-saving-post, wp-settings-, wp-settings-time-

Performance

google analytic

__utma,__utmb,__utmc,__utmz,_ga,_gid,_gat

Advertising