IMediaStream stream.getName is empty. How come?

After getting sidetracked for the last couple months trying to do things with Flash Media Server, I am finally back to using the proper tool for the job - Wowza.

I need an application that will both serve up a live stream and record it to an archive file, but without requiring the user to click the “Record” button in FMLE. Should be a really simple task. I’ve done this on a Wowza edge server, but am now trying to do so on an origin server.

In my onStreamCreate function I’ve got:

public void onStreamCreate(IMediaStream stream) {

String streamName = stream.getName();

getLogger().info("onStreamCreate: stream name is " + streamName);

}

When I start my FMLE encoding, my log window shows:

INFO server comment - onStreamCreate: stream name is

I’m not sure why I’m not seeing the stream name. FMLE is pushing it’s stream to rtmp://10.1.10.26/cstv with a stream name of dan. stream.getSrc() returns 1, and stream.getContextStr() returns cstv/definst

Any ideass why the stream name is blank?

onStreamCreate is too soon for stream name. Use StreamType liverepeater-origin-record.

Richard

For moving/renaming, take a look at :

https://www.wowza.com/docs/how-to-move-recordings-from-live-streams

Or for finer control:

https://www.wowza.com/docs/how-to-use-imediawriteractionnotify-to-programmatically-move-and-rename-recordings-of-live-streams

Richard

Excellent! Thanks for that suggestion. That does indeed capture the stream just like I need.

All I need to do now is manipulate the file name the stream gets stored to. I recall having done that before in a StreamListener, so I’ll take a look at how I did that before.

I’ve got to say, doing this stuff purely in Wowza is so much simpler and straightforward than trying to do it with FMS.