Skip to main content
Oct 8, 2012 5:43 PM UTC
Question

auto increment liveevent streamname folder/directory for each publish while same streamid string?

Is it possible to auto increment a streamname when publishing to FMS?

Instead of appending to the same folder/directory of the liveevent and stream files when publishing and unpublishing, is there an option to which if a stream is unpublished and republished to starts a new folder/directory _1, _2, _3, etc?

Or even better, to name the folder with a timestamp of the publish? instead of _1, _2, _3 -- _2012oct8-2101, _2012oct9-0644, _2012oct10-1833

Thanks.

This topic is closed to new replies. Start a new post to keep the conversation going.

6 replies

Inspiring
Oct 17, 2012 9:18 AM UTC

Hi,

New folders would mean separare manifest files, which would have no way to be referenced from the client side.

As far as I know there are only two publishing modes:

     1. The default append mode

     2. The record mode, which creates new assets everytime the publishing is stopped and started.

     livestream?adbe-live-event=liveevent&adbe-record-mode=record

Thanks,

Shiven


Translate
Oct 22, 2012 8:53 AM UTC

Hi Shiven:

Yes this is correct, but when replublishing with &adbe-record-mode=record, it deletes the existing instance. Is there a way to auto-increment the instances with this mode?


Translate
Inspiring
Oct 23, 2012 1:04 PM UTC

Hi,

I think we should be able to do this.

First - Do not specify any query string in your publish string. Just say 'livestream'. This means you are not assigning any event name.

In the livepkgr main.asc, check out the function application.onPublish. When no event name is defined, the application uses the stream name itself as the event name. The code in livepkgr main.asc corresponding to this;

if (queryString == undefined || (queryString.localeCompare("") == 0)) {

        /* Did not find query string so use the streamname as the event id */

        trace("Query string not specified. Using StreamName["

              +streamObj.name+"] as eventname");

Now, to accomplish your task, all you need to do is append some marker to this stream name.

Essentially here:

var liveEventName = streamObj.name

I will leave it to you to make use of timestamps, shared objects etc. to keep track of the event name and incerement it for every publish attempt.

As as example, if you do something like this:

var liveEventName = streamObj.name + "Test"

Your event name will be livestreamTest

I hope this helps in some way.

Thanks,

Shiven

Translate