Archive

Posts Tagged ‘Video’

Video Renditions in SharePoint 2013

October 19, 2012 Leave a comment

During my explorations of new web content management and publishing features in SharePoint 2013 through the guidance published here, I came upon the idea of image renditions. I tried them out in different ways and posted some findings here on their workings. One thing I did not find any mention of in the article is of renditions applicable to videos. I chanced on video renditions as I was experimenting with uploading and embedding video in SharePoint 2013 which I talk about here. Although I initially wondered why, trying the feature out showed me that renditions as applicable to video are a different concept than Image Renditions. Here’s a quick comparison.

Image Renditions Video Renditions

Asset and Rendition are separate
There is one image that any of a set of predefined renditions available to all images in the site can be applied upon or even customized.

Each rendition is a new asset
If a given video file will need to be played back in different modes, formats, dimensions or bitrates, a new video file meeting those criteria needs to be created and uploaded.

Defined for each instance of embedded image
Content authors or designers can use renditions provided with SharePoint 2013 or add their own. They can define the various ways in which a given image can be displayed in several different locations on the site using different renditions.

One default picked for a video
One of the available renditions of the video can be picked as the default for display on any page where it is embedded. Different renditions cannot be placed on different pages.

Viewers get to see, not change renditions
Content consumers can see the effect of the rendition applied to the image but cannot change them or apply other renditions to a given instance of an image.

Viewers get to apply desired rendition
The default rendition is what is loaded with the page each time but the consumer of the page can select another rendition to apply.

To illustrate the above, let’s take a quick look at how we can do renditions of video. First, I go to my asset library where I keep videos for my site, pick the video I want and open the actions popup (click the ellipsis). When there, since what I want to do right now is not play or download the video, I can bring up a menu of additional actions by clicking on the ellipsis again [for the uninitiated, the ellipsis is the 3 dots you see on the tile indicating that "there’s more"]. I chose to "Edit Properties".

clip_image001

On the "Edit Properties" page, you get a little section that speaks about "This video’s renditions" – it is typically collapsed. When I expanded it, here’s what I saw.

clip_image002

Clicking on "Manage Renditions" takes you to the following slightly weird page with text flowing off the screen and flush to the right edge of the browser (but it works). As you can see here, in order to create alternate renditions of this video, you will actually have to upload other video(s).

clip_image003

I clicked on "Upload Video Rendition" and saw the following dialog; nothing fancy here, just pick a video file and upload. I uploaded a low bitrate version of the video I already had, that is more suited for playback on small form factor mobile devices.

clip_image004

When I click "OK", I am presented with a dialog where I can put in some metadata relating to the video file I uploaded. Note that I did NOT type in the "183 KB/sec" value in the Label field. That is something that SharePoint inferred based on the properties of the video. There are certain other properties that are not even presented on this dialog such as bit rate, frame width and height. You see these in the rendition listing above. Obviously, these are also auto-captured from the video asset uploaded.

clip_image005

Once I clicked on "Save" here, the video is uploaded to SharePoint. After upload, I now see there are two renditions available each with a different bitrate and frame size. The little green star (I like this a lot better than the word "New" that used to hang on a new item) shows the new video file that was added and as you can see, its metadata properties were correctly inferred.

clip_image006

As you can see above, you can also pick which rendition of a video is the default when you put it on a page. Notice how this setting is "global" for a given video? If you select the rendition that is default here, that is the rendition that will apply to the video on any page where it is embedded when the page loads. You cannot choose to do a different rendition on each page. The content consumers do have the opportunity to choose a different rendition to play back but it will always load with the default specified here. This is different from how image renditions work.

I left the default selection (to use the lowest bitrate available) for the default video rendition and clicked on "Save". This took me back to the "Edit Properties" page for the video.

clip_image007

As you can see under "This video’s renditions", the default rendition is now the low-res version. Since I did not change any of the actual video properties, I reckoned it shouldn’t matter if I hit "Save" or "Cancel" on this page but I hit "Cancel" just to check if it caused any kooky rollback of changes made to renditions. It did not – so everything’s good here. Oh, by the way, notice the new icon in the controls section of the play that looks like the signal bars on your cellphone? That is what indicates that there are multiple renditions of this video available. The same icon can be used to switch renditions.

Next stop, the page on which I had embedded this video. This is where I was disappointed. Just loading the page did not show the presence of the renditions available on the page. I cleared the browser cache and reloaded the page. That didn’t work either. Next, I recycled the app pool on the server to see if that would help but had no luck. I then went to the last resort which was to check out and edit the page, update the video and publish. When I edited the page, it worked. The renditions now showed up and worked. I republished the page and had everything going. The problem though, is that the change to the asset didn’t work directly on the page using it. The page had to be republished.

This behavior is in pattern with a similar observation I made relating to the Preview image that I documented in my notes from playing with video embedding. In general the behavior I am consistently noticing is that if you make changes to the properties of a video asset that you embedded on a publishing page in SharePoint, the change doesn’t reflect on an instance of that asset that you placed on a publishing page unless the page is edited and republished. This is rather inconvenient – so I am hoping this is something that is either only happening to me or is a bug in SharePoint 2013 Preview that will be fixed by release.

clip_image008

Another observation here is that the preview image I saw was for the high-res version. Clicking on the renditions icons showed me that the current rendition being applied is the low-res version but that is not the impression you get from seeing the preview image. You have to remember that you don’t get to associate a preview image with each rendition file that you upload for an asset. There is one image that is associated to the asset as a whole – one that was either auto-generated during asset upload or one that we change and apply to the asset.

There is a way to work around this last problem, though. After you have placed the video on the page, you can specify, through the ribbon, the preview image that you would like to apply to it. To do this, you would have to have already gone and taken a key frame shot from your video in the default rendition and stored it. You can also adjust the Horizontal and Vertical sizes through the ribbon to avoid too much of the black offsets. A little more work but hey, you can get it done.

clip_image009

Now once you’ve done all that and published the page, the switching of the renditions is pretty smooth. You can switch renditions even as you are playing back and the video would switch to the other bitrate or format specified in flight. This rendition selection is available to all users that are able to view the video on the page although they cannot change the default rendition. There you are – video renditions in SharePoint 2013.

Improvements with embedding video in SharePoint 2013

October 18, 2012 Leave a comment

In reading through the list of content authoring improvements made within SharePoint 2013, I found here the following text which sounded very encouraging from a video asset upload and metadata management perspective:

"A new video content type is added, and the video upload process is improved for content authors. Thumbnail preview images are created automatically when a video is uploaded to an asset library, and content authors can choose a frame from the video and use that as the thumbnail preview image".

So I went ahead and tried to do some testing with adding video to a publishing page on an installation of SharePoint 2013 Preview to see what the new experience is like. Here’s how you do it.

clip_image001

When you choose the upload "From Computer" option, here’s what you get to do:

clip_image002

The "Images" library – an "Asset Library" by definition seems to be the default destination library. I uploaded to "Videos" – an asset library I added to my site to keep videos separated from other publishing images. After upload, you get to edit metadata relating to your video.

clip_image003

In addition to keywords, author and comments, the preview image, copyright and label can be set.

clip_image004

I set everything except the preview image. On publishing, the page looks like this – rendered using the Silverlight web part and a random key frame chosen for the preview image.

clip_image005

Now all of this was for when you have your own video asset that you want to store on local infrastructure or on SharePoint and reference on your page in SharePoint. There is also an easy way to embed video from the popular video services such as YouTube and Vimeo.

Among the options presented above on where you want to select the video you insert from, you see "Embed" which allows you to paste an HTML code snippet in, to reference the video like you would do when you are trying to embed video from YouTube, for instance. Since inserting iframes in HTML field controls in SharePoint 2013 is possible, it should be a breeze to achieve something like the below… What? I love Coldplay.

clip_image006

NOTE: In order for an iframe to be able to display content from another site, the domain for the site will need to be cleared through HTML Field Security in site settings. This is also something that was newly introduced with SharePoint 2013 and is mentioned among the content authoring improvements that I referred to above.

I did play around with this feature too and posted some findings here. The reason I was able to quickly embed video from YouTube is because the domains for YouTube and Vimeo are already placed in the list of secure domains for display in HTML fields. So you can just borrow the video embedding code snippets from those sites and just paste them into the source of an HTML field in SharePoint 2013 and it would work.

Thumbnail / Preview Images

As mentioned in the list of improvements on the TechNet site, there is a way to pick a thumbnail image by playing back the video and using a "Capture Thumbnail" button (which is referred to as the "Camera button" in the options – likely to change by release?).

clip_image007

The other ways to set a thumbnail image is to use a picture saved to disk or one that can be obtained from a web address.

When the thumbnail image corresponding a video uploaded to an asset library is changed, the behavior observed on a publishing page where the video is embedded is slightly off – the video no longer has a preview image – it is blacked out as shown below. Not sure if this is a "preview" bug that will be fixed by release. Refreshing the page didn’t help restore the preview image. The playback wasn’t affected, though. Checked after playback if the preview image would be restored. That didn’t work either.

clip_image008

Checking out and editing the page seem to have the desired effect of refreshing the thumbnail image corresponding to the video.

clip_image009

This may be painful if there are a large number of pages with embedded video whose thumbnail previews are being changed. The behavior seems to suggest that they would all be blacked out and will need to be republished.

The article mentions that automatic thumbnail generation is possible but will require Windows Desktop Experience to be enabled. I did this using the method I published here. That didn’t change the overall behavior much. The thumbnail generation and the refresh on update behavior was pretty much the same. Although it didn’t black out this time (which may be due to the difference in media format – WMV before vs. MP4 this time), it did not apply the updated thumbnail image (even after republishing the page).

I wonder if this is behavior that I am experiencing exclusively but I doubt it given the number of times I have tried it and am constantly able to reproduce it. Given I am doing all this on SharePoint 2013 Preview, I do hope it is fixed by release.