Add to Technorati Favorites

May 07, 2008

How To Convert Movies to Flash or Silverlight with c#

SilverlightLooking for a fun software development project? Want to build your own YouTube? Ya me either, but how the heck do you convert videos to flash or Silverlight? It's not that hard actually as long as you use FFmpeg and some c# code. FFmpeg is a free video and audio converter.  What I like about Silverlight is it will just take the WMV format, and stream it for you.  So if your video is already in WMV, your are done.  If not, you can convert i to WMV, including the HD formats.  In flash, you will have to write some extra code to get it converted.  Check out the HD Halo Trailer in Silverlight by the way.

The first thing you will want to do is download FFmpeg.  There will be a few different files in there.  Make sure you put FFMPEG.exe and FLVTOOL.exe in your application directory.  Next you will want set the correct permissions on your web server.

The code below is fairly basic, but using other FFmpeg commands you can easily create thumbnails from the video, and save them to a location on your web server.  This code for example would create some image thumbnails for you quit easily.

startInfo.Arguments = string.Format(“-i \”{0}\”
-f image2 -ss 1 -vframes 1
-s 80x60 -an \ \”{1}\”", srcURL, destURL);

If you are using Silverlight, you can just keep the file in wmv, or convert it to wmv, and just run the command above against the video file to capture the image screenshot.

Anyway here is the sample code for you to try out to convert the video file to flash.  Silverlight is cool because you don't have to do that and it can just play the wmv in a streaming format automagically.

Sample Code

private void ConvertVideo(string srcURL, string destURL)
{
    string ffmpegURL = “~/project/tools/ffmpeg.exe”;
    DirectoryInfo directoryInfo = new DirectoryInfo(Path.GetDirectoryName
(Server.MapPath(ffmpegURL))); ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = Server.MapPath(ffmpegURL); startInfo.Arguments = string.Format(“-i \”{0}\”
-acodec mp3 -ab 64k -ac 2
-ar 44100 -f flv -deinterlace -nr 500 -croptop 4 -cropbottom 8 -cropleft 8
-cropright 8 -s 640x480 -aspect 4:3 -r 25 -b 650k -me_range 25 -i_qfactor 0.71
-g 500 \”{1}\”", srcURL, destURL); startInfo.WorkingDirectory = directoryInfo.FullName; startInfo.UseShellExecute = false; startInfo.RedirectStandardOutput = true; startInfo.RedirectStandardInput = true; startInfo.RedirectStandardError = true;

using (Process process = new Process())
{
process.StartInfo = startInfo;

try
{
process.Start();
StreamReader standardOutput = process.StandardOutput;
StreamWriter standardInput = process.StandardInput;
StreamReader standardError = process.StandardError;
process.WaitForExit();

lblError.Text = standardError.ReadToEnd();
lblOutput.Text = standardOutput.ReadToEnd();
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
}
}



April 30, 2008

CSI : New York Showing off Photosynth Tonight

Photosynth Photosynth is being showed off today on CSI: New York.  Why is Photosynth so cool?  It can take a bunch of pictures, analyze them for similarities, and display them in a three-dimensional space.  If you are not clear, this means it takes digital pictures you have taken, automagically analyzes them, and constructs a completely three-dimensional environment out of the pictures that you can fly around and navigate in.  It sounds like some crazy voodoo magic, but it works.  Kiss the crappy Quicktime VR goodbye that currently needs lots of special equipment and doesn't even do close to what Photosynth can do.

Photosynth was shown in 2006 at the Web 2.0 Summit, and a huge hit.

Check out Photosynth Live Labs where you can download a tech preview and see the application in action. 

April 29, 2008

Tackling Hard Problems with Software Development

I was recently reading Harvard Business Publishing and I ran into Umair Haque's article on Web 2.0.  The second I saw the article pop up on my RSS this morning, I wanted to check it out as he doesn't write very much.

His article is titled "An Open Challenge to Silicon Valley" I found awesome.  Take a read.  I'm pretty swamped tonight with some software development projects, but I wanted to make sure to post the link.  It basically is along the same lines of my last two rants.  Nobody is really innovating with Web 2.0.  Umair actually takes it to the next level, challenging readers to think of huge problems that can be solved with Web 2.0, and let him know!  He will help you get it done!

"What's really going here? I think the malaise is deep and systemic. Many of you may disagree - but I'm vastly disappointed in the moral and strategic bankruptcy of today's crop of venture investors and so-called revolutionaries."  - Umair Haque

Clearly he was listening to Tim O'Reilly during the Web 2.0 Expo where Tim also challenged everyone to solve big hard problems, and avoid all the headlines full of hype.  I love the poem he used to end his speech, The Man Watching.  Umair has actually been talking about the "problem" with Web 2.0 for some time now on his blog. 

Anyway, back to work, but there are dozens of articles that back up my perception of Web 2.0.  I'm glad because I was starting to wonder if maybe I had issues, and should be writing some revolutionary Flash Facebook Plug-in to give my friends virtual wedgies!  What's sad is someone out there is going to read this, do it, and make millions.  Something is clearly wrong...

April 28, 2008

Live Mesh and the Web 2.0 Expo from My Perspective

Focused on Bashing Microsoft, and Throwing Sheep

During the Web 2.0 Expo in San Francisco this week, attendees were allowed some first hand access to Microsoft's latest initiative, Live Mesh.  Ori Amiga was a fantastic presenter, and was able to really demonstrate the power of the mesh to people that attended the conference.  I must admit however that I was a little disappointed, but not surprised, with the whole anti-Microsoft feeling at the conference.

Live Mesh is a phenomenal idea that ties very nicely with their Silverlight initiative.  It will finally give software developers out there the ability to create applications, and content, that can be delivered very quickly to every device on the planet.  However, even before seeing the presentation attendees and presenters in some cases, were knocking Live Mesh for its "Windows Only" support.  Yet when I went to the demonstration put on by Ori, he used a Macintosh to take a picture with his webcam, then used a cell phone to take a picture of the audience, and then had the mesh synchronize his pictures across all the devices.

Marc Andressen Could Have Been a Highlight

This was not the only area where Microsoft was getting negativity thrown at it.  During the Marc Andressen keynote, the interviewer seemed to keep trying to get him to say negative things about Microsoft.  When all his attempts failed (Marc actually was very positive about Microsoft and the things they have done, and are doing), he tried to push his buttons on Bill Gates.  Some of us travelled a pretty fair distance and spent a lot of cash to watch this keynote, and although it was pretty good, I didn't spend the money I did to watch Marc have to deal with stupid questions about Microsoft for 10 minutes.  We all know the history, move on.

What really bugs me about the slamming of Microsoft at these conferences is that people are not encouraging them to do great things.  I mean, here you have a company that basically created the software industry, made the Web 2.0 Expo possible, and you have 95% of the attendees slamming them about their lack of innovation, and their crappy products.  That's all great if they are making only crappy products.  Vista is a great example of somewhere they deserve to be slammed, certain versions of SharePoint, again other areas where they need to get some bad press. 

However when a company spends a significant amount of time and resources into building a great OPEN product like Live Mesh, we should encourage them!  Yes Microsoft has made mistakes during there run as the software powerhouse everyone wants to be.  They have paid dearly for it, and in some cases, still are.  Have you ever made mistakes?  I certainly have made a ton of mistakes.  It's from the mistakes you make that you grow.  It's when you don't grow from your mistakes, that you are wasting away and failing.

What is the Problem

Microsoft is the perfect company to put together the Web Operating System.  You can argue that Windows was a Monopoly, but they at least allowed third party developers to create software on top of the operating system, and sell them for any price they wanted.  They also worked with any hardware configuration you could think of.  In fact, before Microsoft, it would have been impossible to build a software package that would be accessible to everyone so quickly.  Microsoft has learned a great deal from these experiences.  They are setup perfectly to create the next operating system.  The Web Operating System.

I have to stop and ask a simple question.  Instead of being a complainer in the next few years when we all step back and wonder how Microsoft yet again obtained another "Monopoly", this time on the internet, why not do something about it.  Microsoft isn't stopping you.  Create something revolutionary!  Be a purple cow as Seth Godin would say!  Everyone seems so obsessed with just creating social networking applications, or "applications on top of the social network api's".  How is it original to create better ways to throw poop at each other?  I mean its cool and all, and I love the slide shows and sharing pictures on Facebook, but, are we really harnessing the power of Web 2.0 and improving lives?

I don't want to sound like an ass kisser, but check out these freaking smart people below:

  • Kevin Rose is awesome, he created Digg, and gave the news back to the people!
  • Michalle Arrington is great, he created an efficient technology blog that gave all of us access to what was going on in Web 2.0 in real time, and I consider to be part of the "Fathers of Web 2.0".
  • Tim O'Reilly is phenomenal, and the "Father" of "Web 2.0".  his speeches really had meaning, and vision!
  • Jeff Bezo's saw the vision of cloud computing and created their Amazon Web Services.
  • Firefox boy believed he could make a better browser than Microsoft, and now has huge market share where other browser companies failed.  He woke the sleeping giant and pushed Microsoft to try and innovate on the browser.

These guys changed the world.  Without them, the world would be different.  They had true passion for something, and weren't afraid to try out their idea.  They believed in something, and saw it all the way through.  I guarantee you they didn't wake up one day and say "How can I make money from the Internet?"

Why this Rant?

I guess I'm just sad that with all that brain power I saw at the conference, 90% of the people there are focused on things that are NOT REVOLUTIONARY at all.  It seems everyone is content with copying each other, and playing it safe.  So I challenge all of you, instead of focusing on what's safe, creating digg clones, creating facebook clones, and "silly social applications", why not create something that will change the world!  And if you are a developer, or creative designer and think you can't make a difference, you are wrong.  If you are working for a company that isn't changing the world, look around you, and find one that is.

I hope that the people at the forefront of the Web 2.0 movement wake up and start creating awesome applications that are revolutionary.  If they don't, big companies will realize the potential that is there, and will take over, and leave no more room for innovation.  This is our chance to change the world.  Microsoft is changing the world with Mesh, and will have the first Web Operating System.

Let's stop throwing sheep.

April 26, 2008

Does cnet even know what Web 2.0 is?

Web 2.0 Expo

It really blows my mind how some reports can't wait to spell the demise of Web 2.0.  It blows my mind even more that they have no idea what Web 2.0 is and they start spelling its demise.  Check out this article on cnet.  The writer makes some ok points, but it is overshadowed by the fact that he has no idea what Web 2.0 is.

Why it's time to dump the Web 2.0 sobriquet once and for all

Web 2.5? Web 3.0?  What the hell are those terms?   I'll tell you what they are, they are terms people use that have no idea what is going on with the Internet right now.  Web 2.0 will last for years.  It is more akin to saying "The Industrial Revolution".  It is not a version of web pages.

So what is Web 2.0 anyway?  It's the Web as a platform.  Right now, it is not.  It is getting there for sure, but it’s not there yet.  There is still so much we can do.  I mean really, if all we have to show from our Web 2.0 era is a search box and some weird ways of throwing pooh and poking our friends on facebook, then we have failed miserably.

Along Comes Live Mesh

The reality is Microsoft has been trying to make the web a platform since Windows 95.  Unfortunately for them, they have been sued for tying it too closely to their operating system.  Good idea, bad way of implementing it.  They have learned their lesson however and are trying to implement Live Mesh now, which will tie all devices together, and use the Internet as the mechanism for the communication to flow.

What really blows my mind is that Google, facebook, or any of these companies have failed to create their own platforms on the Internet.  They are trying for sure, but they haven't really done a great job of creating the Internet operating system.  Microsoft is a platform company, and they have yet to have any real competition on the desktop pc.  Now that Web 2.0 has come along, the Internet has been waiting for a "Web Operating System" for years, and nobody has been able to create one.  This was everyone's big chance.  Microsoft was getting sued, and was left scrambling to figure out how to create a new OS for the Web.  Who stepped up?  Google, with all its ridiculous money, continues to focus on advertising.  Facebook continues to focus on privacy and applications for its own "social platform".  Seriously?  Do you think you will be going to facebook in 10 years for everything you need on the Internet?

Where is Google, facebook...

What these companies should have done, and could have done was create a web operating system.  An operating system that ties together everyone's devices, and has a platform that allows developers to create applications on it.  And I am not talking about superpoke applications, or simple applications that live inside of an iframe.  I'm talking about real world business applications.  Microsoft has created one now, Microsoft Live Mesh, and it looks pretty freaking awesome. 

What kills me is that people will go "crap I have to use Microsoft again, they are so evil".  The reality is, they are not. They are awesome executers.  They might be late to the party, but they are building the platform for the party to go from carts and buggies, to supersonic flights and space travel.  People might not want to use it now, but they will have no choice because it will be the only way to create an application that can reach all the consumers on every device so quickly.

The Platform Always Wins

Platform's trump Applications every time.  Why hasn't anyone paid attention?  I certainly couldn’t create the platform; I don't have the resources to do it.  Google has the resources, facebook has the resources, and Slide has the resources.  Why focus on their own small piece of the web is beyond me.  They are making the same mistakes Microsoft has been guilty of making.  They think they are so big, that they are "it" and in fact, they are just a tiny piece of what is about to happen on the internet.

Dear cnet writer, I recommend you read What is Web 2.0 by Tim O'Reilly.

April 23, 2008

Mesh Goes Live, Digg Party Rocks

image Well I am at the Web 2.0 Expo and there is definitely a buzz around everything Web 2.0.  Last night was a pretty awesome night as I attended the first ever Digg Meet-up at Mighty.  It was pretty wicked, everything from Rock Band, to a video that the Digg team had made the night before.  Then when I got back to the hotel, had the chance to stay up to date with the Mesh launch, and sign up for the Live Mesh beta.

What is Mesh anyway?  To me its a operating system agnostic web operating system.  Yes right now it only supports Windows, but that clearly is not the only goal.  You can build awesome application on it that work online and offline, and have web components as its building blocks and foundation.

Here is Ray Ozzie's Live Mesh Announcement

image

Download the Live Mesh Announcement

So the guts of Mesh are the MOE (Mesh Operating Environment) which is made up of a Web Server, handlers for ATOM, JSON, FeedSync, WB-XML, and POX.  Not only can Mesh understand and read RSS, but it creates and receives RSS/Atom feeds from other Mesh applications.  Everything within the Mesh can be subscribed to as well, with things like Bloglines and Feedburner.

Anyway, I'm looking forward to the sessions and the keynote.  I should go grab a coffee and bagel and grab my seat for the first session.

Here is a detailed view of Mesh:

image

April 22, 2008

Ray Ozzie Launches Mesh at Web 2.0 Expo!

image Microsoft has really rebooted itself over the last several years.  While most companies seem to never change, and mostly focus on what they have always done well, Microsoft has transformed numerous times since its creation.  In the last several years, Ray Ozzie has really stepped things up a notch at Microsoft since Groove Networks was acquired by Microsoft (A company he formed).  Since Ray Ozzie took over the title of Chief Software Architect from Bill Gates in June of 2006, he has really stepped it up a notch.  Silverlight was a huge hit a few years ago at the MIX Conference.

I'm so pumped for next week Wednesday when Microsoft will reveal details of Live Mesh!  During the keynote on Wednesday, Amit Mital will be revealing more details on Live Mesh.  Who is Amit Mital?  Well he used to be the General Manager of BizTalk, and Live Meeting Web.  He is currently the General Manager of Live Mesh.

"Just imagine the possibilities enabled by centralized configuration and personalization and remote control of all your devices from just about anywhere. Just imagine the convenience of unified data management, the transparent synchronization of files, folders, documents, and media. The bi-directional synchronization of arbitrary feeds of all kinds across your devices and the Web, a kind of universal file synch."

- Ray Ozzie

Mesh is being launched today, and being previewed tomorrow during the keynote!

Add Us

  • Add to Technorati Favorites
    Add Miguel Carrasco's Feedburner

    Add Miguel Carrasco to Google

    Subscribe to MyMSN

    Subscribe to MyYahoo!

    Subscribe to Bloglines

    Subscribe to Newsgator

    Subscribe to Feedster

    Subscribe to NewsIsFree

Great Sites