Live Stream midroll ad injection in Wowza Streaming Engine - streaming

I haven't found any way to automate inserting an ad spot into an existing live stream without stopping the streams and/or using a Flash client to interact with Wowza.
The idea is that these ads can be randomly chosen and inserted into the stream programatically & automated.
Can someone please point me in the right direction of how to properly change sources on the fly?
Thanks!

The following articles may be of interest for you
https://www.wowza.com/docs/how-to-switch-streams-using-stream-class-streams
https://www.wowza.com/docs/how-to-control-stream-class-streams-dynamically-modulestreamcontrol
https://www.wowza.com/docs/how-to-use-ipublishingprovider-api-to-publish-server-side-live-streams
I've previously created a custom module for Wowza that allows you to create an output stream from a live input stream, then control the output and switch between the live input stream and other live or on demand streams.

Related

Realtime meta-data/ captioning for live streamed audio

How might I achieve adding a track of accurately aligned real-time "additional" data with live-streamed audio? Primarily interested in the browser here, but ideally the solution would be possible with any platform.
The idea is, if I have a live recording from my computer being sent into Icecast via something like DarkIce, I want a listener (who could join a stream at any time) to be able to place some kind of annotation over a few of the samples and allow them to send only the annotation back (for example, using a regular HTTP request). However, this needs a mechanism to align the annotation with the dumped streamed audio at the server side, and in a live stream, the user AFAIK can't actually get the timestamp in the "whole" stream, just from when they joined. But if there was some kind of simultaneously aligned metadata, then perhaps this would be possible.
The problem is, most systems seem to assume you "pre-caption" or multi-plex your data streams beforehand. However, this wouldn't make sense for something being recorded and live-streamed in real-time. Google's examples seem to be mostly around their ability to do "live captioning" which is more about processing audio in real-time then adding slightly delayed captions using speech recognition. This isn't what I'm after. I've looked into various ways data is put into OGG containers, as well as the current captioning like WebVTT, and I am struggling to find examples of this.
I found maybe a hint here: https://github.com/w3c/webvtt/issues/320 and I've been recommended to look for examples by Apple and Google using WebVTT for something along these lines, but cannot find these demos. There's older tech as well (Kate, CMML, Annodex, etc) but none of these are in use and are completely replaced by WebVTT. Perhaps I can achieve something like this web WebRTC, but I'm not sure this gives any guarantees on alignment and it's a slightly different technology stack that I am looking at in this scenario.

Detect stream in data load editor in Qlik Sense

Is it possible to get stream related information in data load editor in Qlik Sense App? I cannot create new apps. I can access other information like app id, app path etc.
The stream that an application is published in, to the best if my knowledge, is not available by a System function within the load script. You can certainly pull that information from the Repository API inline. The obvious candidate for doing so would be the monitor_apps_REST_app data connection which should be present on your system. You should be able to pass the combination of DocumentName() as a variablized WHERE clause into the REST connection pull and then store the stream name or ID.
What is the ultimate use case?

How to take RTMP AMF frame by frame metadata and insert it into the saved MP4 video file?

I can't seem to find a way in Wowza or any other solution like nginx-rtmp-module to take a live stream's RTMP metadata and insert it into the specific frames of the MP4 saved file.
Maybe I'm looking at this the wrong way, but our live streaming app only allows the broadcaster to post comments/feedback and we want to make sure the viewers see those comments on the exact frame that the comment was made on by the broadcaster. We tried having the two being separated where the video was streamed via wowza and the comments sent to clients via PubNub but there is just to much variance on when the comments show up.
The only way I can think of is to include the broadcaster comments inside metadate for the specific frame the comment was made. Then we'd be guaranteed to have the comment show up in the right place.
Help is much appreciated.
Thanks!

How do I extract streamed "now playing" data embedded in an Icecast audio (radio) stream on Samsung Smart-TV

I am creating a Samsung TV app for a radio station and they provide the "Now Playing" info within the Icecast stream. Is it possible to (and how do I) extract this information?
Shoutcast supports "Icy-MetaData" - an additional field in the request header. When set, its a request to the shoutcast server to embed metadata about the stream at periodic intervals(once every "icy-metaint" bytes) in the encoded audio stream itself. The value of "icy-metaint" is decided by the shoutcast server configuration and is sent to the client as part of the initial reply.
Check out this post on Shoutcast Internet Radio Protocol for details on icy:metadata and sample code in C.
A somewhat more technical discussion is also available at
http://forums.radiotoolbox.com/viewtopic.php?t=74
Yes, this is possible. The metadata is interleaved into the stream data at a specified interval. Basically, you read 8192 bytes (or whatever is specified by the Icy-MetaInt response header), and then you read the metadata block.
The first byte of that metadata block tells you the length of the data. A length of 0 means there is no updated metadata.
Once you read the meta block, then you go back to reading stream data.
I have all of this in more detail on my answer here: https://stackoverflow.com/a/4914538/362536 While I know you're not writing PHP, the principal is identical no matter what language.
From native player there is no option to get this meta.
You could probably use jQuery.stream plugin to fetch the meta directly - but you need to setup Access-Control-Allow-Origin on you icecast server - but I have no idea if it will work.
The best solution here will be to use this script:
http://code.google.com/p/icecast-now-playing-script/
So you install this script on your web server and from the SmartTV application you will AJAX it once for a while, while your stream is playing.
I just created a radio player for icecast and centova, it uses lastFM api to extract the song meta data. https://github.com/johndavedecano/Icecast-Centova-LastFM-API
If you are doing this for a radio station, then they can provide this data through the XSLT feature of Icecast. Some random old XSLT examples for offering stream metadata that I did at some point.
The other option is to run Icecast 2.4.1 or add the two files (xml2json.xsl status-json.xsl) to an old version.
Note that only Icecast 2.4.1 or newer supports adding CORS/ACAO headers that might be necessary to access data from a web app / web site.
If you are not directly cooperating with the radio station and can't ask them to do this, then disregard this answer. Someone else might find it useful though.

Flash Media Interactive Server with MogileFS

Is it possible to get Flash Media Interactive Server working in conjunction with MogileFS? What it boils down to is that I need FMIS to fetch the FLV files from MogileFS over HTTP. As far as I can tell, however, the FMIS can only fetch and stream files from a local store :/
Anyone have experience with this or other ideas?
Thanks!
You can use a psuedo streaming setup using the PHP xmoov script, then fetch the needed bytes of the files from MogileFS using PHP, and then push them to the client one chuck at the time.