I am having trouble pushing omMetaData event from live encoder to jwplayer or any other player.
- ns.send("@setDataFrame", “onMetaData”, metaData);
This method ensures i get a proper onMetaData event . but it happens only once.
-
if i use something like ns.send(“onMetaData”, metaData); the player responds with a #2095 Error saying could not invoke callback onMetaData.
-
Wowza server side injectmetadata method seems to work, but i need to be able to push metadata from client side encoder to client side player.
-
I wish to invoke onMetaData itself continuously and i cant use a custom handler. is this possible ?
Any comments or guidance regarding this ? anyone ?
When you use “@setDataFrame” in NetStream.send() you are adding to the metadata associated with the whole stream. Metadata is received by playback clients when they begin streaming.
When you use NetStream.send() otherwise you are setting a cuepoint that is associated with the timecode in the stream when it was injected. I can see where there might be a conflict using “onMetaData” as the name of a cuepoint, in any case it won’t do what you want.
The only way to push data in the stream continuously and have it received continuosly is to use cuepoints, but you do have to modify the playback client to process them
Richard
Yes, you will see any metadata you add to the live stream in JW Player’s onMeta handler, which is shown for example in the Wowza JW player 6 guide
Richard
You have to have a server-side function named “injectMetaData”, similar to the one in that example named “setCaption”. Have you created an application module with the Wowza IDE?
Richard
It looks like you are using the wrong example as a starting place. For cuepoints you want to follow the setCaption example. This injects timed-text. It happens to show how to inject a cuepoint that is widely recognized by many players to display captions, these players have listeners for a cuepoint of that name and signature. You can use that method to create cuepoints of any name, with any parameters. Then you use your Flash RTMP client to listen for and process cuepoints as they come through in the stream, as they are associated with a timecode in that stream. You seem to be following the metadata injection example.
The example you want to modify is this one:
public void setCaption (IClient client, RequestFunction function, AMFDataList params)
{
String streamname = params.getString(PARAM1);
String text = params.getString(PARAM2);
String language = params.getString(PARAM3);
String trackid = params.getString(PARAM4);
IMediaStream stream = client.getAppInstance().getStreams().getStream(streamname);
//essential code
AMFDataMixedArray data = new AMFDataMixedArray();
data.put("text", new AMFDataItem(text));
data.put("language", new AMFDataItem(language));
data.put("trackid", new AMFDataItem(trackid));
stream.sendDirect("onTextData", data);
getLogger().info("Caption: " + text);
}
The injects a cuepoint named “onTextData” which includes an AMFDataMixedArray with 3 fields. In Flash, you need something like this to process this cuepoint:
var clientObj:Object = new Object();
clientObj.onTextData = function(data:Object):void
{
trace(data.text);
});
netstream.client = clientObj;
netstream.play("myStream");
Note that the AMFDataMixedArray you send on the server-side corresponds with the data:Object of the client-side callback function.
Richard
Hi,
If you use ns.send(“onCuePoint”, metaData); in the encoder then the player must have a method called onCuePoint that is associated with the player netStream.client.
I’m not sure what event handlers jw player has set up by default on the netStream.client object so you would need to look at and modify the source code yourself.
Roger.
When you use “@setDataFrame” in NetStream.send() you are adding to the metadata associated with the whole stream. Metadata is received by playback clients when they begin streaming.
When you use NetStream.send() otherwise you are setting a cuepoint that is associated with the timecode in the stream when it was injected. I can see where there might be a conflict using “onMetaData” as the name of a cuepoint, in any case it won’t do what you want.
The only way to push data in the stream continuously and have it received continuosly is to use cuepoints, but you do have to modify the playback client to process them
Richard
Thank you for your response richard.
Can you tell me this:
-
I use jwplayer
-
If i use ns.send(“onCuePoint”, metaData); every second
-
Will i get a onMeta callback in jwplayer onMetaData handler or something ?
jwplayer().onMeta(function(event) {
// Do something
})
What do i need to modify the player for ? I do not want to use a custom handler. I would like to use any of the built in metadata handlers. Would it be possible ?
can anyone tell me how to inject cue point . i followed the link.
https://www.wowza.com/docs/how-to-inject-cue-points-or-metadata
my client side code : _nc.call(“injectMetaData”,null,“livefeed”,“technologies”);
im able to call function injectMetaData . but i dnt know if my stream is injecting cue point.
my codec is h264 using wirecast .
im able to send data with the stream to my clients using the code mentioned below.
stream.send(“CuePoints”, dataSync);
please revert.
yes i have made the module with wowza ide. i call the function injectMetaData on serverside. i also checked my logs . im able to see that my function has been called. also the code below is called inside the function.
stream.addDataData(datadata, 0, size) ;
now how to check if the metadata has been injected in the stream.
my slides are getting sync using the code mentioned below.
stream.send(“sendData” , slideNumber)
but im not able to inject cue point in my recoreded file.
Also i would like to know how can i slide change in wowza using HLS .
i would like to know if wowza has a solution both both the queries ive mentioned