Determine Video Transcode Failure

Last post 03-19-2008 3:59 AM by BarryR. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-07-2008 3:35 PM

    Determine Video Transcode Failure

    Hi, How do we determine if a transcode has failed - can we do this from the callback? I have set off some encoding operations (with no errors on the webservice response) but have no videos back from the encoder (2-3 hours later). So I need someway to get any error if there was one. Anthony
    Filed under:
  • 03-07-2008 8:03 PM In reply to

    • BarryR
    • Top 10 Contributor
    • Joined on 07-20-2007
    • San Diego
    • Posts 630

    Re: Determine Video Transcode Failure

    You could use a simple callback handler in PHP the following code.  It will output in the same directory (Assuming you have permissions to write to the directory) a file called requestlog.txt.

     

    <?php

    $myFile = "requestlog.txt";
    $fh = fopen($myFile, 'a') or die("can't open file");
    fwrite($fh, 'Requesting URI: ' . $_SERVER['REQUEST_URI'] . "\r\n");
    fwrite($fh, 'Request Time: ' . date("D M j G:i:s T Y") . "\r\n");
    fwrite($fh, 'Query String: ' . $_SERVER['QUERY_STRING'] . "\r\n\r\n");

    fclose($fh);

    ?>

    Be sure to verify the user running the web server has access to write to that directory or this will fail.  Optionally you can change the directory to one where the user can write files.

    Regards,
         Barry R.   

    IM Support (Feel free to add me)

    MSN: barryruffner@msn.com
    Gmail: barryruffner@gmail.com
  • 03-14-2008 10:34 PM In reply to

    Re: Determine Video Transcode Failure

    How do I process this callback in ASP.net?

  • 03-19-2008 3:59 AM In reply to

    • BarryR
    • Top 10 Contributor
    • Joined on 07-20-2007
    • San Diego
    • Posts 630

    Re: Determine Video Transcode Failure

     In asp.net you would likely use a aspx page.  In your callback for that page you could do:

     --- Edit ---

    After some ribbing from my fellow developers they brought up the point that only the server would be able to see this page, so I'm going to change this to write to a file instead.

    --------------- 

    private void Page_Load(object sender, System.EventArgs e)
    {

    System.IO.StreamWriter StreamWriter1 = 
    new System.IO.StreamWriter(Server.MapPath("querylog.txt"));
    StreamWriter1.WriteLine(Request.QueryString.ToString());
    StreamWriter1.Close();

    }

    This will write the query string to the the file querylog.txt.  Optionally you could get the specific values by using the request indexer such as Request["Nvx.ErrorMessage"].

    Regards,
        Barry R.

    IM Support (Feel free to add me)

    MSN: barryruffner@msn.com
    Gmail: barryruffner@gmail.com
Page 1 of 1 (4 items)