English 中文(简体)
How to perform video editing with Silverlight?
原标题:

I would like to port an ActiveX of mine (to Silverlight) that have the following features:

  • Embedding a logo image in any video file.
  • Embedding subtitles in any video file.
  • Cropping any video file (for example: cropping 10 seconds of a 1 min. video).
  • Save the video file result (by the current encoders of the client).

The current ActiveX uses DirectShow - unfortunately, it can t be used in Silverlight. How I can abandon the old ActiveX technology for the new Silverlight technology?

最佳回答

The simple answer is: you can t.

Silverlight is targeted at two main types of apps:-

  • Content presentation, be that Video, Audio and Images, all with a view of creating interesting and engaging ways to interact with this sort of content.
  • More recently Line of Business apps, that is data entry and data presentation. Again with a view to making this at least a little bit more visually stimulating than prior technologies made these sorts of apps.

Video editing doesn t really fall into either of these camps and is not catered for.

I m not sure its yet true to say the ActiveX is old, after all what technology is used to host the Silverlight Plugin in Internet Explorer? ActiveX.

问题回答

I don t know if that s going to be easily doable. The various codecs natively available to Silverlight are all wrapped by the Silverlight MediaElement control, and so far as I can figure out, they re not directly exposed through an API, e.g., you can t get at the raw decoded RGBA bitstream. (If I m wrong on this, I d love to know, but I ve poked around, and I can t figure out how to do it.) The Mono source tree has a decode-only implementation of the Dirac codec, but nothing that would easily let you decode, e.g., WMV or AVI files, so far as I m aware.

And even if you could somehow grab the raw, decoded RGBA (or YCbCr) bitstream, so as to be able to insert whatever data you want into those frames, you d still have to re-encode the video stream as well, and Silverlight doesn t provide any native support for that. You d have to write your own encoders (not at all trivial), port them from the ffmpeg library (also not trivial), or wait for someone else to do it.

In short, my suspicion is that you re going to need to stick with your ActiveX solution for now -- though with some clever JavaScript coding, it might be possible to wrap that in a nice Silverlight UI.





相关问题
Silverlight Rich text box control

Our team decided that we need our own custom Rich text box control for Silverlight app we are developing. We looked at existing controls mentioned at A good rich text control for Silverlight but ...

Silverlight ImageBrush not rendering (with Bing Map Control)

I m trying to add an image to a Pushpin instance from the Silverlight Bing Map Control, but I can t seem to get it to render (the pushpin renders fine). This is probably a general WPF question rather ...

Silverlight OpenFileDialog DoEvents equivalent

I m processing large files after they are selected by the user. My code looks like the following: if (FileDialog.ShowDialog() == true) { // process really big file } This freezes up the UI so ...

list of controls with templates in silverlight

Does anyone know where to find a list of controls that you can set the template on in Silverlight? I ve wasted several hours now trying to create control templates only to find that the control doesn ...

Silverlight, Updating the UI during processing

I have a simple silverlight multifile upload application, and i want to provide the user with some feedback, right now its only in a test phase and i dont have the webservice. Somehow i cant get the ...

Silverlight 3 - FindName returns null

This looks a bug to me.. Using Silverlight 3 and i have a user control defined in XAML and trying to access the object during runtime returns a null. <Grid> <common:CommonGridEditPanel x:...

silverlight 3 collection binding

Someone please help me understand why this binding does not work... I have a class called SelectionManager with a property called dates which is populated by a WCF service. The property is an ...

热门标签