Wowza Community

How to inject cue points or metadata using SDK

Is it possible and is there example code about injecting cue points / metadata using the GoCoder SDK? All I can find is old articles (https://www.wowza.com/docs/how-to-inject-cue-points-or-metadata) that describe adding cue points later, but I want to be able to add the cue points through the SDK while recording.

Metadata API is a prioritized feature for GoCoder SDK. This is work in progress. We are planning to deliver this feature in the coming weeks or months.

Hi,

This is currently not supported for the GoCoder SDK, although it is in our product roadmap. Do keep an eye on our release notes for GoCoder SDK and see when this feature is added.

Michelle

Any news about when this feature may become available?

Hello SiggDev,

Not at this time, this has been submitted to our enhancement request list, and it is something we may add in the future, though there is no definitive timeframe as to when we will support it. Please do check back in periodically to our Software Updates page to see if your feature request has been deployed.

https://www.wowza.com/docs/software-updates

Regards,

Alex

Any news on this feature?

I’ve been using metadata insertion in GoCoder SDK for a long time now. Became available for testing sometime in the beginning of this year, not sure when it became official.

Interesting! Mind sharing some code how you do this?

As I’m not an IOS/android developer, here’s some code sample from my colleague doing the actual development - I’ll put it in a separate post, as reply here has limited number of characters.

WowzaGoCoder *goCoder;
NSDate *currentDate;
CGFloat *currentFrame;
NSString *streamName;
		
- (void) videoFrameWasEncoded:(nonnull CMSampleBufferRef)data {

	// the following code is used to send metadata to the stream
	// metadata can be sent at any time, I usually send them every 60 frames 
	// I like to place the code inside videoFrameWasEncoded callback function, so I can “count” the 60 frames

    WZDataMap *dataMap = [WZDataMap new];
    [dataMap setDate:currentDate forKey:@"date"];
    [dataMap setFloat:currentFrame forKey:@"current_frame"];
    [dataMap setString:streamName forKey:@"stream_name"];

	//metadata can be sent to Stream scope or Module scope
    [goCoder sendDataEvent:WZDataScopeStream eventName:@"streamEvent" params:dataMap];
    [goCoder sendDataEvent:WZDataScopeModule eventName:@"onCustomMetaData" params:dataMap];
}

@Mathias Stjernström

Metadata is now an included feature in the SDK. Please refer to the sample app included in the SDK zip file for examples on how to use this.

Michelle