How to edit video using Silverlight?

I would like to port my ActiveX (in Silverlight), which has the following functions:

  • Insert a logo into any video file.
  • Embed subtitles in any video file.
  • Crop any video file (for example: crop 10 seconds of video in 1 minute).
  • Save the result of the video file (current client codes).

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

+4
source share
2 answers

The simple answer is: you cannot.

Silverlight is designed for two main types of applications: -

  • Presentation of content, whether video, audio and images, all with the aim of creating interesting and attractive ways to interact with this type of content.
  • More recently, Business of Business applications, which are data entry and data presentation. Again, to make this, at least a little more visually challenging than previous technologies, they made such applications.

Video editing does not fall into any of these camps and is not serviced.

I’m not sure that it’s true that ActiveX is old, because what technology is used to host the Silverlight plugin in Internet Explorer? ActiveX

+2
source

I do not know if this will be easily doable. The various codecs available for Silverlight are all wrapped in a Silverlight MediaElement control, and as far as I can tell, they are not directly displayed through the API, for example, you cannot access the raw decoded RGBA bitstream. (If I am mistaken in this, I would love to know, but I still think it over, and I can’t figure out how to do it.) Only the Dirac decoding is implemented in the Mono source tree, but nothing that could easily allow you to decode , for example, WMV or AVI files, as far as I know.

And even if you could somehow capture the raw, decoded RGBA (or YCbCr) bitstream to be able to insert any data you want into these frames, you still have to re-encode the video stream, and Silverlight does not provide any support for this. You will have to write your own encoders (not at all trivial), transfer them from the ffmpeg library (also not trivial), or wait for someone else to do this.

In short, my suspicion is that you will need your ActiveX solution for now - although with some clever JavaScript coding, it might be possible to wrap it in a nice Silverlight user interface.

+1
source

All Articles