Encoding Control

Starting the Encoding Process

The command start will start up the encoding processes under a Live Stream Configuration. Under most Profiles, you will need to ensure that you are already supplying the source stream into the publish point as defined by the Profile you are using.

Note: It may not always be possible to start encoding on a Live Streaming Configuration you have just set-up. For example, it may take some time for the CDN publish points to propagate. Please read carefully the documentation for your chosen Profile.

Note: Your account is configured with access to a fixed amount of Live Encoding Compute Units (LECUs). The Profile you chose for your Live Stream Configuration will consume a certain number of your available LECUs when it is encoding. Therefore, if you request the start up of encoding on a Live Stream Configuration that requires more LECUs than your account has currently available, the Live Stream Configuration will be put into an active, but not running state (and return a success code).  If this happens, free up used LECUs by stopping the encoding under any unwanted Live Stream Configurations, the Live Stream Manager will automatically start encoding on any active Live Stream Configuration that are not currently running.

Invocation

http://lsm.cds1.yospace.com/lsm/start?id=i

Where i is the ID of the Live Stream Configuration that you wish to start encoding under.

Note: This command is a request to perform the required action, therefore when it returns the required action may not yet be complete.  Use the get command to check the status of the Live Stream Configuration to test for the request's completion.

Returns

Calls return {"ERRORS" : []} where [] is an array of error strings if the command was not successful.  The following HTTP result codes also apply:

  • HTTP status 201: Command Successful, but not yet complete. See note above.
  • HTTP status 400: Invalid Request (ID not found, for example)
  • HTTP status 401: Must Authenticate (basic authentication is required in HTTP headers)
  • HTTP status 500: Unexpected Error

Stopping the Encoding Process

The command stop will stop up the encoding processes under a Live Stream Configuration. This frees up any ECEs that are being used under this Live Stream Configuration, however it does not delete the Live Stream Configuration and therefore you can use the start command to resume the encoding later.

Invocation

http://lsm.cds1.yospace.com/lsm/stop?id=i

Where i is the ID of the Live Stream Configuration that you wish to stop encoding under.

Note: This command is a request to perform the required action, therefore when it returns the required action may not yet be complete.  Use the get command to check the status of the Live Stream Configuration to test for the request's completion.

Returns

Calls return {"ERRORS" : []} where [] is an array of error strings if the command was not successful.  The following HTTP result codes also apply:

  • HTTP status 201: Command Successful, but not yet complete. See note above.
  • HTTP status 400: Invalid Request (ID not found, for example)
  • HTTP status 401: Must Authenticate (basic authentication is required in HTTP headers)
  • HTTP status 500: Unexpected Error

Restarting the Encoding Process

The command restart will restart up the encoding processes under a Live Stream Configuration. Some Profiles may require a restart of the encoding process if the live source feed is interrupted. Consult your chosen Profie's documentation.

Invocation

http://lsm.cds1.yospace.com/lsm/restart?id=i

Where i is the ID of the Live Stream Configuration that you wish to restart encoding under.

Note: This command is a request to perform the required action, therefore when it returns the required action may not yet be complete.  Use the get command to check the status of the Live Stream Configuration to test for the request's completion.

Returns

Calls return {"ERRORS" : []} where [] is an array of error strings if the command was not successful.  The following HTTP result codes also apply:

  • HTTP status 201: Command Successful, but not yet complete. See note above.
  • HTTP status 400: Invalid Request (ID not found, for example)
  • HTTP status 401: Must Authenticate (basic authentication is required in HTTP headers)
  • HTTP status 500: Unexpected Error