I had a head banging moment last night trying to help a mate out to stream an FLV from Akamai (also seen on Wowza) using the latest Spark VideoPlayer component. We had a working flv streaming in the old mx:VideoDisplay absolutely fine, update the component to the Spark equivalent and nothing, nowt, nada, not even a glimmer?
// OLD MX COMPONENT - WORKS FINE <mx:VideoDisplay source="rtmp://myserver.com/my_application/my_stream.flv" />
// NEW SPARK COMPONENT - DOES NOT WORK!! <s:VideoDisplay source="rtmp://myserver.com/my_application/my_stream.flv" />
My first thought was I that when the component was upgraded, the syntax was changed for defining the source string? After a chat with Stefan he also mentioned that as the VideoPlayer/VideoDisplay is now built on OSMF this would most likely be the case.
I then started looking through the docs to find out what the syntax is for streaming an FLV in the latest spark components (a fairly common practice I would have thought), damned if it was a quick find for me! The typical example I found was as below:
source="rtmp://fmsexamples.adobe.com/vod/mp4:_cs4promo_1000.f4v"
Then we started playing with DynamicStreamingVideoSource and I stumbled over the thought that I should dig into OSMF documentation more and eventually found the solution but buggered if I can find it again and I flippin' forgot to bookmark (there may be alternatives but this worked):
// WORKS!!! <s:VideoDisplay source="rtmp://myserver.com/my_application/?streamName=my_stream&streamType=flv" />


One Comment
Try this, also make sure you put mp4: infront of your stream name if it's an f4v/mp4 file, i.e. "mp4:my_stream.f4v"
var dynSource:DynamicStreamingVideoSource = new DynamicStreamingVideoSource();
dynSource.host="rtmp://myserver.com/my_application/";
var dynItem:DynamicStreamingVideoItem = new DynamicStreamingVideoItem();
dynItem.streamName="my_stream.flv";
var dynVector:Vector. = new Vector.();
dynVector.push(dynItem);
dynSource.streamItems=dynVector;
videoDisplay.source=dynSource;
One Trackback
[...] This post was mentioned on Twitter by cfbloggers and Ultra Red, karannnnnnnnnnn3. karannnnnnnnnnn3 said: Streaming an FLV using Spark VideoPlayer/VideoDisplay: I had a head banging moment last night trying to help a mat... http://bit.ly/dlnULV [...]