Stream Flv With PHP

There is good thread going in chattyfig mailing list regarding how to do streaming of flv using php. I had came to know that new version Buraks flvmdi flv metadata injector can be easly get the times and poistions of each frames of flv in a array. I am able to create an example video player which can request the flv file and seek, stream & play it from any given location using server side scripting php.

Its very important to insert metadata into flv using flvmdi. If your webserver is windows based then flvmdi is going to be very usefull. You can easly execute following command to insert metadata into flv.

Following PHP Code can be execute any command on shell:

ExecShellCommand("flvmdi27b.exe inputflvfile outputflvfile /k", true);

function ExecShellCommand($command, $hide=true) {
if (!($p=popen(“($command)2>&1″,”r”))) return 126;
while (!feof($p)) {
$l=fgets($p,1000);
if (!$hide) print $l;
}
return pclose($p);
}

I had used Flash Video Player 2.2 done by Jeroen Wijering.

Download an example of all sources.
Download Buraks Flvmdi7b.
Download Flv Player 2.2

The only drawback is that Buraks Flvmdi is only available for windows.

I think if anyone write down for linux then it will be going to be huge. I hope someone can do something about it. :)

You can also check out same efforts by Stefan Richter on his weblog & Brad Murray on his weblog.

I think this will be really good to cut load on fcs for flv streaming and also able to save bandwidth of fcs.

Web 2.0 Conference & Video of Kevin Lynch’s Web 2.0 Session

Macromedia has annouced the Flex 2.0 family of technologies for developer application for the Flash Platform. These included Flash Player 8.5, ActionScript 3, Flex Builder 2.0, Flex Framework 2.0 and Flex Enterprise services.

Mark Anders and Sho Kuwamoto both have great posts on the announcement of Flash Player 8.5, ActionScript 3, Flex Builder 2.0, Flex Framework 2.0 and Flex Enterprise services.

Kevin Lynch all of this during a session at the Web 2.0 conference in San Francisco yesterday. Mike Chamber was there and recorded the 15 minutes worth video of Kevin Lynch speach session. Kevin also saw up how to make RIA in 15 minutes with the flex 2 with the use of its IDE. (Sure you will like that one).

Anyone can download video from google video link or direct link of mp4 format of video from Mike Chamber Weblog.

Now i am thinking that as freelancers or developers need to be little fast in checking and learning new technologies, beceause as soon as anyone start on making application using latest technology, there will be new technology waiting on next few sort weeks.

Sending a BitmapObject via Flashcom with use of getPixel & SetPixel Method

I had looking around on www.flashcomguru.com for some other thing. I had found that stoem posted that sending bitmap object via flashcom don’t working. I also tested out by sending as sharedobject using send method on client side. It is always traced as undefined.

There is an alternative method for it to send the bitmap object to all connected client using the getPixel and setPixel method by using new Bitmap API in Flash 8. This method is relatively slow in case of big image beceause it has to pass the large pixel array with the color information to all client. Client will process the pixel array with color information to generate bitmap on client side.

Here is the direct link of example: Screen Test
(Note: This example will take a snapshot from the webcam if you have connected and send it to all clients connected to server.)

Here is the fla link of example: Download Fla

I am also looking for any other solution or to speed up the processing of color information array. This Bitmap object will be very usefull to take a snap of any movie clip that run in flash screen and able to deliver to all client via flash communication server.

PHPDataGlue: Connect & Retrive Data To Flash Mx From MySQL Database Using PHP

I have seen that so many peoples in flash community using my component. I missed out documentation in old mxp file. I am posting its document and sample.

PHPDataGlue V1.0.1

Note : Only support for php script with MySQL database on unix/linux server supported system.

This component is basically used for retrive the data from the mysql database in recordset using the php script.

In this component the following parameter have been used:

Site URL: “This is the php script url.”
e.g.: http://yoursrevername/phpscript/connect.php

Host Name: “This is the database hostname.”
e.g.: yoursrevername.com

User Name: “Give the database username over here.”
e.g.: root

Database Name: “Give the database name that you going to access through script.”

Database Password: “Give the database password.”

Table Name: “Give the table name from which you need to retrive data.”

Would you like to see number of records per page? : True or False
This option will help you to fetch out the data in pages. If this set it to true then give the number of records that you want to see per
page. If this is set to false then every records are fetched.

Records Per Page: “Specify the number of records that you want to see per page if the records per page is true.”

Page Number: “Give the page number from that you want fetch the data.”
By default this is set to “0”.

Note: In all above for better security purpose, define the host name,database name,table name,database user name,database password name
directly to script that is connect.php

In this component the following method have been used:

DBConnect(): “Use to establish connection to the database.”

LoadData(): “This will load the all data to PHPLoad name array object of this component.”

InitUrl(): “This method only use when the use has enble the option of records per page set it true.
It is use to initilize the current recordset and load the next data on the recordset.”

InitMC(): “This method only use when the use has enble the option of records per page set it true.
It is use to initilize the DataHolder Movie Clip in the component mc and load the data in rst Array object of the DataHolder Movie Clip.”

Tips on Variables :

1. PHPLoad (Array) : “This is the array holding the some of the variables coming from the php script.”

2. PHPLoad.loaddata: “This variable is used to check the data is loaded or not like preloader of movie clip. you can use it on mc.”

3. PHPLoad.total_recordset: “Holds a total number recordsets.”

4. You can access the recordset in this way :

Recordset will hold in movie clip named DataHolder inside the component. so you can access like this :

path_to_comp_instance_name.DataHolder.rst[0].

This item could be found in the Components panel in Flash MX as PHP Data Glue.

Download: PHPDataGlue
Sample: In Action
Readme: Readme.txt

I will repost this component again with more features enabled soon with full documentation.

Macromedia Studio 8 Lanuch Event in India

Studio 8

An exclusive invitation to the Studio 8 launch event in india. Lets look at the highlights of event.

What you will see
With the latest releases of Dreamweaver, Flash Professional, Fireworks, Contribute and FlashPaper, Studio 8 offers web designers and developers a new level of expressiveness, efficiency and simplified workflow to create the most compelling web sites, interactive experiences and mobile content.

Use advanced graphics, text, animation, video, and audio tools with precision control and quality. From simple animated graphics to sophisticated interactive experiences, Studio 8 provides a full suite of tools for limitless creativity.

Learn how to design, develop and maintain the most effective and engaging online experiences and digital content. The Macromedia Studio 8 product team will demonstrate the exciting new features in Studio 8:.

  • New advanced animation, graphic effects, text tools, and interactive video in the new version of Flash Professional
  • Fast coding efficiencies with new CSS, drag-and-drop of XML sources, Zoom, and more in the new version of Dreamweaver
  • New graphic effects and integrated workflows with Fireworks
  • Web content management with FlashPaper and Contribute

See how it can be even easier to build next-generation web sites, vibrant interactive media, interactive experiences and mobile content . Attend this special Studio 8 event. Don’t miss out!

Who should attend?

  • Web Designer/Developer
  • Web Application Developer
  • Webmaster
  • Creative/Art Director
  • Academic Computing Professional
  • Curriculum Director
  • Higher Education Educator
  • K-12 Educator
  • Macromedia Community
  • Macromedia Partners
  • Macromedia Resellers
  • Student
  • Teacher/Faculty

Agenda
The following is an example of what will be covered in each session:

Introduction and Studio 8 Overview
Jim Guerard, VP Product Management and Product Marketing – Tools, Macromedia

Flash Professional 8 demonstration
– Mike Downey, Product Manager, Flash
– Expressiveness, New Graphic Effects and Animation
– Quality Experiences, Productivity and Ease-of-Use Enhancements
– Flash Video, Video Enhancements and Improved Work-flow
– Mobile Authoring

Dreamweaver 8 demonstration
– Jen Taylor, Sr. Product Manager, Dreamweaver
– Support for the Latest Technologies, Including Flash Video, Coldfusion MX7 and PHP5
– Best Practices, Including Enhanced CSS and Visual Authoring with XML
– Productivity and Ease-of-Use Enhancements for both Designers and Developers

Fireworks 8
– CSS-based Pop-up Menu’s
– Interoperability with Dreamweaver 8

Contribute 3 and FlashPaper 2
– Overview of Features
– Interoperability with Studio 8

Studio 8 Product Summary (Jim Guerard)
– Timing, Availability and Pricing

Question and Answer

Events Place & Time
2nd Sept-J WMarriott, Mumbai – Register
5th Sept-Le Meridien, Delhi – Register
6th Sept-LeMeridien,Bangalore – Register
Timings: 8.30 am to 12.30 pm

I am not so sure whether i will be there or not. I will like to see all geeks there and myself too.