Video capture and recording from a web page - silverlight

I am trying to build a web application that can capture audio and video from a web cam and upload it to our server. The solution should work with both Windows and Mac. Supporting mobile devices would be a plus, but is not required. My boss would prefer if the platform/framework was from Microsoft.
My initial impulse was to start looking into SilverLight... Interestingly, there were plenty of demos showing how to capture video and display it to the user, followed by many comments suggesting that for the application to be useful we need some way to save/upload the video, followed by the original poster saying that of COURSE it's possible and easy and that he is working on an updated demo that does just that, followed by silence. As far as I can tell SilverLight will not record video.
I already have a component that can record video in a winforms application using DirectShow, but the goal is to build something that is cross-platform so that our program will work for Mac users as well as Windows users. A desktop application is not out of the question, but we would much prefer to stick to a web page.
I am aware that Flash can record video from within a browser, but the higher ups would prefer to avoid flash. Is there any other way to record video captured from a user's webcam from within a web browser?

To build a cross-platform solution you shall consider either one of :
VLCj
Xuggler
JMF
I have been working lately with VLCj.

I am aware that Flash can record video from within a browser, but the higher ups would prefer to avoid flash. Is there any other way to record video captured from a user's webcam from within a web browser?
Unfortunately on the desktop there is no other production ready way to record video in a web page except a Flash client linked to a media server like Red5 or Wowza. The Flash client captures and encodes the video and audio and the media server stores the encoded data in .flv or .f4v/.mp4 files.
On mobile you could use HTML Media Capture which, for recording video, is widely supported on all mobile browsers. The downside is that you'd end up with .mov files from iOS and .mp4 and .3gp files from Android devices. The .mov and .3gp files need to be transcoded before they can be used on other platforms.
Quick commercial solutions that implement the above include HDFVR (downloadable) and Pipe (cloud video recording).

Related

Is it possible/workable to store a large (1 hr MP3) in an offline cache for a web app?

I need to be able to create a way of delivering a web app which includes being able to play a long - up to 1hr MP3 file without having to be connected to the internet.
The end user would be a tourist who would incur roaming charges if the gprs internet were used. The idea is that it can be preloaded while the user has access to wifi (e.g. in the hotel). They can then go out and about and still use the application and access the audio content.
Of course one way would be to provide it as an iPhone app/android, but I wondered whether there could be another way? Perhaps through writing a suitable web app using Angular?
Unfortunately, there is no reliable way to this, although it may work on Google Chrome.
e.g. -
http://www.html5rocks.com/en/tutorials/file/filesystem/
But the specifications are DEAD
W3C - [fileapi-directories-and-system/filewriter]

Silverlight streaming video

I'm creating a web platform destined to the customers of a certain company. The company requires that the platform allows the streaming of videos.
It's important to note that the company will be the one to add the videos to the platform, dinamically, from a software built by me for that purpose, and each video will be referenced on a sql server table.
I've never done streaming before so I'm asking 2 things:
The first is about some guidance in silverlight streaming(tutorials, articles, examples, etc)
The other is my main concern. I have a few video samples from the company, and all of them are over 200 MBytes and can go up to 2GB, so I know I have to re-encode them to become smaller. But, how do I do this... I mean, do I have to re-enconde them, manually, one at a time, or is there a way to do it automatically as a new video is added?
I have Expression Studio Encoder 4 pro, but never really used it, and as far as I can tell, I have to manually add each video to do the enconding. Again... is there a way to do this dinamically??
Thanks
Not all video formats and encodings are supported by Silverlight. See this page for a list of supported formats. You will probably need to recompress your videos not only to reduce their size but also to normalize the format.
The recompression could be done in a windows service running in the background, the more appropriated libraries to be used will probably depend on the target format you will use. For wmv files I would recommend using Windows Media Format SDK,the (currently deprecated) Windows Media Encoder SDK or its succesor Expression Studio Encoder SDK. For using H264 as target I would recommend using ffmepg.
You should decide on a delivery protocol depending on the number of users you can forsee for your website. HTTP might not be the best choice, since there are other protocols like RTTP, usually more suitable for video streaming.

Access to webcam in browser?

For an internal project we would like to play with building a video conferencing system. We are able to decide the browser that the user has to use and can install plugins.
The only requirement is that the browser and plugins must be free and work over Linux and Mac. (Don't care about Windows)
What is the best way to do access the webcam and mic stream from a user for sending to a server?
Ideally I would like to do this plugin free but I can see no implementation of the devices tag in HTML5 in any browser yet, unless someone knows different.
If its flash/silverlight, any quick examples of capture and sending to a server?
Also any examples of streaming video from a server to a client would be useful, so we can stick it all together. This I know we can do in HTML5 so this would be a preference.
The client connection part is all I would need as we are building the server, this is the internal challenge.
Basically I'm looking for good examples and best practices for sending and receiving this information.
Edit: As I have discovered from some groups the device tag is no where near completion. So answers will have to be flash/silverlight (does that work on linux??).
See a demo of device tag done on a webkit custom build: https://labs.ericsson.com/blog/beyond-html5-conversational-voice-and-video-implemented-webkit-gtk
Check out the Red5 project. I think that it is what you're looking for. The examples are quite good.
http://red5.org

JPEG 200 (aka J2K) handling in Silverlight app - any suggestions?

I need to handle JPEG 2000 (aka J2K) images in my silverlight app. Files stored either in the DB or file system on the server. Any suggestions how to handle them on the client? The only working converter I came across was written in Java. There are some ports to J#, but most likely they are not going to work on the client. The requirement is that the conversion should happen on the client to conserve the bandwidth and speed up the streaming of huge images.
It's not supported by Silverlight and .Net Image Tools don't support it too at the moment. So you have to write your own, port the (Java) version or ask the ImageTools developers if they can help you.

Silverlight 2.0 - Saving to a text file

I'd like to save some simple text data to a file from my Silverlight app - to a CSV file.
The user presses on a button, the code generates the contents of the file in memory (a string), then a prompt appears asking to either open the file or Save to disk, like through a normal web page.
I found a complicated way to do it:
http://pagebrooks.com/archive/2008/07/16/save-file-dialog-in-silverlight.aspx
But wondered if there was a simpler way? Especially with the recent release of Silverlight 2.0.
Thanks.
Right now Silverlight 2 doesn't support saving directly to the user's disk even with a prompt. It is a feature being considered for future versions, but the work around of having the server push out the data is the current solution.
Just to update this thread -- Silverlight 3 has this capability now.
I do this right now with Silverlight 2.0, but the key is that the files are saved on the web server that hosts the Silverlight apps, by having the Silverlight app call web services.
Probably not what you are looking for, but this is an option.
Silverlight app calls web service, that posts the string
Web service saves the string as a file on the server
File is available through web app, or other means

Resources