I use SWF Tools with Flash Field, and would like to be able to stream flash videos from a real flash streaming server (adobe streaming server). Any thoughts?

Comments

Stuart Greenfield’s picture

I've made a start on this, but as I don't have the funds (or need!) for Adobe's flash media server I'm using Red5 because it was free!

The latest version of SWF Tools on HEAD now has basic support for rtmp streaming, via Wijering 4 or FlowPlayer 3. To set it up you just use the regular SWF Tools filter syntax, but add a new parameter called "stream" in which you specify the path to the source.

For example,

<swf file="streamthis.flv" stream="rtmp://server/application">

That's all that is needed. The player modules will produce the necessary code to stream the content. For FlowPlayer 3 you also need to download the streaming plug in and add this to the FlowPlayer 3 shared files.

I only finished the code this evening, and it doesn't yet support playlists, but I want to start with single file capability! If you have a test server you want to try this out on please let me know how you get on. Locally I've been able to play a range of flv and mp3 files in both players.

PS - I know your request for streaming from FlashField, but FlashField is on the back burner at the moment. However, I really like the idea of SWF Tools supporting streaming, and it's been on my "to do" list for months!

perandre’s picture

Hi!
Thanks a lot for your words...and work! Glad to hear that you have been thinking about this, too. I'll be happy to test. For now, I've been using the flvmediaplayer module, but swf tools would be a more "complete" solution for some sites. Keep it up!

Stuart Greenfield’s picture

Streaming support is now in the new SWF Tools 6.x-2.0 release, and it works for single files with Wijering 4 and FlowPlayer 3. This release is an early version to get the support out in the open.

However, I've worked on it some more today and just made another commit to HEAD, this allows FlowPlayer 3 to play playlists composed of streamed content. I've not worked on Wijering yet (mainly as I've spent so much time with FlowPlayer recently it was much quicker!)

It's all looking pretty good, so please give it a shot and let me know how you get on.

Stuart Greenfield’s picture

OK, have discovered you can get Flash Media Server as a development release for free, so I'm trying it out.

It seems that FMS doesn't like you to provide the file extension, so

<swf file="streamthis.flv" stream="rtmp://server/application">

has to become

<swf file="streamthis" stream="rtmp://server/application" action="swftools_flv_display">

That code string will work with both Red5 and FMS. Note you have to give SWF Tools an action as there is no extension on the file.

However, stripping the file extension currently breaks the code for generating playlists. I'll look in to fixing that shortly.

Stuart Greenfield’s picture

I've started a new documentation page with example filter strings for streaming different types of media. The page isn't that well written yet - it's just a bit of brain dump to get things started.

I also discovered during my experiments with Flash Media Server that you can stream a live camera feed, and that you can configure both Wijering 4 and FlowPlayer3 to pick it up and play it. So with SWF Tools + those modules you could include live video feed to your website. Pretty neat that you can set that up with line of code in a node!

perandre’s picture

Wow, nice work! Great documentation!

Stuart Greenfield’s picture

Status: Active » Fixed

Streaming support is now up and running for FlowPlayer3 and Wijering 4 players, and is in the official releases.

perandre’s picture

Great!

Now, what would be the best solution for a user to add remote files for streaming to nodes using SWF Tools? I've been using flvmediaplayer module + SWF Object API. While the last one can soon be replaced by SWF Tools, we could need a better solution for the workflow. I'm thinking something in anology to filefield -> imagefield, we could have flashfield -> streamingfield; a simple field for adding the url. The dream interface would be to have all settings in the config area with checkboxes to choose what configuration options you wanted to make available for the individual nodes. The node override form for flvmediaplayer is too much...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

noahlively’s picture

What's the way to do this from code using the swf() function? Seems like the first parameter of the function (in this case, $video_path) is ignored when I try to point to a stream

swf(
            $video_path,
            array(
                'params' => array(
                    'action' => 'swftools_flv_display',
                    'stream' => $streaming_base_url,
                    'type' => 'rtmp',
                    'player' => 'wijering4_mediaplayer',
                ),
            )
        ); 

To make sure we're on the same page, here are some assumptions:

  • Full url of stream is something like rtmp://my.streaming.server/base/stream1.flv
  • $video_path = 'stream1.flv';
  • $streaming_base_url = 'rtmp://my.streaming.server/base';

Thanks for your help!
Noah

kakarot-1’s picture

I've had the same problem, noahlively. In the documentation http://drupal.org/node/399056 it's not explained how to do it with swf() :(

Try something like this: http://drupal.org/node/322232#comment-1234951 :)

Cheers