inject custom metadata into mp4 live stream so wowza can read it

Hello,

We are currently sending an mp4 live stream via FMLE to the wowza server and everythings great.

We would like to send some custom metadata in the stream on the fly, I realize FMLE may not be the right tool for this, are there any pointers on how to do this with another tool perhaps ?

We want to use this for dynamic midrolls.

Say a livestream is going on , we want to decide (on the fly) lets play a commercial in 10 seconds. So we want to pass a custom metadata event, saying play ad in 10 seconds. We can write something custom in wowza to grab this from AMFData or something, but the main thing is how do we even send it to wowza in the first place.

Thank you

Take a look at this guide:

https://www.wowza.com/docs/how-to-inject-cue-points-or-metadata

Inject cuepoints for what you are doing instead of metadata.

Richard

You need to listen for that cuepoint, something like:

// set up netstream for the callback on the live stream
nsPlayClientObj:Object = new Object();
nsPlayClientObj.custom1 = function(obj:Object):void
{
trace(obj.caption);
}
nsPlay.client = nsPlayClientObj;

Richard

Right, you can use that to convert these cuepoints to ID3 tags.

If you are using IMediaStream.sendDirect() the cuepoint should be included with what is pushed to the CDN. I don’t think there is any setting or property of PushPublisherRTMP necessary.

Richard

got it to work, nevermind. i wasnt listening for that particular event client side, i was expecting oncuepoint to work which will not.

thank you !

Could you post your flowplayer code? I’m doing something similar and cannot get it to work.

cool ill try that, thanks as always Richard for quick replies

Hi Richard

I have followed that post at https://www.wowza.com/docs/how-to-inject-cue-points-or-metadata

it shows that it is embedding the custom metadata

INFO server comment - CustomMetadata.injectMetaData: {MixedArray: param1: “custom1”, param2: “arpancustomstuff”}

The custom1 is what im passing to the stream to inject, arpancustomstuff is what im making up from the server module itself.

I dont see any errors in wowza log, so i am assuming it is writing to the stream.

When I try to look at the livestream, nothing shows though.

What am I doing wrong ?

im doing it in flowplayer.

i have debug on and oncuepoint method, but i dont get anything

got it to work, nevermind. i wasnt listening for that particular event client side, i was expecting oncuepoint to work which will not.

thank you !

this is working fine when i connect to the wowza server to view

  1. however it does not seem to propogate to the CDN (edgecast) using the push publish addon. is there a different way to write it on that?

  2. what can we do about HLS for this as well? Do I use the ID3 tags here? https://www.wowza.com/docs/how-to-convert-ontextdata-events-in-a-live-or-vod-stream-to-timed-events-id3-tags-in-an-apple-hls-stream

thank you

I created the modules for converting to ID3tags but kinda confused on how to use them.

how do we use these on a html5 video player for ios (not native).

We can play the video via the playlist.m3u8 in a html5 player, not sure where to go from here.

Any help is appreciated, thank you

you need to use this:

streamCallbacks: [‘yourcustomeventname’].

so it will look like this:

clip: {

url: ‘stream’,

scaling: ‘fit’,

provider: ‘rtmp’,

live: true,

yourcustomeventname: function(clip, info) {

console.log(info);

}

},

streamCallbacks: [‘yourcustomeventname’],