Loading FLV via PHP

Gang,
I've been unable to find any solution - or even a solid
explanation - for this problem anywhere.
I've built a custom FLV player that needs to rely on a PHP
script to serve it FLV files in order to control access to those
files. My player uses the FLVPlayback component.
My actionscript makes a call like this to the PHP script:
my_player.contentPath = "resource.php?id=12345"
I've also tried...
my_player.load("resource.php?id=12345");
The resource.php code in question looks something like this:
header('Content-Type: video/x-flv');
readfile("my_video.flv");
When tested, the FLVPlayback component simply won't accept
the FLV served up to it in this way. It WILL work if loading
directly from the file system, so I know my actionscript works. I
can load just about any other type of file into Flash this way,
including JPG and SWF. FLV is the only format that doesn't work.
I've added the video/x-flv MIME Type to all test servers I've
tried this on, so the server should recognize the file.
So here's the question: How can I get my PHP script to serve
the FLV to my FLVPlayback-based player?
Thanks,
J

Solved!
The root cause was that the FLV served up by the PHP script
was being sent to Flash with a .php file extension, which the
FLVPlayback component doesn't seem to like. The root solution,
therefore, was to rename the PHP script with a .flv exension, as
outlined below.
The files in the "resources/" folder:
resources/
-- .htaccess
-- test.xxx (a renamed FLV file)
-- resource.flv (a renamed PHP script)
The .htaccess file:
AddType application/x-httpd-php .flv
The PHP script (renamed to "resource.flv"):
$filename = "test.xxx";
header('Content-Type: video/x-flv');
header('Length: ' . filesize($filename));
header('Content-Disposition: attachment;
filename="'.$filename.'"');
$fd = fopen($filename, "r");
while(!feof($fd)) {
echo fread($fd, filesize($filename));
flush();
fclose ($fd);
The salient ActionScript:
//my FLVPlayback compontent instance is named "video"
video.load("[server]/resources/resource.flv");
There may be some extraneous headers in the PHP script, but
at least it works.
J

Similar Messages

  • Loading FLV in Flash using PHP

    Hello,
    I am using flash CS3 and am trying to load a flv using PHP.
    I have a PHP webpage with a SWF in it. In that SWF is a
    FLVPlayback component. I would like to be able to set the source
    for the FLV using a php URL e.g.
    http://www.example.com/index.php?v=12345
    I have searched for hours but still have not come up with a
    way of how to do this.
    Does anyone know. Any help would really, really be
    appreciated.
    Thankyou

    Is the problem in the actionscript or in the PHP?
    IE - did you trace out the "video" variable to know that it
    is getting there?
    If the variable is getting into the Flash, then trace out the
    contentPath of myFLVPlayer after it is set to make sure that things
    are working correctly. (To trace out on the server, I usually place
    a dynamic text box in the swf and set its .txt = what I want to
    see)
    If contentPath doesn't work, you can always use the
    myFLVPlayback.load() function - IE myFLVPlayer.load(video);
    If things are getting set correctly, then you are having a
    pathing issue, and need to make sure that the path for the load is
    set correctly.... IE contentPath = "path/to/flv/"+video;

  • FLVplayback Not Loading FLVs

    I'm using a remote hosting service for my FLV storage (
    http://www.blip.tv). When I load
    FLVs remotely into my player, they just seem to load infinitely
    without play control. All except for 1. There is 1 video that
    actually loads and plays just fine, which indicates to me it might
    not be a problem with the host.
    Below are testing-purpose links. (This is a php script which
    passes the flv link to my player). The first one will work and load
    correctly, the second link loads forever.
    http://behindlacrosse.com/videos.php?video=http://blip.tv/file/get/Treschonde-BehindLacros seEp3249.flv
    http://behindlacrosse.com/videos.php?video=http://blip.tv/file/get/Treschonde-BLSummer2006 2549.flv
    I've tried this with several different flv's, and only that
    first one above ever loads. I'm not doing anything complex with my
    code, I use the following actionscript:
    _root.playback.play(vidurl);
    I've traced the vidurl variable to ensure that the urls are
    correct. So I'm really stumped on this one.
    One more interesting note.. in Firefox, on that website
    linked above, if you click on any of the other videos in the list,
    they won't load. It's like the player locked up. But in Internet
    Explorer, you can still click other videos to bypass the currently
    loading one.
    Any help or suggestions at all? I appreciate anything.

    This is the way I work with videos.
    Each video is in a differente frame.
    Name you FLV playback like movie1, movie2, etc.
    You may have a frontpage that links to each video or place a
    button on the keyframe where you want specific video to play. For
    example, on movie1, place a button. On movie2, place another
    button.
    The code below is used assuming you customized your video
    controller.
    // in a MovieClip named Video Controller insert a play, pause
    and stop buttons and a slider//
    stop();
    import mx.video.*;
    movi1.contentPath = "EditedFlash/Text_Edited.flv";
    movi1.playButton = VideoControl.my_playButton;
    movi1.pauseButton = VideoControl.my_pauseButton;
    movi1.stopButton = VideoControl.my_stopButton;
    movi1.seekBar=VideoControl.my_seekButton;
    var cuePt:Object = new Object ();
    cuePt.time =0.5;// title - no voice//
    cuePt.name = "Pt1";
    cuePt.type = "actionscript";
    movi1.addASCuePoint(cuePt);
    movi1.addASCuePoint(3.2, "Pt2");
    var listenerObject:Object = new Object();
    listenerObject.cuePoint = function(eventObject:Object): Void{
    if(eventObject.info.name=="Pt1"){
    _root.Texto.gotoAndStop("uno");
    if(eventObject.info.name=="Pt2"){
    _root.Texto.gotoAndStop("dos");
    movi1.addEventListener("cuePoint", listenerObject);
    //second cue point//
    movi1.addEventListener("cuePoint", listenerObject);
    listenerObject.complete = function(eventObject:Object):Void {
    _root.Texto.gotoAndStop("uno");
    movi1.addEventListener("complete", listenerObject);
    Hope this helps.

  • Load flv file

    How to load a flv from 10 second to 20 second ?

    BruceMCE wrote:
    > I have 3 flv files that I would like to load onto the
    stage via corresponding
    > buttons. I put one of the flv files on the stage and
    named the Instance
    > "player" and assigned the following action script to a
    button:
    > on (release) {loadMovie(player.nonstoprockplayer.swf);
    > }
    The action is incorrect to start with, so is the entire
    arrangement.
    If you want to load SWF, you need to load it in level or
    movie clip holder
    not in FLV file. It's like trying to load something in a GIF
    or JPG file
    on flash's timeline. Just does not work like that. Level or
    holder MC only.
    Secondly, if you load FLV you don't load them in holder movie
    clip but into
    a FLVplayback components and not with loadMovie action.
    Check for FLV Playback, under the Components section in your
    help files.
    You will find action samples on how to set it up.
    Best Regards
    Urami
    !!!!!!! Merry Christmas !!!!!!!
    Happy New Year
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Loading Facelets via ResourceHandler

    Hi there,
    can anyone tell me what's the main difference between JSF 2.0/2.1 and JSF 2.2 regarding to "Loading Facelets via ResourceHandler".
    I searched many articles and discussions and regarding to Flows and reosource library contracts there are some thinks that are not really clear to me and might be still in discussion
    In my opinion facelets and resources are loaded the same way now. The loading mechanism is unified now. But what does this mean.
    Are Resources within the Facelets or Views are loaded relative to their path now ?
    E.g. a view located in /x/y/z/view.xhtml will load its resources from /x/y/z/css/style.css when using <link type="text/css" href=css/style.css"/> and not from the resources folder ?!
    It would be very helpful for me if anyone could provide a simple example or a link where i can the right information, because it's one of the 6 big ticket features ed burns is mentioning in every article and presentation i saw, but the background is not completly clear for me :-/
    Thanks in advance!
    Kind regards,
    Jannis
    Edited by: 988043 on Feb 14, 2013 1:49 AM

    Tank you Eddy, but it seems it does not work.
    The error message received from DTW is:
    - <BOM>
    - <BOM>
    - <BO>
    - <AdmInfo>
      <Object>66</Object>
      <Version>2</Version>
      </AdmInfo>
    - <ProductTrees>
    - <row>
      <TreeCode>A00001</TreeCode>
      <Quantity>1</Quantity>
      <TreeType>iProductionTree</TreeType>
      </row>
      </ProductTrees>
    - <ProductTrees_Lines>
    - <row>
      <Currency>USD</Currency>
      <IssueMethod>im_Backflush</IssueMethod>
      <ItemCode>A00006</ItemCode>
      <Price>160</Price>
      <PriceList>1</PriceList>
      <Quantity>3</Quantity>
      <Warehouse>01</Warehouse>
      </row>
    - <row>
      <Currency>USD</Currency>
      <IssueMethod>im_Backflush</IssueMethod>
      <ItemCode>S10002</ItemCode>
      <Price>160</Price>
      <PriceList>1</PriceList>
      <Quantity>3</Quantity>
      <Warehouse>01</Warehouse>
      </row>
      </ProductTrees_Lines>
      </BO>
      </BOM>
      <ErrorMessage>A00001 - Errore definito dall'applicazione o dall'oggetto</ErrorMessage>
      </BOM>

  • [Q] Can I insert the cue point when recording an FLV via FMS2???

    Hi... :)
    I think this can be a simple yes/no question...
    Does anybody know if I can insert the cue point when
    recording an FLV via FMS2 via AS???
    Thanks... :)
    CyanBlue

    According with fms2 documentation, you can define cue points
    in an FLV file when you first encode the file, or when you import a
    video clip in the Flash authoring tool by using the Video Import
    wizard.
    The FMS2 only handles with cue points.... using the
    NetStream.onCuePoint event handler.

  • Hi everyone i tried to modify BCA so i can use a usb to load windows via BCA but now it doesn't load when i double click it!?

    i tried to modify BCA so i can use a usb to load windows via BCA but now it doesn't load when i double click it!? any ideas?

    iv solved it now

  • Loading dimension via plsql

    Hi
    I am trying to create a dimension and load it via plsql and am able to create dimension and its corresponding table in database.I am quite unsure of how to load the dimension D_OFF from an equivalent relational table R_OFF
    I have a dimension D_OFF with following structure.
    Hierarchy:OFFKEY is child of OFF30 is child of OFF20 is child of OFF10
    Levels -->Attributes
    OFF10 ID--> CD ,DSCR
    OFF20 ID -->CD ,DSCR
    OFF30 ID-->CD ,DSCR
    OFFKEY ID-->CD,DSCR,UPDATE BY,UPDATE_DATE,CREATE BY, CREATE_DATE
    I have created the dimension and the table structure in the database and are as follows
    CREATE DIMENSION D_OFF
    LEVEL "OFF10" IS "OFF10_ID"
    LEVEL "OFF20" IS "OFF20_ID"
    LEVEL "OFF30" IS "OFF30_ID"
    LEVEL "OFFKEY" IS "OFFKEY_ID"
    HIERARCHY "STANDARD" (
    "OFFKEY" CHILD OF
    "OFF30" CHILD OF
    "OFF20" CHILD OF
    "OFF10"
    ATTRIBUTE "OFF10" DETERMINES ( "OFF10_CD", "OFF10_DSCR" )
    ATTRIBUTE "OFF20" DETERMINES ( "OFF20_DSCR", "OFF20_CD" )
    ATTRIBUTE "OFF30" DETERMINES ( "OFF30_DSCR", "OFF30_CD" )
    ATTRIBUTE "OFFKEY" DETERMINES ( "OFFKEY_DSCR", "UPDATE_DATE", "OFFKEY_CD", "UPDATE_BY", "CREATE_DATE", "CREATE_BY" )
    CREATE TABLE "D_OFF"
    ( "DIMENSION_KEY" NUMBER NOT NULL ENABLE,
    "OFF10_ID" NUMBER,
    "OFF10_DSCR" VARCHAR2(200),
    "OFF10_CD" VARCHAR2(500),
    "OFF20_ID" NUMBER,
    "OFF20_CD" VARCHAR2(500),
    "OFF20_DSCR" VARCHAR2(200),
    "OFF30_CD" VARCHAR2(500),
    "OFF30_DSCR" VARCHAR2(200),
    "OFF30_ID" NUMBER,
    "UPDATE_DATE" DATE,
    "CREATE_DATE" DATE,
    "UPDATE_BY" VARCHAR2(250),
    "OFFKEY_ID" NUMBER,
    "CREATE_BY" VARCHAR2(250),
    "OFFKEY_CD" VARCHAR2(500),
    "OFFKEY_DSCR" VARCHAR2(200),
    CONSTRAINT "OFFE_DIMENSION_KEY_PK" PRIMARY KEY ("DIMENSION_KEY")
    My source table is
    CREATE TABLE "R_OFF"
    ( "DIMENSION_KEY" NUMBER NOT NULL ENABLE,
    "OFF10_DSCR" VARCHAR2(200),
    "OFF10_CD" VARCHAR2(500),
    "OFF20_CD" VARCHAR2(500),
    "OFF20_DSCR" VARCHAR2(200),
    "OFF30_CD" VARCHAR2(500),
    "OFF30_DSCR" VARCHAR2(200),
    "UPDATE_DATE" DATE,
    "CREATE_DATE" DATE,
    "UPDATE_BY" VARCHAR2(250),
    "OFFKEY_ID" NUMBER,
    "CREATE_BY" VARCHAR2(250),
    "OFFKEY_CD" VARCHAR2(500),
    "OFFKEY_DSCR" VARCHAR2(200),
    Could you please let me know how to load the dimension via plsql.
    Best Regards,
    Sri

    I assume you're quite sure that the relevant dimension does at least sometimes get updated by the build process, and that you've searched the outline just in case the member was added somewhere you didn't expect.
    How is the data pulled in to the load rule? If it's from a relational database, check the SQL query used to extract it (could there be a WHERE clause restricting records)? If it's from a flat file, check the select / reject criteria set up in the load rule.
    Another possibility is that your load rule is set up to skip X lines at the beginning, and the new member appears there.
    You could build a brand new load rule against a test copy of the cube and confirm that ABC does build in successfully (that at least tells you that the problem is in your rule somewhere).

  • Discovery web services in java uddi registry via php-pear

    I have published my web service in java uddi registry and I want to discovery this web services via php-pear.
    The pear code has not the setting about this uddi registry. The pear code for IBM and Microsoft registries are:
    'IBM' =>
    array(
    'Inquiry' =>
    array(
    'url' => 'www-3.ibm.com/services/uddi/testregistry/inquiryapi',
    'port' => 80),
    'Publish' =>
    array('url' => 'https://www-3.ibm.com/services/uddi/testregistry/protect/publishapi',
    'port' => 443)),
    'Microsoft' =>
    array(
    'Inquiry' =>
    array(
    'url' => 'test.uddi.microsoft.com/inquire',
    'port' => 80),
    'Publish' =>
    array(
    'url' => 'https://test.uddi.microsoft.com/publish',
    'port' => 443))*/);
    I add the code below for java registry but the code don't work.
    'JAVA' =>
    array(
    'Inquiry' =>
    array(
    'url' => 'localhost/soar/registry/soap',
    'port' => 8080),
    'Publish' =>
    array('url' => 'http://localhost/soar/registry/soap',
    'port' => 8080))
    The error from php code is :
    <rs:StackTrace xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0">javax.xml.registry.JAXRException: Unable to Unmarshall request
         at org.freebxml.omar.common.BindingUtility.getRequestObject(BindingUtility.java:355)
         at org.freebxml.omar.server.interfaces.soap.RegistrySOAPServlet.onMessage(RegistrySOAPServlet.java:184)
    Can anyone help meeeeeeeeeeeee?
    Message was edited by:
    paixtis

    Hello
    It means what it sais, your J2EE_ADMIN user doesn't have enough authorization.
    Chech if the appropriate authorization is assigned in your abap stack which belongs to the java stack you logon to:
    Role SAP_J2EE_ADMIN should be assigned to user J2EE_ADMIN.
    Kind regards
    Tom
    Edited by: Tom Cenens on Dec 17, 2010 2:55 PM

  • Externally loaded FLV

    In my SWF fie, I have an externally loaded FLV file.
    I now want to add another FLV that will load and play
    automatically when the first one is finished.
    I actually want the SWF to jump to a new scene when the first
    movie is done.
    How can I do that/ what the actionscript?
    Steven

    Hey Steven,
    I am not very sure but just giving a shot answering it...
    You can use FLVPlayback.complete event to detect the
    comepletion of first flv and set the path of other flv on complete.
    Something like this:
    import mx.video.*;
    my_FLVPlybk.contentPath = "
    http://www.helpexamples.com/flash/video/clouds.flv";
    var listenerObject:Object = new Object();
    // listen for complete event; play new FLV
    listenerObject.complete = function(eventObject:Object):Void {
    if (my_FLVPlybk.contentPath == "
    http://www.helpexamples.com/flash/video/clouds.flv")
    my_FLVPlybk.play("
    http://www.helpexamples.com/flash/video/water.flv");
    my_FLVPlybk.addEventListener("complete", listenerObject);
    Hope that works...

  • Accessing a JD Edwards database via PHP

    Hi,
    Would anyone be able to tell me if it is possible to access a JD Edwards installation via PHP? Our web interface requires JD Edwards integration. If this is possible, where would I find documentation about this?
    Thanks,
    Geoff

    We used IBM DB2Connect software which allows you to use AS400/iSeries native commands. The web developer handled the setup on the application server so I don't have any details on the setup, but your IBM representative should be able to help you or get you in touch with someone who can help you.

  • Load balancing via CHOC12/STS3

    Hi, our customer has a connection between 2 x 12012 via the 4 embedded channels of CHOC12/STS3 module.As every subinterface has its own ip-subnet we have 4 equal paths to every destinations.
    Customer wants to configure dCEF per-packet load balancing and is concerned if he can get packet sequence problems for his VoIP applications like it may happen on 'normal' equal path cost connections when load balancing per-packet instead of per-destination.
    Does anybody know if this can be a concern on the embedded channels ?
    Regards Guenther

    Generally speaking, for a given source-destination pair, with Per-packet load balancing enabled, packets might take different paths which could introduce reordering of packets. Thus Per-packet load balancing is inappropriate for voice over IP traffic and also for certain other types of data traffic that require packets received to be in sequence. For more information please see
    http://www.cisco.com/en/US/products/sw/iosswrel/ps1828/products_configuration_guide_chapter09186a00800ca62c.html#3589. Whether the CHOC12/STS3 module has some special meachanism built in to take care of this is unknown to me. Per-packet load balancing via CEF is not supported on Engine 2 Gigabit Switch Router (GSR) line cards (LCs).

  • List group members via PHP

    I need to query NDS via PHP to get the member list of a group. I would
    like to do this via an anonymous bind, but can provide credentials if
    necessary. Any help would be appreciated.
    JM
    jmoseby
    jmoseby's Profile: http://forums.novell.com/member.php?userid=35190
    View this thread: http://forums.novell.com/showthread.php?t=387219

    jmoseby;1861509 Wrote:
    > Nevermind - figured it out:
    >
    > >
    Code:
    > > <?php
    >
    > function getMembers($group){
    > $ldap_server='10.1.10.200';
    > $ldap_user='admin';
    > $ldap_pw='notreallytheadminpassword!';
    >
    > $ldap = ldap_connect($ldap_server);
    > @ldap_start_tls($ldap);
    > @ldap_bind($ldap,"cn=$ldap_user,o=GSO", "$ldap_pw");
    > $results = ldap_search($ldap,"o=GSO", "cn=$group");
    > $user_info = ldap_get_entries($ldap, $results);
    >
    > foreach($user_info[0][member] as $member){
    > $member_exp=explode('=',$member);
    > $member_exp=explode(',',$member_exp[1]);
    > if($member_exp[0]!=''){$members[]=$member_exp[0];}
    > }
    > ldap_close($ldap);
    > return $members;
    > }
    >
    > $members=getMembers('BalanceOnOrder');
    > echo '<pre>';print_r($members);
    >
    > ?>
    > >
    Corrected code: removed single quotes around $ldap_server variable in
    ldap_connect() line.
    jmoseby
    jmoseby's Profile: http://forums.novell.com/member.php?userid=35190
    View this thread: http://forums.novell.com/showthread.php?t=387219

  • When you load Windows via Boot Camp Assistant program and run Windows does not recognize the "usb" outlets cannot identify the device through the Dvd or flash

    When you load Windows via Boot Camp Assistant program and run Windows does not recognize the "usb" outlets cannot identify the device through the Dvd or flash

    Did you install BC drivers on the Windows side?

  • Loading HTML or PHP page in flash

    Hi,
    I would like someone to tell me if there is a way to load html or php page in flash just like a movieclip without actually navigating from the flash player(by using getURL code). Basically, I am wondering if there is a way to load a html file just like we load movieclips and perform all the functions of html page.
    Thanks,
    Abinash

    No.  Flash can only display html content in textfields and only supports a very limited number of html tags (look up the htmlText property of TextFields).  So to display an html/php file is not possible.

Maybe you are looking for

  • Data in application based on User logged in

    Hi, We have a requirment in our project in which we need to prefill few fields of all pages of application based on the user logged in. The required information to be populated in application is available in database table. When the page is gettign l

  • Custom jsp tags

    Is ther anyway to get a custom tag to accetp ${variableName} syntax instead of <%= variableName %>? Im working with a DynaValidatorForm and the form values don't seem to be accessible via <%= %> calls. If there is no other way ot getting variable inf

  • Help - Rotating text/picture problem in Motion 4!

    Hi, Can anyone help me out? When trying to make text face the camera and rotate like a merry-go-round, the 'face camera' option makes all the characters face the camera as they go around - like this.. http://i83.photobucket.com/albums/j293/tekiesha/m

  • Upgraded to 11g and now Apex_email is not working

    Hi, This weekend we just upgraded our db to 11g and it appears that apex_email will not send out email. Prior to upgrading it worked just fine. Does anyone have any suggestions as to what I might have forgotten? Thanks in advance Wayne Cole

  • Fetch-Xml based report (to count User Access in the last 6 months ) for Microsoft Dynamics CRM Online

    Hi, I have created a User Access report for CRM on-premise using SQl query in the following format. One row corresponds to one user in organization. Currently, I am using Microsoft Dynamics CRM Online trial version and have two users in my organizati