+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Help uploading custom thumbnails for videos

Help uploading custom thumbnails for videos

4 posts, 0 answered
  1. Dehivis
    Dehivis avatar
    5 posts
    Registered:
    20 May 2016
    21 Jun
    Link to this post
    Hi guys, 

    I have a question regarding the creation of video thumbnails. I am uploading videos to sitefinity video gallery via Sitefinity API and i was wondering how I can upload a custom image via API for the video I am uploading. I have investigated but haven't found something about this topic. 

    Hope you can help me.

    Thanks.
  2. Dimitri Cools
    Dimitri Cools avatar
    80 posts
    Registered:
    06 Dec 2016
    21 Jun
    Link to this post
    Hi, 
    Please have a look at following documentation article:

    Use custom video thumbnail generation
    http://docs.sitefinity.com/use-custom-video-thumbnail-generation

    And blogpost:
    Adding custom thumbnails sizes for Videos and Images in Sitefinity
    http://www.sitefinity.com/blogs/boyan-barnevs-blog-/2012/07/18/adding_custom_thumbnails_sizes_for_videos_and_images_in_sitefinity
     
    And additionally:
    Add poster attribute to Feather Video widget
    http://www.sitefinity.com/developer-network/knowledge-base/details/add-poster-attribute-to-feather-video-widget
     


    Regards,
    Dimitri Cools
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. Dehivis
    Dehivis avatar
    5 posts
    Registered:
    20 May 2016
    21 Jun in reply to Dimitri Cools
    Link to this post

    Thanks for answering, i included the OALPCustom in my project and I noticed that the Thumbnail.Data is obsolete, and it says that  "Since version 6.1 the blob data is stored in the Blob Storage for the MediaContent". Also the method CreateThumbnail is obsolete.

    Is there a way to upload the video thumbnails using the blob storage?

    Thanks,

    Dehivis.

  4. Dimitri Cools
    Dimitri Cools avatar
    80 posts
    Registered:
    06 Dec 2016
    28 Jun
    Link to this post
    Hi,
    Please observe following sample for uploading an image (green.png) as a thumbnail to a video (SampleVideo).

    var manager = LibrariesManager.GetManager();
    var id = manager.GetVideos().Where(v => v.Title == "SampleVideo").First().Id;
    var thumbnailData = File.OpenRead("C:\\temp\\green.png");
    using (MemoryStream ms = new MemoryStream())
    {
        thumbnailData.CopyTo(ms);
        var data = ms.ToArray();
        manager.UpdateThumbnail(id, data);
    }
    manager.SaveChanges();


    Regards,
    Dimitri Cools
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
4 posts, 0 answered