I have made a few test with Flash Lite 3.0 and Flash Media Server 3 and I have to say that it is pretty easy to stream FLV Video files and Live Video from local web camera to mobile phone. Here are a quick instructions how to do it in Windows (I will publish Linux version later).
Play FLV-video from Flash Media Server 3:
- Install Flash Media Server 3 (download developer version)
- There are a few sample FLV files in applications/vod/media folder, so you can use one of them for testing
- Create a new Flash Lite 3.0 file in Flash
- Add a new Video symbol to library
- Drag this Video symbol to Stage and give instance name to it: video
- Type following programming to timeline:
// make a new video-object
var video:Video;
// make a new NetConnection-object
var nc:NetConnection = new NetConnection();
// check connection status from server
nc.onStatus = function(info:Object):Void {
status_txt.text=info.code;
if (info.code == "NetConnection.Connect.Success") {
startStreaming();
}
}
// start streaming video to phone
function startStreaming() {
ns = new NetStream(nc);
ns.setBufferTime(5);
video.attachVideo(ns);
// play sample.flv from server
ns.play("sample",0);
}
// show info to user
status_txt.text = "Connecting server...";
// connect FMS 3 video on demand service (default port 1935)
nc.connect("rtmp://your.server.ip.here:1935/vod");
- Go to Publish Settings...
- Set Local playback security: Access network only
- Publish your SWF-file
- Send your SWF-file to your phone
- Test and you should see FLV-video playing in your phone
Play live video from Flash Media Server 3:
- Install Flash Media Server 3 (download developer version)
- Install Flash Media Encoder 2 (Windows only)
- Start Flash Media Encoder 2
- You should see your live camera in Input screen
- Press Start-button to start sending live video to Flash Media Server 3
- Create a new Flash Lite 3.0 file in Flash
- Add Video symbol and programming as you did earlier
- Modify your programming:
// in startStreaming()-function
// Flash Media Encoder 2 publish stream name is "livestream"
ns.play("livestream",-1,-1,true);
// start connection to Flash Media Server 3
// Flash Media Encoder 2 publishes Flash Media Server's default
// live publishing point, so connect it
nc.connect("rtmp://your.server.ip.here:1935/live");
- Publish, test and enjoy















iam a student,,
can you tell me (step by step)
how to create live video streaming using flashlite3 and fms3
my email: wahyu_william@yahoo.com
Hi,
it should be easy if you follow instructions what I have wrote and when you are using Windows because Flash Media Encoder only works in Windows. Just install Flash Media Server 3 and Flash Media Encoder 2. Install your web cam and start Flash Media Encoder 2, you should see your live video in encoder. Start publishing your video to Flash Media Server 3. Encoder publish video to Flash Media Server 3 application/live folder by default. Download my sources and start Flash. Modify your own IP in Flash Lite source code and test movie, you should see your live in Flash Lite Device Central Emulator.
Pasi
i trying live video streaming using Flashlite3, FMS3 and Flash Media Encoder,,
if i use multiple camera,,
how to switch camera in flash lite3
Good question – I havent tested it, I think you have to make two different live application to FMS and publish streams in those. In Flash Lite 3.0 just connect to stream what you want.
Pasi
thank’s with your feedback
can you tell me step by step or example to switch camera
A little bit different from yours…I would like to send video from my nokia with flashlite (choose you which one…version and model) to a web server (and, optionally, store the video sent). Is there a solution? If yes which is the minimal configuration (less expansive and less invasive…) to realize it?
Thanks in advance.
live video using fms3 and flash lite3…
without flash media encoder
how to make server side script??
you dont need server side script, you can use default live application
Can you give me some more specific indication, or an example I can use to start? It would be great. Thanks in advance.
moscavi, you can download my source codes above. there are all files what you need. just install fms3 and encoder 2, check ip numbers in source codes and all should be good then.
Pasi
Thanks Pasi,
if I understand correctly, I have to use the code on top of the page, installing fms3 and encoder2,
substituting rtmp://your.server.ip.here:1935/live
with my server’s parameters.
So your code should (must?) work correctly on a nokia phone with flashlite (or other device compatible) or there are exceptions?
An other question…is there some copyright stuff with fms3 and encoder 2 on server machine?
As usual, thanks in advance.
moscavi,
there are zip-file available below article, use it. Yes you have to install fms3 and encoder 2. Start fms3 and encoder 2 to send stream to fms3. Edit my source FLA to use your server ip and compile SWF, test in device central, should work. If you have Flash Lite 3.0 device, send SWF to it and test there also. You can use FMS 3 developer version with max 10 different connections.
Pasi
Thanks (as many times before…) but I can’t see the files you are talking of. Can you, please, help me with these files (an address, maybe or something like that…).
Thanks again.
where can i download the flash lite 3?
Developer version is available in adobe labs http://labs.adobe.com/technologies/flashlite3/
hello ptm.
This is a great guide, I just tried it yesterday and works fine.
I was wondering what setting you use in encoder when streaming:bitrate,fsp mostly.
cos my video on my N95-8GB is playing like in slowmotion then skipping frames but plays fine on my pc and mac.
any tips ?
Eidur,
I dont have any special settings in encoder, just default settings in Flash Media Encoder 2.
Hi, great info, i have two problems, im seeing everything fine but i can hear the sound, im using Flash Media Server and Flash Lite 3 on a Nokia N95.
Otherwise, does exist any way to stream video and sound with flash lite 2.0 ?
Thanks in advance!
Hi ptm,
I’m an italian student and I would ask you some help with your experiment. I can install flash media server on my laptop and use it as local server, or I need a web server that support flash media?
Thank a lot!
Tonydep,
you can use your laptop as local server and connect that ip from flash lite 3.0 application.
Pasi
Please PTM, answer to the “Sound problem”. Can we send stream on mobile phones with sound; from code? because i see is working with Media Encoder but from code, is not. please , if u have an answere for this notice me on manoleb@gmail.com
Horus,
it should work – I try to get more time to test it soon. Anyone?
Pasi
Hi PTM, Thank you for the excellent tutorial. I am trying to write a live video app. My record code publishes the live camera video from AS. And my player code plays it from FMS3. But I found the video will show only the first Fram then freezes. I have look around some threads, this seems like a problem with FMS3 or FL3. Have you try this scenario yet? Or anybody has a solution to this? Thanks in advance.
I got this problem in live streaming from my camera to the mobile phone. This is my setup:
1. FME 2.5
2. Flash Device central
3. Red5 server
Problem: I can broadcast the video from my local camera to the server and viewing the stream using the web is ok but if viewing the stream using the e71 device inside the flash device central the video is slow moving..sometimes freezes (displays “NetStream.Buffer.Empty” or “NetStream.Buffer.Full”). I’m afraid its the settings i used when publishing my live video. Below are the details i used.
VIDEO:
Size: 160×120
Bit rate: 650 Kbps
Fps: 15
AUDIO:
Format: NellyMoser (Mono)
Sample rate: 8000 Hz
Bit rate: 16 kbps
Any suggested and tested video and audio settings? Once i can figure out here I’ll just post back here also. Thanks for the share in advance.
Hi,
I’m also having some trouble. I managed to make an application for my Nokia E51, so I can view a live rtmp feed from a local TV channel.
The only problem is, it’s working reaaaal slow on my E51. In Device Central everything is fine. On my handheld the audio is ok, but video is in slowmotion.
Anyway I could tweak the NetStream to make it work ?
I tried modifying the flash quality, and even with Low, the same behaviour.