How to load a ByteArray FLV in OSMF?

I'm working on a local application ( it's not a website or nothing related ) and I have various FLVs with a very simple encryptation method (just like adding 10 at each byte).
I can load/play them using NetStream.appendBytes() after my decrypt, but that happens only after I read all video data.
What I really need is to stream those videos from a remote url, and decrypting while receiving data, using a OSMF player that I already have.
This is my current code just to play my decoded FLV byte array
private function playBytes(bytes:ByteArray):void
            // detecting it's header
            if (bytes.readUTFBytes(3) != "FLV")
                _text.appendText("\nFile \""+ file +"\" is not a FLV")
                return void;
            bytes.position = 0;
            netConnection.connect(null);
            netStream = new NetStream(netConnection);
            netStream.client = { onMetaData:function(obj:Object):void { } }
            video.attachNetStream(netStream);
            addChild(video);
            // put the NetStream class into Data Generation mode
            netStream.play(null);
            // before appending new bytes, reset the position to the beginning
            netStream.appendBytesAction(NetStreamAppendBytesAction.RESET_BEGIN);
            // append the FLV video bytes
            netStream.appendBytes(bytes);
[I moved the discussion from OSMF, to here, due the lack of attention there]

I looked at it a couple of month ago and, frankly, don't remember exact package that takes care of it. I don't have OSMF code on this machine - so I cannot look into it now.
I doubt there are many resources on the web regarding this. This is a very specialized functionality and very few people attempted to do what OSMF does. We have figured out certain aspects but were not able to completely replicate it. Again, it is a very daunting task to search of byte offsets and match with file format specs.

Similar Messages

  • How to load and display the external flv video files in dynamicly and the how to control the flv fil

    How to load and display the external flv video files in dynamicly using AS 3.0
    and  How to control the flv file  add the play paus button and add seekbar.
    I have using to load the flv file following code
    var flvPlaceHolder1:MovieClip = new MovieClip();
    var vid1:Video = new Video(734, 408);
    flvPlaceHolder1.addChild(vid1);
    addChild(flvPlaceHolder1);
    flvPlaceHolder1.x = 1059;
    flvPlaceHolder1.y = 152;
    var nc1:NetConnection = new NetConnection();
    nc1.connect(null);
    var ns1:NetStream = new NetStream(nc1);
    vid1.attachNetStream(ns1);
    var listener1:Object = new Object();
    listener1.onMetaData = function(evt:Object):void {};
    ns1.client = listener1;
    ns1.play("GV-1600 TURNING.flv");
    ns1.addEventListener(NetStatusEvent.NET_STATUS, statusChanged1);
    function statusChanged1(ns1:NetStatusEvent):void
             trace(ns1.info.code);
            if (ns1.info.code == 'NetStream.Buffer.Empty')
                 trace('the video has ended');
                 removeChild(flvPlaceHolder1);
                 //trace('removeChild');
                gotoAndPlay(1786);
    then how to add the play,paus ,full screen button    and   seekbar,volumebar.

    I have to Create the flash presentation for our company product
    In this presentation the left  side the text animation are displayed then right side the our product video is displayed.
    In this presentation i need the following option :
    1, The first product video and animation is finished then the next product is played
    2, then the video displayed  (size width and height 400x300) , I click this video to increase the size(ex:1000x700)
    3, then the playing video i control  it play, stop, paus button and volume bar, seek bar.
    4, then this presentation is displayed on 42 inches LCD TV so this full presentation is run full screen.
    I have finished first two steps 1 and 2
    the following are the screen short and code:-
    code :-
    var count=0;
    var flvPlaceHolder2:MovieClip = new MovieClip();   
    var vid2:Video = new Video(734, 408);
    flvPlaceHolder2.addChild(vid2);
    addChild(flvPlaceHolder2);
    flvPlaceHolder2.x = 1059;
    flvPlaceHolder2.y = 152;
    var nc2:NetConnection = new NetConnection();
    nc2.connect(null);
    var ns2:NetStream = new NetStream(nc2);
    vid2.attachNetStream(ns2);
    var listener2:Object = new Object();
    listener2.onMetaData = function(evt:Object):void {};
    ns2.client = listener2;
    ns2.play("GS-4000.flv");
    this.addEventListener(Event.ENTER_FRAME, BtnFadeIn2);
    function BtnFadeIn2(event:Event):void
        if (this.currentFrame == 387)
            /*flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            trace('Screen size is changed');*/
            if(count==0)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            count++;
    ns2.addEventListener(NetStatusEvent.NET_STATUS, statusChanged2);
    function statusChanged2(ns2:NetStatusEvent):void
        trace(ns2.info.code);
        if (ns2.info.code == 'NetStream.Buffer.Empty')
                trace('the video has ended');
                 removeChild(flvPlaceHolder2);
                 //trace('removeChild');
                gotoAndPlay(433);
    flvPlaceHolder2.buttonMode=true;
    flvPlaceHolder2.addEventListener(MouseEvent.CLICK,home2);
    function home2(e:MouseEvent):void
        if(vid2.width==734 && vid2.height==408)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
        else
            flvPlaceHolder2.x = 1059;
            flvPlaceHolder2.y = 152;
            vid2.width=734;
            vid2.height=408;

  • Any ideas how I can view this flv file?

    I have CS3 Flash using Flash Player 9 and Actions Script 3.  I am publishing a progressve loading swf, which has an absolute path to an flv of http://www.haleygroup.com/work_images/basics.flv.  The swf file is located here http://www.haleygroup.com/work_images/basics.swf, along withn the html, flv, and skin.  When I click the button (configured by an XML file) on my web site to view the file, I get a flickering box.  Other flvs in the XML file are configured the same way and work fine.  See this flickering box at http://www.haleygroup.com/, enter site and go to "et al" page, then click "Basics".  Any ideas how I can view this flv file?  Many, many thanks.

    I just changed the path to a relative path of just "basics.flv" and still have the problem.  See swf at http://www.haleygroup.com/work_images/basics.swf.  Thanks.

  • How to play Ads then flv

    when i click on link play any ad then paly any flv.
    please tell me how to attach ad and flv both.
    only on click first play ad then flv.

    Hi Sheerazkaleem,
    Adobe has a big open source initiative in this area.  The initiative is now known as "Open Source Media Framework" (aka OSMF; formerly codenamed Strobe).
    Full information at the OSMF homepage here:
    http://opensourcemediaframework.com/
    Following link is a webcast recording which provides a good overview (recorded June 3, 2009).  The presenters are the OSMF Product Manager Sumner Paine and the OSMF Engineering Manager, Vijay Ghaskadvi:
    http://realeyes.acrobat.com/p91043652/
    Quick question, are you developing with Flash?  Flex?  Both?
    Regardless, for what you describe, you likely will use ActionScript to control playing ads and flvs.
    OSMF includes ActionScript classes of type CompositeElement ( http://help.adobe.com/en_US/OSMF/1.0/AS3LR/org/openvideoplayer/composition/CompositeElemen t.html )
    including the subclasses
    ParallelElement
    http://help.adobe.com/en_US/OSMF/1.0/AS3LR/org/openvideoplayer/composition/ParallelElement .html
    SerialElement
    http://help.adobe.com/en_US/OSMF/1.0/AS3LR/org/openvideoplayer/composition/SerialElement.h tml
    For more support on OSMF, the OSMF forums are here:
    http://forums.adobe.com/community/opensource/osmf/
    Please post back regarding whether you find this reply helpful?  (Also, I look forward to seeing your posts over on the OSMF forums too ;-)
    Best regards,
    g

  • How to load a Jar file in the class path?

    How to load a Jar file which contains class files, images, etc.. in the classpath without using URLClassLoader.

    You don't "load" jars. If it's on the classpath, you can obtain individual resources from it using various methods on either Class or ClassLoader. Do you mean "how to add a jar to the classpath at runtime"? Can't be done without using a classloader, typically URLClassLoader or a subclass thereof. Why you want to not use the proven method is beyond me. Presumably because you don't understand classloading. In which case, forget it.

  • How to load a client file in a clob using sqlcl

    How to load a client file in a clob using sqlcl

    You don't "load" jars. If it's on the classpath, you can obtain individual resources from it using various methods on either Class or ClassLoader. Do you mean "how to add a jar to the classpath at runtime"? Can't be done without using a classloader, typically URLClassLoader or a subclass thereof. Why you want to not use the proven method is beyond me. Presumably because you don't understand classloading. In which case, forget it.

  • How to load data to a cube from multiple infosources ?

    Hi friends,
    How to load data to a cube from multiple infosources ? could u please answer this question .
    thanks in advance......

    Hi ,
    say for example you need to load data to 1 cube from 3 info sources:
    1) You need to create 3 update rules for the Cube.
    2) Each time you create the update rules. Mention the name the name of the Info source. and create update rules correspondingly.
    Regards
    satish
    Message was edited by:
            satish murthy

  • How to load beginning balance

    Hi :
    How to load beginning balance to repective g/l account in SAP?

    If you want to load balances at the time of go live.
    Create a clearing account like data take over A/c
    MM will upload material balances using tcode MB1C and movement type 561
    it will generate the following accounting entry
    Finished goods stock a/c          Debit
    Semi-Finished goods stock a/c Debit
    Raw Material stock a/c             Debit
    Packing Material stock a/c        Debit
    Stores and spares a/c              Debit
    Data take over                          Credit
    Customer a/c (not recon G/l) Debit
    Data takeover a/c                  Credit
    Data takeover a/c                Debit
    Vendor a/c (not recon GL) Credit
    For Asset - tcode OASV
    Plant and Machinery a/c          Dr
    Accumulated depreciation a/c Credit
    Data takeover a/c                    Credit
    Cash balance through FBCJ
    G/L Tcode F-02,
    Data takeover a/c     Debit  (Balancing figure)
    Bank a/c                    Debit
    Advances                 Debit
    Share capital a/c       Credit
    Short term Loan a/c   Credit
    Long term loan a/c     Credit

  • How to load a selective request from PSA to DSO using DTP?

    Hi Gurus,
    The PSA is having 3 requests, how to load the request number 2 from psa to DSO using DTP?
    Thanks
    SDP
    Edited by: SDPSAP on Nov 15, 2011 7:58 PM

    Let us say that requests are 1,2 and 3. 1 being the first one and 3 is the last one. Now you need to load request 2 in DSO from PSA.
    - create a Delta DTP
    - Tick "Only Get Delta Once"
    - Tick "Get One Request Only"
    - Untick "Reterive Until No More New Data"
    - execute the DTP, it will load request 1 to DSO
    - delete this request from DTP
    - execute DTP again, it will load request 2 to DSO; this is what you need.
    If DSO is write optimized, you do not need to untick "Reterive Until no More New Data"; just execute the DTP, it will create 3 requests in DSO, delete first and last and you will get only 2 in DSO.
    I hope it helps.
    Regards,
    Gaurav

  • How to load and unload more than one external swf files in different frames?

    I do not have much experience on Adobe Flash or Action Script 3, but I know the basics.
    I am Arabic language teacher, and I design an application to teach Arabic, I just would like to learn how to load and unload more than one external swf files in different frames.
    Thanks

    Look into using the Loader class to load the swf files.  If you want to have it happen in different frames then you can put the code into the different frames.

  • How to load site in a reinstalled Dreamweaver

    Hello,
    I had to move from a desktop PC to a laptop. I had to install
    Studio 8 all over again and I have all the files I was using
    earlier in my desktop.
    When starting Dreamveaver I can see the folder structure in
    "files/assets/snippets" but I don't know how to load the main
    folder where my work is stored. (Where was doing my work earlier in
    the desktop)
    Example:
    I was working with a site named A. This is a folder named "A
    " that should appear under the "files/assets/snippets" window.
    All I see after the reinstall is the Desktop and all the
    folders in my HD along with the folder that I was working with.
    The "Manage Sites" small window is blank right now.
    How do I place the folder (site?) "A" back in the
    "Files/Assets/Snippets" column so I can open my HTML's already
    created, access the icons and other folders below "A" ?
    thank you
    pakoppan

    "> The "Manage Sites" small window is blank right now.
    Did you export your site definitions to a folder that you
    could move by FTP
    or portable device to the laptop? If so, all you need to do
    is import the
    site definitions and make sure your folder structure is
    identical to your
    other computer.
    Nancy Gill
    Adobe Community Expert
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
    A Beginner''s
    Guide, Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development

  • How to load the content in Combobox

    Dear All,
       Any one can tell me how to load the combobox dynamically..  i have one combobox in that i defined the value as "Defined New" when i click the DefineNew a new form wil come i wil enter the value in the editext. when i click the combobox the value should display.. i have done  this, its working fine but  the problem is every time when i add the value it wil show the data in the  the form Load.. i want data should come dynamically..
    any one can help me in this regard
    G.shankar

    You can use this "oForm.Refresh()" every time you add a new valid value to the ComboBox.
    I hope this help you.
    Regards.
    Enriquillo Guigni

  • Can anyone tell me how to load my music library from my PC down to my IPad??

    Some how when I updated the OS on my IPad I lost all my music in the IPOD section.  I would like to find out how to load my music library from my PC to my IPad?  Thanks.

    If you use iTunes See Here
    Syncing with iTunes
    From Here
    http://www.apple.com/support/ipad/syncing/
    Ipad User Guide
    http://manuals.info.apple.com/en_US/ipad_2_user_guide.pdf

  • Can someone tell me how I load my music from my itunes account onto my new macbook pro??

    can someone tell me how to load my music from my itunes account on my iphone to my new macbook pro?

    See Here
    iTunes: How to move your music to a new computer

  • My friend synced a video to my ipod but it erased all my data on my ipod,but i cant figure out how to load my old libray back without deleting the movie. my friend cant tell me the password. How can I get my old library back without deleting the movie?

    My friend synced a video to my ipod but it earased all my data on my ipod,but I can't figure out how to load my old library back without deleting the movie. My friend shares a family account so she can't tell me the password. How can i get my old library back without deleting the movie?

    Linnwarner wrote:
    She does have the right because she bought the movie.
    Not true at all.
    You only buy the right to your own personal use.
    You do NOT have the right to distribute to others.
    This is illegal.  There is no doubt about it

Maybe you are looking for