FLVPlayback Component + HTML5

For a HTML5 Canvas project I'm in need to use imported FLV videos (green screen w/ alpha channel), with the goal to publish it highly compatible on the web. As the FLVPlayback Component is not supported in HTML5 projects, is there some possible workaround to achieve what I want with Adobe's software? If not, could I get briefed how this could be done with other programs/techniques?

While there have been 'workarounds' in the past, the answer is ultimately that codecs that support this are limited and unreliable. You'll need to use a <canvas> trick to really pull this off which involves separating your alpha channel into its own video, then using an invisible canvas to process the video based on the alpha channels (reading pixel by pixel to determine what opacity percentage to draw of every single pixel). Some people use a specific color in the video as the channel (for instance if you just needed red text, then use a different background color as the alpha). You then draw that to a visible canvas after calculated. It's very unideal but there's no "best way" to do this currently, outside Flash.
A quick search will show you the techniques I'm talking about but none of them are drag and drop approaches to the problem. They require JavaScript, proper types of video and a bunch of processing.

Similar Messages

  • A better way to determine the current state of the FLVPlayback component?

    Below is the AS3 code I have used to display images (MCs) over an instance of the FLVPlayback component.  These images (one for loading, one for the title) are to appear – or disappear – according to the current state of the FLVPlayback component. 
    It “works,” but when testing, I have noticed that it can be rather finicky.  The most common issue that arises is that many times the loadPoster movieclip will still be visible even though the video has entered the playing state.
    Also, I wanted a title placeholder image to appear whenever the user stops the video or if the video completes.  However, I had to add the conditional statement to the “stoppedStateEntered” case to make everything appear when expected.  When the video is first viewed (and has completed buffering), it seems that the FLVPlayback component enters the stopped state before entering the playing state.  Thus, the titlePoster would flash on the screen right before it and the loadPoster “should” disappear when the video begins playing.
    Even in my limited testing, these issues were very easily re-created.  I am definitely looking for a more reliable solution.  Is there a better (or more correct) way to go about all this?  If possible, I would like to stick with the FLVPlayback component, just for the simple fact of not having to code my own.
    Where am I going wrong?
    function updateMoviePoster(event:VideoEvent):void
                    switch (event.type)
                                    case "playingStateEntered":
                                                    loadPoster.visible = false;
                                                    titlePoster.visible = false;
                                    break;
                                    case "stoppedStateEntered":
                                                    if (loadPoster.visible == false)
                                                                    titlePoster.visible = true;
                                    break;
                                    case "complete":
                                                    titlePoster.visible = true;
                                    break;
    myFLVPlayback.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, updateMoviePoster);
    myFLVPlayback.addEventListener(VideoEvent.STOPPED_STATE_ENTERED, updateMoviePoster);
    myFLVPlayback.addEventListener(VideoEvent.COMPLETE, updateMoviePoster);

    Any suggestions?  I would truly appreciate the help.

  • Need to stop playback of an FLVPlayback component when navigate away from page!

    I have an movieclip playing as auto start on the first page of my website.  The component continues to play when I navigate away from the page.  How can I stop the playback of the movie if it has not completed when navigation away from the page is invoked.  I have search and am unable to find such an event using an FLVPlayback component.  Presently there is no code in actionscript to display here.
    thanks

    Hi, this is the entire code that is placed on the timeline in frame 1 of the AS line.  There is now an error and the FLVPlayer component, which is also begin in frame 1. At this point there is one method that I thought should work when the vTinesDayBtn is clicked.  However, is not.
    The error is:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at ewddSite_fla::MainTimeline/vTines()
    ArgumentError: Error #1063: Argument count mismatch on ewddSite_fla::MainTimeline/stoppedVid(). Expected 0, got 1.
    The code is:
    stop();
    import flash.events.*;
    import flash.display.*;
    import fl.video.*;
    import fl.video.FLVPlayback;
    function stoppedVid() {
      vidPlay.stop();
    vTinesDayBtn.addEventListener(MouseEvent.CLICK, stoppedVid)
    function vTines(evt:MouseEvent):void {
    gotoAndStop(20);
    vidPlay.stop();
    function engagements(evt:MouseEvent):void {
    gotoAndStop(25);
    function weddings(evt:MouseEvent):void {
    gotoAndStop(30);
    function births(evt:MouseEvent):void {
    gotoAndStop(35);
    function birthdays(evt:MouseEvent):void {
    gotoAndStop(40);
    function graduations(evt:MouseEvent):void {
    gotoAndStop(45);
    function anniversaries(evt:MouseEvent):void {
    gotoAndStop(50);
    function specEvents(evt:MouseEvent):void {
    gotoAndStop(55);
    function memorials(evt:MouseEvent):void {
    gotoAndStop(60);
    //main.addEventListener(MouseEvent.MOUSE_DOWN, mainPg);
    vTinesDayBtn.addEventListener(MouseEvent.MOUSE_DOWN, vTines);
    engageBtn.addEventListener(MouseEvent.MOUSE_DOWN, engagements);
    weddingsBtn.addEventListener(MouseEvent.MOUSE_DOWN, weddings);
    birthsBtn.addEventListener(MouseEvent.MOUSE_DOWN, births);
    bDaysBtn.addEventListener(MouseEvent.MOUSE_DOWN, birthdays);
    graduBtn.addEventListener(MouseEvent.MOUSE_DOWN, graduations);
    annivBtn.addEventListener(MouseEvent.MOUSE_DOWN, anniversaries);
    spEventsBtn.addEventListener(MouseEvent.MOUSE_DOWN, specEvents);
    memorialsBtn.addEventListener(MouseEvent.MOUSE_DOWN, memorials);

  • Is it possible to import YouTube videos into a flash FLVPlayback component...?

    Hi all,
    I'm now working on a flash website, i need to play a youtube video inside my flash movie.
    In this Flash file i have a FLVPlayback component and i tried to link the youtube video into this but did'nt work.
    Please help me...

    You should find what you need here: http://code.google.com/apis/youtube/flash_api_reference.html

  • FLVPlayback component skinAutoHide problem

    Hi guys!
    I have a problem with FLVPlayback component's skinAutohide
    property which works poorly when FLVPlayback component is the same
    size as your stage. The skin only hides when I move my mouse very
    slowly outside the FLVPlayback component.
    Also making the FLVPlayback component smaller isn't an option
    so what more options are there left?
    Is there anyway to hide the skin by yourself?
    I allready tried the following code, but I think this is very
    unreliable (I get some errors when I move my mouse very quickly
    over and outside the FLVPlayback component):
    video.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
    video.addEventListener(MouseEvent.MOUSE_MOVE,
    mouseMoveHandler);
    function mouseLeaveHandler(event:Event):void {
    video.skin = "";
    function mouseMoveHandler(event:Event):void {
    video.skin = "SkinOverPlayStopSeekFullVol.swf";

    I am having the exact same problem. Thanks for info that this
    is caused by movie being the same size as the stage. I am also
    working on a solution and will let you know if I find one.

  • FLVplayback component problem

    my flash movie contains FLVPlayback component to play videos.
    In the begining of the movie( frame 1) I have a simple pre-loader.
    When I test my swf on a browser the pre-loader appear only after
    few second, not immediately. (my pre-loader start from 40%). I
    think the reason is that flash load the FLVPlayback component on
    the first frame although my component appears only on the second
    frame . Is there any work around this issue?
    Thanks

    I am having the exact same problem. Thanks for info that this
    is caused by movie being the same size as the stage. I am also
    working on a solution and will let you know if I find one.

  • Need Preloader for FLVplayback Component

    Hi,
    I'm playing external .flv videos using the 'FLVplayback'
    component. My client's complaining that they stall and stutter a
    bit when they start to stream, and wants to know if I can create a
    preloader for them.
    Can anyone help or point me in the right direction to create
    preloaders for this component? Since the .flv is not on the
    timeline, I don't know where to begin. I found some info on this in
    the Flash Help files, but it's a little over my head.
    Thanks very much

    Hey metrov,
    ActionScripting is the way to go for this situation. Try this
    link (hope it helps)...
    http://www.actionscript.org/forums/showthread.php3?t=105158
    Jaythan

  • Remove sound in FLVplayback component?

    How do you remove the sound from "specifically" from FLVplayback component? Since the sound wont stop playing when I'm on different page(assume that if the person didnt click the pause button and navigate to other pages)....Normally I would add SoundMixer.stopAll(); for every button in my main and loaded swf but this will stop my background music as well....
    The flvplayback component is located in another swf file and the code was added on the second frame of the movieclip call "scrollGroup"
    import fl.video.FLVPlayback;
    import flash.events.Event;
    var flvPlayback:FLVPlayback = new FLVPlayback();
    flvPlayback.fullScreenTakeOver = false;
    flvPlayback.autoPlay = false;
    flvPlayback.source = "video/Listening_to_Community_Voices.f4v";
    flvPlayback.skin = "MinimaFlatCustomColorPlayBackSeekCounterVolMuteFull.swf";
    flvPlayback.x = 31;
    flvPlayback.y = 123.8;
    addChild(flvPlayback);

    http://forums.adobe.com/message/2587415?tstart=0

  • FLVPlayback Component video and skin as one swf

    Is it possible when publishing a Flash CS4 file to have the Video swf and the Skin swf be in one swf file?
    I have a Flash CS4 (AS2) file that has a FLVPlayback Component. When I publish or test movie 2 swfs are output. I need only 1 swf as I am then going to insert this 1 swf into a Captivate 4 project.
    When I insert the video swf by itself into Captivate 4, I do not have a play bar/skin.
    If it is not possible to publish as one swf, can someone please tell me how I can insert the 2 swfs into a Captivate file and get them to work?
    Thanks in advance.

    My project is called JumpVideo.
    The only 2 items in my library are the FLVPlaybackComponent and a Combo box.
    I have imported a video using the FLVPlaybackComponent and have selected the SteelExternalPlaySeekMute skin to go with the playback.
    The video has defined cue points. The combo box has two values. When the first is selected it jumps to the start of the video. When the second is selected it jumps to the cue point.
    When I publish there are two swfs that are produced; the project swf itself (JumpVideo.swf) and the skin (SteelExternalPlaySeekMute.swf).
    I would like there to be only one swf published (i.e. the skin is within the JumpVideo.swf).
    Is this possible?
    The swfs will then need to be inserted into Captivate 4 as animation.
    If 1 swf cannot be published, then can you perhaps help with how I can insert the JumpVideo.swf and the skin swf into Captivate and have it work as it does in Flash CS4?

  • Load FLV into FLVPlayback component?

    I have an array of videos coming from an XML doc. I am getting the name of my video in the trace statement okay, but am not sure how to go about loading the FLV video into the player. I have an FLVPlayback component on the interface named "video". The video I'm going to load will be ("videos/" + videoArray[0])). What is the proper way in AS 3 to load this video?

    var start:Number = 0;
    var videoConnection:NetConnection = new NetConnection();
    videoConnection.connect(null);
    var aStream:NetStream = new NetStream(videoConnection);
    aStream.play("myvideo.flv");
    aStream.pause();
    I hope this will help you

  • Is Action Script for netStreaming and FLVPlayback component radically different, not interchangeabl?

    Hi.
    I am using NetConnection and NetStream to play back flv in Flash Pro CS5.5, and trying to add cue point to trigger events using Action Script, and to automatically rewind to the start at the end. There is no problem to trigger events via AS when the cue points are embedded, but i am unable to add cue points using AS.
    When i use an FLVPlayback component, there is no problem to add cue points (http://help.adobe.com/en_US/ActionScript/3.0_UsingComponentsAS3/WS5b3ccc516d4fbf351e63e3d1 18a9c65586-7feb.html) and to loop the playback using autoRewind (and fl.video.VideoEvent.AUTO_REWOUND which i got from Nafem at http://forums.adobe.com/thread/857036).
    However, i am failing to use this same code w/a netConnection and netStream, and would appreciate any help.
    thanks.

    Hello,
    Well, I've got some help from another helpful fellow at macscripter.net and I have a working script - albeit a bit more specific (ie, hardcoded extensions to look for) and a different approach.
    Here's the script:
    on adding folder items to thisFolder after receiving addedItems
    repeat with movieFile in addedItems
    set {Nm, Ex} to getName_andExtension(movieFile)
    set movieFilePath to (thisFolder as text) & Nm & ".avi"
    set subtitleFile to (thisFolder as text) & Nm & ".srt"
    if Ex is ".srt" then
    try
    tell application "iFlicks"
    import (movieFilePath as alias) with gui
    end tell
    end try
    else if Ex is ".avi" then
    if my FinderItemExists(subtitleFile) then
    try
    tell application "iFlicks"
    import (movieFilePath as alias) with gui
    end tell
    end try
    end if
    end if
    end repeat
    end adding folder items to
    on getName_andExtension(F)
    set F to F as Unicode text
    set {name:Nm, name extension:Ex} to info for file F without size
    if Ex is missing value then set Ex to ""
    if Ex is not "" then
    set Nm to text 1 thru ((count Nm) - (count Ex) - 1) of Nm
    set Ex to "." & Ex
    end if
    return {Nm, Ex}
    end getName_andExtension
    on FinderItemExists(thePath)
    try
    set thePath to thePath as alias
    on error
    return false
    end try
    return true
    end FinderItemExists

  • FLVPlayback Component for AIR & IOS

    Hello,
    I have referenced this and other forums several times in regards to this question, but would like to canvas it myself here once more in hopes of any new or additional insights that were absent before.
    I am developing an AIR application that uses a long (45min) video as a centerpiece. It necessarily (I think) needs to be applied with the FLVPlayback component because it is both masked by menu and playback controls, and has a large variety of interactive content layered on top of the full-screen (more or less) video.  As of now, the video is encoded in FLV, and works fairly well, but I do have some lingering performance issues, which I am asking help with here today.
    I have read that using FLV in iOS apps is not advised, but for the reasons listed above I most likely will have to do so. I don't think I can use the other options (stagevideo, or otherwise) due to the layering of content above the video, and an irregular mask. I have placed the video in the main directory of the app package (which made all the difference), used GPU, and tweaked the encoding ad nauseam. While all-in-all it has resulted in "okay" performance, I still have a slight but noticeable skip/hiccup/jump in the video during the more graphically intense portions of the production. This only occurs on the iPhone 4/s devices, while the iPhone 5 experience is flawless.
    So I am asking for ANY help/suggestions anyone could offer towards a possible solution/improvement to this problem. I would be grateful for any other setting, encoding, file structure, or alternate suggestions that I have not thought of or addressed.
    Thank you.

    Hi Freelance77,
    The product team would like to know the steps to reproduce this issue. After that, we can try solving it for you. Do let us know.
    Thanks,
    Preran

  • Adding time to the FLVplayback component

    Hi everyone, Im using the FLVplayback component for a project im doing. I want to add the time elapsed and time left on the controls. I dont really want to create my own controls, as im happy with the flv playback component. The FLVs playing in the component are external and are loaded into it via as3
    Is there a quick and easy way of doing this?
    Cheers
    Dan

    I have managed to find some code for this component, but im getting some errors which im having trouble to de-bug;
    1118: Implicit coercion of a value with static type Object to a possibly unrelated type Function. vidPlayer.addEventListener("metadataReceived", listenerObject);
    1118: Implicit coercion of a value with static type Object to a possibly unrelated type Function. vidPlayer.addEventListener("playheadUpdate", listenerObject);
    Please would someone take a look and let me know what im doing wrong?
    Thanks
    code:
    var listenerObject:Object = new Object();
    var fullDuration = null;
    listenerObject.metadataReceived = function(eventObject:Object):void {
        fullDuration = prettyTime(vidPlayer.metadata.duration);
    listenerObject.playheadUpdate = function(eventObject:Object):void {
        var paTime = vidPlayer.playheadTime;
        if(fullDuration != null){
    //updates the text box with the instance name timeCode_txt on the root timeline.
    //best to use a monospace typeface like calibri for the textbox font.
            time_txt.text = prettyTime(vidPlayer.playheadTime) + " / " + fullDuration;
    vidPlayer.addEventListener("metadataReceived", listenerObject);
    vidPlayer.addEventListener("playheadUpdate", listenerObject);
    function prettyTime(timeinSeconds):String{
        var seconds:Number = Math.floor(timeinSeconds);
        var minutes:Number = Math.floor(seconds / 60);
        var hours:Number = Math.floor(minutes / 60);
        //Storing the remainder of this division problem
        seconds %= 60;
        minutes %= 60;
        hours %= 24;
        //Converting numerical values into strings so that
        //we string all of these numbers together for the display
        var sec:String = seconds.toString();
        var min:String = minutes.toString();
        var hrs:String = hours.toString();
        //Setting up a few restrictions for when the current time reaches a single digit
        if (sec.length < 2) {
            sec = "0" + sec;
        if (min.length < 2) {
            min = "0" + min;
        if (hrs.length < 2) {
            hrs = "0" + hrs;
        //Stringing all of the numbers together for the display
        var time:String = hrs + ":" + min + ":" + sec;
        //Setting the string to the display
        return time;

  • FLVplayback component halts everything

    I've been working on getting video into my flash site with
    the "FLVPlayback component " and i've been able to get it to launch
    and play locally, however when it does launch when i'm "testing
    movie", my flash site quits working. I know this is a bit open
    ended and i'm no flash programmer, but I've been working on this
    all weekend. Can someone help me to integrate the FLVPlayback
    component correctly within my flash site? Thanks!
    -Matt

    It would help if you could explain how your "flash site" is
    structured.

  • AS3 - Refresh FLVPlayBack component!

    Hey Guys,
    I am working on AS3 project using Flash CS3. I have to display some videos using FLVPlayBack component. I am using the same component instance to display videos but when a new video is loaded the max duration property does not updates and hence the onComplete event is never fired.
    I somehow wanted to refresh the component when a new video is to be played. Please let me know various ways to do so.
    Thanks in advance for your kind consideration.

    what code are you using to detect flv play completion?

Maybe you are looking for