Table of Contents

  1. Download
  2. Server
  3. Client

Simple Media Player

This page describes how to setup the Simple Media Player Flex example application.
The Simple Media Player is a RTMPy example showing off its capabilities in streaming various audio/video clips in all the supported formats.
It also serves the same clips using standard HTTP so you can see the difference. The example also takes advantage of PyAMF, which is used as an HTTP RPC gateway.

Note: RTMP audio/video streaming is currently a work in progress but the HTTP streaming works fine

Screenshot of Simple Media Player

There will be a live demo available on the RTMPy blog.

Download

Grab the example from SVN with:

svn co http://svn.rtmpy.org/examples/trunk/smp smp-example
cd smp-example/python

Alternatively, if you just want to have a look, you can browse the example online.

Server

The Twisted server for the Flash RTMP/AMF client starts on http://localhost:8080 when you run:

twistd -noy smp.tac

Note: make sure you have Twisted >= 2.5 installed.

You should see something like:

2008-03-18 17:27:28+0000 [-] Log opened.
2008-03-18 17:27:28+0000 [-] twistd 2.5.0 (/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python 2.5.2) starting up
2008-03-18 17:27:28+0000 [-] reactor class: <class 'twisted.internet.selectreactor.SelectReactor'>
2008-03-18 17:27:28+0000 [-] twisted.web.server.Site starting on 8080
2008-03-18 17:27:28+0000 [-] Starting factory <twisted.web.server.Site instance at 0x37d25d0>
2008-03-18 17:27:28+0000 [-] rtmpy.server.ServerFactory starting on 1935
2008-03-18 17:27:28+0000 [-] Starting factory <rtmpy.server.ServerFactory instance at 0x37d2670>

Client

After you started the server, open up a browser and point it to http://localhost:8080/deploy to run the client.

Attachments

  • smp.jpg (35.5 KB) - added by thijs 10 months ago. Screenshot of Simple Media Player