Wednesday, May 11, 2011

Play video and media files in SharePoint 2010 sites part I – Option comparison

There are several different ways you can play or video media file from a SharePoint 2010 site. In summary, we have explored three different ways on SharePoint 2010. Here is the list of three different ways we have explored on SharePoint 2010.
  1. Use out of box web part to play audio or video media file
  2. Use SharePoint 2010 to play audio or video media files on Media server
  3. Use third-party media player to play audio or video media file
There are pros and cons for each different one that I would like to share with you. Based on your business requirement, you may select different implementation. Let's start with out of box web parts.

1. Use out of box web part to play audio or video media file
There are three different ways you could use out of box web part to play media file.You could check this excellent blog how to setup each of them in details.
  • You can add a Media Web Part to the page to play an individual audio or video file.
  • You can configure dynamic displays of video or audio by configuring the Content Query Web Part to display audio or video files
  • Or you can embed a video from a third-party video sharing site by using embed code.

The first and easiest way is to use the Media Web Part to play media file. The pros is it's easy to setup and you could follow up this excellent blog on the procedure. However,  the cons is if you use embed code or sharing links for pages that host video, they will not work. For example, you could not play youtube video using youtube URL like http://www.youtube.com/v/09-M-S7Og0o&hl=en_US&fs=1& in the configuration. This approach only display the static media file and could not display dynamic file. There are limited formats this web part will support

The second option to use Content Editor Web Part to play media file. The pros for this is you could display one file or multiple files dynamically from the filter. The cons is that you need to know little xml file format. Here is example to setup to play youtube.
  • Use Content Editor Web partEdit page and add web part
  • Select “Content Editor Web Part” under “Media and Content” and add to the page
  • Click the empty space of the web part and it will display the ribbons
  • Under Editing Tools, click HTML and then Edit HTML Source and type in the following code
               <div align="center">
                       <embed src=" http://www.youtube.com/v/7ByiLIosTPA&hl=en_US&fs=1&"
                                autoplay="false"
                                loop="false"
                                width="600"
                                height="400"
                       </embed>
              </div>


You could also add JQuery to display list of the files for this web part. Please see other blogs for details.

The third option to use embed code from a third-party video-sharing website to add a video to a page, you can do so by adding the embed code to the Content Editor Web Part. The pros of this approach is very flexible and the cons is you need Designer permissions to do this and may be very tedious for non programmers. The code is similar like this.


             <object width="480" height="385">
                    <param name="movie" value="http://www.youtube.com/v/EODwh5hS7ZY&hl=en_GB&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6"></param>
                   <param name="allowFullScreen" value="true"></param>
                   <param name="allowscriptaccess" value="always"></param>
                   <embed src="http://www.youtube.com/v/EODwh5hS7ZY&hl=en_GB&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed>
               </object>

2. Use SharePoint 2010 to play audio or video media files on Media server
Microsoft provides Streaming Media Services that enables you to manage delivery of live or on-demand digital media content, including Windows Media Audio (WMA) and Windows Media Video (WMV), over networks by using administrative interfaces in Microsoft Windows Media Services 2008. If you need to check the details on the installation, you could check the SharePoint Gorge blog.

The pros of this approach is you have the separate Media Server to handle all the different format of the media and the size of the file. As a result, it could support all different media formats and large files. The cons is the installation is complicated especially on the Video Transcoding installation and configuration. In our case, we have setup the architecture to allow SharePoint users to download files to SharePoint and we handle the media file transcode and decode from the back end. Here is the summary of the architecture for your reference.

Here are the procedure we handle the media files so end users will not even know media files are steaming from media server.
  • A user uploads a video to the Video Library
  • The event receiver copies the video and a configuration file to a share on the WMS server
  • Windows service on the WMS server sees the new configuration file, reads the configuration information and uses that to transcode the video if necessary (WMV files do not need to be transcoded)
  • After transcoding the video, the Windows service will place the final video into the folder mapped to the WMS Publishing Point (making it available for on-demand streaming)
As I mentioned before, the major problem is the codec installation on the Media Server in order to support multiple formats. The sequence of the codec installation is also critical to make sure all formats could be played. Here is the partial codex we installed with proper sequence.
  •      Install Cook codec            
  •      Install FLV Splitter
  •      Install RRM Splitter
  •      Install Real Alternative
  •      Install MpegDecoder012
Some of the codec are free to download but several are not. If you need to support some formats, you need to purchase the codec.

3. Use third-party media player to play
After we explore the out of box web parts and Microsoft Media Server, we found neither of them could satisfy our end users requirement that is users should be able to setup the page and play different media formats themselves without IT involvement. Out of box web parts could not support all media formats or need some coding skills. Microsoft Media Server needs IT involvement to setup the back end and configure the connections to Mediaa server. If you want to have a simple way to allow end users to utilize SharePoint 2010 to play media and video, the following third party Media Player Rotator Web Part probably is one of the best options for you now.

We looked at this Media Player Rotator Web Part. End users could either selects a random media file, a specific media file or a media playlist from the specified Sharepoint Picture or Document Library. The Microsoft Media Player plug-in is used to play back the media files.

Supported file formats are MP3, SWF (Flash), FLV/F4V (Flash Video), PDF, AVI, WMV, MP4, MPG, MPEG, YouTube, ASX, RTMP (Streaming Media), MOV and M4V (QuickTime). You could display
a single static movie or list of files. You could display YouTube videos or any files from Sharepoint List or Library.

There are two drawbacks on this web parts. It does not support Target Audience as out of Media Web part does. It does not support streaming and as a result, web part requires media players (FLV, Windows media and Quick time) should be installed on client or server systems, otherwise it won’t play any video file.

With more demanding on the Media and video file support from SharePoint users, I'm hoping Microsoft could come up much easier way to support all different formats in the near future. May be SharePoint 2015?

22 comments:

  1. Harry - Do you know about MediaRich for SharePoint? www.equilibrium.com

    This product would address this issue and more.

    ReplyDelete
  2. Lot of useful points are there. Thanks for your post. I like your way of providing information through your blog. I bookmarked it and share it to friend circle.
    html5 player| html5 video player

    ReplyDelete
  3. Interesting one. Keep posting such kind of information on your blog. I bookmarked it and check it.
    youtube html5 player| html5 converter

    ReplyDelete
  4. I just found one vendor provide this function you might want to check.

    The title is "Dynamic Video Collaboration in SharePoint"

    http://www.findwhitepapers.com/force-download.php?id=18626

    I should included in my blog but it was out recently.

    ReplyDelete
  5. Informative post.
    I would like to point out out a minor mistake. Under the first bullet point "1. Use out of box web part to play audio or video media file", the second option should be "Content Editor Web part" and not "Content Query web part".

    ReplyDelete
  6. Hi

    Really good post. I am helping a user who has uploaded both .mp3 and .wma files to a OOTB Media library. They have defined filtered views based on certain meta tag values.

    I have taken a look to see if I can improve the overall experience. I would welcome your comments

    1) The media library allows the content to be played provided it can recognised what format it is. I see .MP3 files stored that are simply presented as 'unknown' format thumbnail icons. Consequently, they won't be played.
    2) Should I be using one of the three approaches you mention . 1-2 would mean effectively sticking a CQWP on each web part page and configuring the query properties in each case. Alternatively, I could subclass the CQWP and allow it to be connected to a filter web part.

    3) Should I be using content types per media type. I use CTs elsewhere as the business value is obvious; I am just not sure why I would want to subclass media types.


    Daniel

    ReplyDelete
  7. Thanks so much for documenting the steps. You're truly a lifesaver.
    Aven, see also how to convert mts to mov

    ReplyDelete
  8. I just read through the entire article of yours and it was quite good. This is a great article thanks for sharing this information. I will visit your blog regularly for some latest post.
    CD Duplicator

    ReplyDelete
  9. This is a good post. This post give truly quality information.I’m definitely going to look into it.Really very useful tips are provided here.thank you so much.Keep up the good works
    Eco Disc

    ReplyDelete
  10. Hi, I'm unable to create a video either using a link to a video or using the embed code option. I'm getting "You must specify a valid embed code." error. I even tried copy pasting the embed code from this blog (for the youtube link) but getting the same error.

    Any help would be greatly appreciated.

    Thanks a lot!
    Jyotsna

    ReplyDelete
  11. Forgot to mention that we are using Sharepoint 2013.

    ReplyDelete
  12. Hi Harry - Thanks for a good article. I am trying to integrated WMS with SharePoint and need to play mp4 and mov files also but as they are not supported by WMS , hence would need transcoders.

    Can you please guide how to find correct codecs for different file formats and then where to find the codec installers for WMS ?

    Also, if possible please share code snippet for •The event receiver copies the video and a configuration file to a share on the WMS server

    ReplyDelete
  13. great post, your guide help me lot. thank you very much
    best keylogger

    ReplyDelete
  14. just find a good video converter to help to do so, such as aiseesoft video converter for mac is such a tooll which I have been using for a long time for convert mp4 to mov for editing and replay. just have a try at: http://www.ivideotool.com/ . good luck!!

    ReplyDelete
  15. Thanks! This is truly helpful information that I'm using as a developer.

    ReplyDelete
  16. HTML5 supports embedding video directly. You only need to convert your video to HTML5 format using the HTML5 video converter program. Users can watch video without Adobe flash player.

    ReplyDelete
  17. Was your media server separate from the servers in your SharePoint farm? Or did you install the necessary media server components on one of the servers in your farm?

    ReplyDelete
  18. Thank you so much. Cant tell you how helpful this is. ..Youtube Support

    ReplyDelete
  19. YouTube can likewise be regarded as a source of entertainment. YouTube has for ages been the main video sharing website on Earth on Download Rick Astley - Never Gonna Give You Up [HQ] with TubeNinja.

    ReplyDelete
  20. More to the point, you'd like to understand about the help of the manufacturing company. If you are more curious about tube pro master then you can learn more about on this site.

    ReplyDelete

  21. Hello Friends, Utilize this magnificent converter for file converting;

    Unique Converter

    ReplyDelete