Results 1 to 2 of 2

Thread: stopRecording API not working

  1. #1
    Join Date
    May 2016

    Default stopRecording API not working


    I'm running wowza streaming engine 4.1.0, and having some trouble with stream recordings. I'm using node.js from an external server to make HTTP requests to my wowza server.

    I can successfully start a recording with a digest GET request:

    var qs = QueryString.stringify({
    					app				:	'live',
    					streamname		:	stream,
    					action			:	'startRecording',
    				//	segmentDuration	:	30												//time in seconds
    				console.log("got querystring: " + qs);
    				var options = {
    					host	: 	"",
    					port	:	8086,
    					method	:	"GET",
    					path	:	"/livestreamrecord?"+qs
    				Digest.request( options, function ( res){
    					console.log("got start record response");
    					console.log("headers: ", res.headers);
    					console.log("statusCode is: ", res.statusCode);
    					console.log("statusMessage is: ", res.statusMessage);

    I get the output

    got querystring: app=live&streamname=befbf601688edf8a37f14604e93d5cb8&action=startRecording
    	CJR making disgest request
    	CJR got response headers:  { Authorization: 'Digest username="*****",realm="Wowza Media Systems",nonce="812a5ee5055dc9d72016a86b955474f7",uri="/livestreamrecord?app=live&streamname=befbf601688edf8a37f14604e93d5cb8&action=startRecording",qop="auth",response="951869cc72fb65f974222cf07b8b9f53",opaque="undefined",nc="00000003",cnonce="ee1a576d"' }
    	CJR making real request
    got start record response
    headers:  { location: '/livestreamrecord/index.html',
      'content-type': 'text/html',
      connection: 'Keep-Alive',
      server: 'WowzaStreamingEngine/4.1.0',
      'cache-control': 'no-cache',
      'content-length': '0' }
    statusCode is:  302
    statusMessage is:  Found

    The stop API just replaces startRecording with stopRecording and produces the output

    stopping record stream: befbf601688edf8a37f14604e93d5cb8
    got querystring: app=live&streamname=befbf601688edf8a37f14604e93d5cb8&action=stopRecording
    	CJR making disgest request
    	CJR got response headers:  { Authorization: 'Digest username="*****",realm="Wowza Media Systems",nonce="8c3bd2cb3fe52b1f14657a602d1fa5b9",uri="/livestreamrecord?app=live&streamname=befbf601688edf8a37f14604e93d5cb8&action=stopRecording",qop="auth",response="c9fb7d01a147052d365f69dfcfc08d08",opaque="undefined",nc="00000004",cnonce="353c2797"' }
    	CJR making real request
    got stop record response
    headers:  { 'www-authenticate': 'Digest realm="Wowza Media Systems",  nonce="ce8251f556a4859b0226363d1de5e34c", algorithm=MD5, qop="auth"',
      'content-type': 'text/html',
      connection: 'Keep-Alive',
      server: 'WowzaStreamingEngine/4.1.0',
      'cache-control': 'no-cache',
      'content-length': '0' }
    statusCode is:  401
    statusMessage is:  Unauthorized

    As such, the file isn't saved until the live stream is shut down, and I'm left with orphaned recording sessions that are waiting for streams on the livestreamrecord/index.html page.

    UPDATE: I was able to succesfully start and stop a recording session using my brower with the following API, so I know that my server configured correctly
    http://[username]:[password]@[wowza-ip-address]:8086/livestreamrecord?app=live&streamname=myStream&action=startRecording  OR action=stopRecording
    Based on this behavior, I would expect the api to return a 302 redirect upon a successful call, but I'm still seeing a 401 unauthorized from my node.js server.

    UPDATE2: I must have been formulating my "stop" function incorrectly. I did a copy/paste of the start recording function and replaced start with stop and not everything is working, however it's extremely slow. It takes about 8 seconds to get a response from my wowza server, instead of ~150mS when I make the request from a browser.
    Last edited by Roedy13; 05-27-2016 at 08:15 AM.

  2. #2
    Join Date
    May 2016


    If you're just looking for start and stop recording, the wowza-control module for node.js works quite well, and is set up by default to make digest requests.

    Also, this page was very helpfull-->

Similar Threads

  1. Replies: 1
    Last Post: 12-07-2015, 05:24 AM
  2. Rest API stop recording not working
    By piotrg in forum Wowza Streaming Engine REST API
    Replies: 1
    Last Post: 11-02-2015, 07:07 AM
  3. REST API 4.1.2 call problem - POST methods not working in Swagger UI
    By keiserSoze in forum Wowza Streaming Engine REST API
    Replies: 1
    Last Post: 06-30-2015, 06:45 AM
  4. Java API to resolve SMIL file (AMLST) - Not working for HDS and HLS
    By ciroanunciacao in forum Wowza Streaming Server Java API
    Replies: 4
    Last Post: 06-29-2015, 03:17 PM
  5. Playback API not working
    By vikramvm in forum AddOn: Wowza nDVR
    Replies: 0
    Last Post: 02-04-2013, 11:49 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