Results 1 to 7 of 7

Thread: PHP and Wowza to start recording a live stream

  1. #1
    Join Date
    May 2013
    Posts
    4

    Default PHP and Wowza to start recording a live stream

    To any one that can help.

    I am trying from a php script to to launch a url that will start recording on a specific stream i know that the url works because i can try it out side the code and it works.

    I have been using fopen() to open the url.

    Is there something else that works? All it does know is it times out.

    Alin

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Alin,

    In PHP I think it is the load(url) command.

    Richard

  3. #3
    Join Date
    May 2013
    Posts
    4

    Default

    Quote Originally Posted by rrlanham View Post
    Alin,

    In PHP I think it is the load(url) command.

    Richard
    I tried it with the load

    meaning this command

    http://php.net/manual/en/domdocument.load.php

    same error. I also have authentication enabled on the links.

    Alin

  4. #4
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Try using "admin-basic" authentication, then you can add in url:

    http://richard:myPwd@[wowza-address]:1935/[httpFilter]

    Add username and password to /conf/admin.password

    Richard

  5. #5
    Join Date
    May 2013
    Posts
    4

    Default

    Quote Originally Posted by rrlanham View Post
    Try using "admin-basic" authentication, then you can add in url:

    http://richard:myPwd@[wowza-address]:1935/[httpFilter]

    Add username and password to /conf/admin.password

    Richard
    Richard thank you for your help. But i still can not get it to work.

    The link works fine when i paste it in a browser and hit enter, with the "admin-basic" authenication, but when i try to send it from a php script it times out.

    I saw that your using port 1935 is that what you recommended?

    Alin

  6. #6
    Join Date
    May 2013
    Posts
    4

    Default

    So, I have been doing more research and i still have not been able to figure this out.

    Can i use curl to do this?

    here is an example of my code

    $ch=curl_init();
    curl_setopt($ch, CURLOPT_URL, "http://ip:8086/livestreamrecord?app=live&streamname=myStream_160p&outputFile=04_05_2013M_160p.mp4&startonkeyframe=t rue&action=startRecording");
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_USERPWD, "Username:Password");
    curl_exec($ch);
    curl_close($ch);

    Please help

    Alin

  7. #7
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    You put the username and password in-line, like this:
    curl_setopt($ch, CURLOPT_URL, "http://richard:myPwd@ip:8086/livestreamrecord?app=live&streamname=myStream_160p &outputFile=04_05_2013M_160p.mp4&startonkeyframe=t rue&action=startRecording");
    Richard

Similar Threads

  1. Start, stop, restart Wowza with PHP
    By kleelof in forum General Forum
    Replies: 2
    Last Post: 05-03-2014, 11:50 PM
  2. HTTP streammanager start stop streamaction php woza API
    By miguelpalacios in forum General Forum
    Replies: 1
    Last Post: 05-26-2013, 04:55 PM
  3. Start/Stop Livestream recording PHP
    By oomworld in forum General Forum
    Replies: 7
    Last Post: 04-12-2013, 01:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •