StageVideo on android shows a black frame on the start and end of video playback

When my screen starts up it goes completely black for a moment and the interface becomes unreponsive for about a second when my stagevideo player class is added to the stage. My videos are encoded using Adobe Media Encoder with the 480p android settings (vbr 2 pass). I tried cbr and that had exactly the same effect. This problem happens on both air 3.5 and air 3.4. I figure this has to be something caused by my own code because I don't see many discussions about this issue.
package com.literacysoft
          import flash.display.Sprite;
          import flash.events.Event;
          import flash.events.NetStatusEvent;
          import flash.events.StageVideoAvailabilityEvent;
          import flash.events.StageVideoEvent;
          import flash.geom.Rectangle;
          import flash.media.StageVideo;
          import flash.media.StageVideoAvailability;
          import flash.media.Video;
          import flash.net.NetConnection;
          import flash.net.NetStream;
          public class SimpleStageVideo extends Sprite
                    private var stageVideoAvail:Boolean;
                    private var sv:StageVideo;
                    private var videoUrl;
                    private var vidWidth;
                    private var vidHeight;
                    public var theStage;
                    private var vid;
                    private var myX;
                    private var myY;
                    public var ns;
                    public function SimpleStageVideo(w, h, dastage, x, y)
                              myX = x;
                              myY = y;
                              vidWidth = w;
                              vidHeight = h;
                              theStage = dastage;
                              addEventListener(Event.ADDED_TO_STAGE, init);
                    private function init(e:Event):void{
                              theStage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABI LITY, onAvail);
                    private function onAvail(e:StageVideoAvailabilityEvent):void
                              stageVideoAvail = (e.availability == StageVideoAvailability.AVAILABLE);
                              initVideo();
                    private function initVideo():void
                              var nc:NetConnection = new NetConnection();
                              nc.connect(null);
                              ns = new NetStream(nc);
                              ns.client = this;
                              ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                              if(stageVideoAvail)
                                        sv = theStage.stageVideos[0];
                                        sv.addEventListener(StageVideoEvent.RENDER_STATE, onRender);
                                        sv.attachNetStream(ns);
                                        trace('available');
                              else
                                        vid = new Video(vidWidth, vidHeight);
                                        theStage.addChild(vid);
                                        vid.attachNetStream(ns);
                                        vid.x = myX;
                                        vid.y = myY;
                                        vid.smoothing = true;
                                        theStage.setChildIndex(vid, 0);
                                        trace('not');
                    private function netStatusHandler(event:NetStatusEvent):void {
                              trace("event.info.code "+event.info.code);
                              switch (event.info.code) {
                                        case "NetConnection.Connect.Success":
                                                  trace("NetConnection.Connect.Success");
                                                  break;
                                        case "NetStream.Play.Stop":
                                                  if (!stageVideoAvail){
                                                            if (vid.parent != null){
                                                                      theStage.removeChild(vid);
                                                  } else{
                                                            ns.close();
                    public function playMyVideo(url):void{
                              ns.play(url);
                              if (!stageVideoAvail){
                                        theStage.addChild(vid);
                                        theStage.setChildIndex(vid, 0);
                    private function onRender(e:StageVideoEvent):void
                              trace("rendering video",sv.viewPort);
                              sv.viewPort = new Rectangle(myX, myY, vidWidth, vidHeight);
                    public function onMetaData(e:Object):void
                    public function onXMPData(e:Object):void
                    public function onPlayStatus(whatever):void{
                    public function dispose():void{
                              ns.close();
                              ns.dispose();
                              if (!stageVideoAvail){
                                        if (vid.parent != null){
                                                  theStage.removeChild(vid);

Using Air 3.6 on a Samsung tab 2 - Android 4.1.1
Having similar issues.
I'm trying to play a different video corrisponding with a button on the stage.
When I click the button, the video turns black, then shows the last frame of the old video then the new video starts playing.
A just want the old video to stop and have the new one play with no flashing in the middle.
This happens with both stagevideo and the fallback video object
Works fine in flash player 11 windows.
I've noticed a lot of similar type problems and some seem to be getting fixed with new Air versions.
Anyone else currently having similar issues?

Similar Messages

  • How do I remove residual frames at the beginning and end of a video?

    I'm making a short clip with black slugs at the beginning and end. But there are two or three residual frames from the incoming clip after the black clip that stay at the beginning and end of the video and I can't remove them.  I've tried trimming the beginning and end of the video several different ways, and the frames won't disappear. They stay in the video when I make a DVD. The very first and very last frame have sprocket holes in them on the edge of the frame. I'm baffled. Is this an artifact of using the trial version?

    chances are they are from a fade.  have you zoomed in really really close and checked if there is a small fade in or fade out?  happens to me all the time, and with the fade out, you can't do anything to fix it (that I've found) except replacing the clip from your Browser.  See my similar question here:
    https://discussions.apple.com/thread/3589714
    Hope that helps.

  • Small black bars on the top and bottom on video after exporting?

    I'm using 1280x720 video footage in Adobe Premiere. The problem is, whenever I export my finished project as 1280x720, the newly rendered file has small black bars on the top and bottom.
    These black bars are not there in the Premiere preview, only after the project is rendered.
    The video file created after export is still 1280x720(16:9).
    Is there any way to get rid of these black bars, as they are quite irritating because I make youtube videos regularly.

    FAQ: How do I get rid of black bars around my movie?

  • How to find the start and end duration of "Selected frames" from Video using didFinishPickingMediaWithInfo?

    I am doing slow motion in audio and video using AVFoundation(for Video) and Dirac(Audio). As part of it, i will show the video as frames in which the user will select the frames to do slow motion. Eg: 5-6 min of 10 min video.
    I have to show the users two kinds of videos 1. through the video recorder from my application itself. 2. from the gallery.
    Case1: No problem Now,i can record the videos though my video recorder and show the videos as frames to the user to select. Once the user selects some frames(Eg: 5 to 6 min of 10 min recorded video), using the below code, i am able to find the start/end duration of the selected frames or video.
    NSNumber *start = [info objectForKey:@"_UIImagePickerControllerVideoEditingStart"]; NSNumber *end = [info objectForKey:@"_UIImagePickerControllerVideoEditingEnd"];  int startMilliseconds = ([start doubleValue] * 1000);int endMilliseconds = ([end doubleValue] * 1000);
    Case2: In this case, i am able to pick the video from the gallery and show them to the user in the form of frames to select. However, when i try to find the start/end duration of the video as i did in case 1 with the same code, its not working. I am always getting "0" for start/end duration.
    Can you please give some suggestion on my Issue ?

    +1 .. also. i'd to know is using "_UIImagePickerControllerVideoEditingStart"
    the app won't be rejected..
    thanks,
    F

  • Showing start and end time in month view?   And email like notifications ?

    1- How to you set event so that they show the start and end time in month view?
    2 - I have a little "1" on my iCal icon in the dock what does that mean? There is also a little one in the line of one of my calendars? I know I should know this but I am at a loss/

    FDWifeCFD,
    1- How to you set event so that they show the start and end time in month view?
    AFAIK, this is not a feature of iCal.
    2 - I have a little "1" on my iCal icon in the dock what does that mean?
    That means an iCal invitation has been sent. Click the small envelope icon on the bottom right of the the screen to view the notification.
    There is also a little one in the line of one of my calendars?
    That represents the current time of day in the Day/Week view.
    ;~)

  • Media Encoder CC 14 renders with black frame at the end

    Hello,
    my Media Encoder running on Mac Yosemite makes a black frame at the end of h264 clips...
    How can i fix this?
    Thanks

    I just figured out - it might be a quicktime viewer problem...

  • My ipod is showing a black screen, but will charge and make the notification noises. Any ideas on how to fix it

    My Ipod touch is just showing a black screen, it still charges and the notifictions still go off because I can hear them. It wont turn onto the lock screen it just stays black. I tryed letting the battery run down and left it for like 24 hours but nothing changed

    If the unit has NEVER been jailbroke, first try a system reset.  It cures many ills and it's quick, easy and harmless...  Hold down the on/off switch and the Home button simultaneously until you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  It could take well over an hour!  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow the on-screen directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
    At the end of the basic Restore, you will be asked if you wish to sync the iPad/iPod.  As before, say "yes."  Note that that sync selection will disappear and the Restore will end if you do not respond within a reasonable time.  If that happens, only the apps that are part of the IOS will appear on your device.  Corrective action is simple -  choose manual "Sync" from the bottom right of iTunes.
    If you're unable to do the Restore, go into Recovery Mode per the instructions here.  You WILL lose all of your data (game scores, etc,) but, for the most part, you can redownload apps and music without being charged again.  Also, if you have IOS-7, read this.

  • When I use camwow, and I take a picture, then i tap the the little thingy that lets you see it. The picture doesnt show. It just shows a black screen with the camwow retro logo in the bottom right corner....PLEASE HELP IMA CRY.

    Please help. Like I said when I go to see the picture it just shows a black screen with the little camwow logo in the bottom right corner. I already tried turning it off and turning it back on, and I already tryed reseting it. PLEASE HELP PLEASEEEEEEEEEEEEEE imma cry.

    I've tried that.. twice. It didn't work for me - any other suggestions?

  • I am having issues suddenly exporting files. It reads error exporting 25 files, As I attempt to choose another destination folder the folders show a black square where the folder sign previously was. I am in my busy season and this has created a huge dela

    I am having issues suddenly exporting files. It reads error exporting 25 files, As I attempt to choose another destination folder the folders show a black square where the folder sign previously was. I am in my busy season and this has created a huge delay!!! HELP!!!!

    oh and if you use a creative cloud version of Lightroom it could also be that the logon to the cloud is messed up. Logging out and logging back in from preferences in the creative cloud app will fix that. Due to the release of Lightroom CC it appears that adobe's servers have been overwhelmed a bit And many people have strange problems that are solved by logging out and back in.

  • My iPhone 3GS on iOS 5.1 will randomly stop what I'm doing show a black screen then the spinning icon and then it shows my lockscreen. It takes about a minute to do this and it does it about 30 times a day. How do I fix this?

    My iPhone 3GS on iOS 5.1 will randomly stop what I'm doing show a black screen then the spinning icon and then it shows my lockscreen. It takes about a minute to do this and it does it about 30 times a day. How do I fix this? It is EXTREMELY ANNOYING!

    No, sounds like when you dropped it an cracked the screen it may have also damaged the logic board or the repair person damaged a cable.

  • I get a black frame at the head using image sequence every time

    I am using tif frames number 1-xxxxxxxx and each conversion adds black frames to the Qtime movies when there are none in any of my sequences.

    Hi guys. So we did some testing. Using the original presets, it works. However, if I change the quality settings in any configuration, it will always output the black frames at the head. It can be any combination or just one setting adjustment and it will add the black frames.
    However, we found that if the sequence is renumbered to start from frame '0' ( this was discovered by accident ), then it will work, regardless of the quality adjustments.
    The quality settings I am referring to are 'Resize Filter', 'Retime Quality', 'Adaptive Detail' etc etc. If any one of these are changed from default settings, it will add the black frames.
    We can only presume this to be a bug? The big issue though, is that we have hundreds of clips that start at frame 1. We can of course not change the default settings but that means we cannot make adjustments.
    Cheers
    Pat

  • It only show a black box during the input session.

    If I selected double-character font to key-in and it can't show correctly during input on input area inside of any website. It only show a black box during the input session. (Nightly V36.0a1)

    You can right-click that input filed and select "Inspect Element" to open the Inspector (Firefox/Tools > Web Developer).
    You can check what font is used for that text in the Font tab in the right pane of the Inspector.
    If you know the correct font name that you can also try to set the correct font-family by clicking the element {} line in the Rule tab.
    If that works then you can try to create a style rule for the userContent.css file or the Stylish extension.
    <pre><nowiki>@-moz-document domain(ebay.com) {
    input { font-family: "<font name>" !important; }
    }</nowiki></pre>
    The customization files userChrome.css (user interface) and userContent.css (websites) are located in the <b>chrome</b> folder in the Firefox profile folder.
    *http://kb.mozillazine.org/Editing_configuration

  • My iphone 4 is just showing a black screen with the apple icon. how do i get it to work?

    my iphone 4 is just showing a black screen with the apple icon. how do i get it to work?

    First, try resetting the phone - press both the home and sleep/wake buttons until the Apple logo reappears.

  • What does it mean when white message icon with a black circle in the middle and a red circle on the side is at your notifications bar?

    I've had this white message icon with a black circle in the middle and a red circle on the side for like a week now I don't know what it is or how to get rid of it, when I click on it nothing shows up. I need help!

    Check the below link for knowing the icons used in BlackBerry smartphone.
    http://docs.blackberry.com/en/smartphone_users/deliverables/21204/
    tanzim                                                                                  
    If your query is resolved then please click on “Accept as Solution”
    Click on the LIKE on the bottom right if the post deserves credit

  • TS1702 Maps program does not work. In standard it only shows a grid. If I ask for a route it shows start and end point and three route boxes but nothing else. It does show directions. If I switch to hybrid it shows to routes but no roads. Background is a

    Maps program does not work. In standard it only shows a grid. If I ask for a route it shows start and end point and three route boxes but nothing else. It does show directions. If I switch to hybrid it shows to routes but no roads. Background is a blur.

    Do you have a question? This is a user to user help forum. Apple is not here only other users like yourself. You don't report problems to Apple here.
    By the way, it might help if you indicated where you are located.
    To complain to Apple use http://www.apple.com/feedback/ipad.html

Maybe you are looking for

  • Did you know StackFinder?

    Googling I have found this http://stackfinder.snoopconsulting.com Did you know it? What do you think about it? Is reliable? It seems very powerful... Thanks Neuquino

  • Screen issue

    my powerbook screen has an irritating problem. Out of nowhere it goes black and then the whole thing goes to sleep. When you press a key the computer wakes up for maybe a second or 2-enough time to show display then goes black again. Right now its wo

  • Sound crapped out on the new iPhone 4

    so after using pandora for may be 2 minutes into the new eminem song ... sound just went kapoot ...including ringtones/sms sounds basically systemwide meltdown of sound ...only sound that i get is thru ear piece...just did couple of restores and set

  • Hardware: SSD drives and scratch disks

    Hi, I am building a new system for Photoshop. Two quick questions: 1. I note in Adobe's system reqs it says Photoshop cannot be installed on flash-based storage devices. Does this include SSDs? Is there a genuine problem here (i.e. if my application

  • FINDER keeps restarting itself.

    ok, I wrote before about the issues I'm having with FINDER. I have since realised that if I am on my Finder/Desktop window showing the desktop - it keeps restarting itself every 10-15 seconds. If I have a window open (such as looking in Folder Conten