Fast video cataloger with Microsoft intune

What is intune?

Intune is a relatively new application deployment technology from Microsoft.

“Microsoft Intune is a cloud-based service that focuses on mobile device management (MDM) and mobile application management (MAM). You control how your organization’s devices are used, including mobile phones, tablets, and laptops. You can also configure specific policies to control applications.”

Can Fast video cataloger run with intune?

You can package the Fast video cataloger installer as a .intunewin file using the Microsoft Intune Win32 App Packaging Tool.

Microsoft Intune Win32 App Packaging Tool will check the Windows Classic setup files and generate a .intunewin file imported into Intune Azure Portal.

You can download the tools from from Microsoft here:  https://github.com/Microsoft/Microsoft-Win32-Content-Prep-Tool

You will need to agree to their license agreement.

Read more about the tool here: https://docs.microsoft.com/en-us/mem/intune/apps/apps-win32-prepare

You can download the Fast video cataloger installer from the Fast video cataloger download page.

You run their tool from the command line and it is pretty straight forward.

Silent or unattended installation of Fast video cataloger

Fast video cataloger uses nsis as an installation package. You can download the latest Fast Video Cataloger installer from our download page. We always sign our installer and run it through antivirus software.

If you want to run the installer silently simply start it with /S (upper S) as a command-line argument.

If you want to run the installer so it installs into another output folder give it the /D argument. /D=<installation directory> to change the default installation directory.

Add keywords from video filename

Have you ever wanted to create keywords based on the filename of a video?

With the scripting support in Fast video cataloger, this is actually pretty easy. Here is a sample script to do just that, create keywords from the filename or path of a video.

The provided script takes the currently selected videos and adds keywords and actors based on the name of the video file.

You might want to tweak the script a bit to suit your own naming standard.

The array of separators list the characters that should be treated as keyword separators.

The array ignore_words is a list of common words that should simply be ignored and not added as keywords.

The integer min_length is the number of characters that a word needs to contains to be added as a keyword.

Finally, if a string contains the @ character that sentence will be treated as an actor. First name before the @ and last name after the @. The actors are created and added as cast to the video.

As usual, to run a script in Fast video cataloger you load it into the console window and click the Run button.

Script console and web browser open.

 

#region title_to_keywords


using System;
using System.IO;
using System.Runtime;
using System.Linq;
using System.Collections.Generic;
using VideoCataloger;

/// <summary>
///  Take the title and use it to generate keywords.  
///  If there is a @ in the title we treat that as an actor
///  the text before @ is first name and the text after is last name
///  if an actor with that name already exist we use that one.
/// </summary>
class KeywordsFromTitle
{
    static public void Run(IScripting scripting, string arguments)
    { 
        scripting.GetConsole().Clear();
        var catalog = scripting.GetVideoCatalogService();
        ISelection selection = scripting.GetSelection();
        List<long> selected = selection.GetSelectedVideos();
        foreach (long video in selected)
        {
            // Get the video file entry
            var entry = catalog.GetVideoFileEntry(video);
            scripting.GetConsole().WriteLine(System.Convert.ToString("Processing..." + entry.FilePath));

            char[] separators = { ' ', ',', '.', '-', '[' ,']', '{', '}', '_' };
            string[] ignore_words = { "is", "are", "who", "where" };
            string title = entry.Title;
            string[] keywords = title.Split(separators);
            int min_length = 3;
            foreach (string word in keywords)
            {
                if (word.Length>= min_length)
                {
                    if (!ignore_words.Contains(word))
                    {
                        if (word.Contains("@"))
                        {
                            // Actor
                            string[] names = word.Split('@');
                            string first_name = names[0];
                            string last_name = names[1];

                            scripting.GetConsole().WriteLine( "Actor FirstName:"+ first_name + " LastName:" + last_name );

                            int actor_id = -1;
                            VideoCataloger.RemoteCatalogService.Actor[] current_actors = catalog.GetActors(null, first_name, last_name, true);
                            if (current_actors.Length >= 1)
                            {
                                actor_id = current_actors[0].ID;
                            }
                            else
                            {
                                VideoCataloger.RemoteCatalogService.Actor actor = new VideoCataloger.RemoteCatalogService.Actor();
                                actor.FirstName = first_name;
                                actor.LastName = last_name;
                                actor_id = catalog.AddActorToDB(actor);
                            }

                            if (actor_id != -1)
                                catalog.AddActorToVideo(video, actor_id);
                        }
                        else
                        {
                            // Keywords
                            scripting.GetConsole().WriteLine("Keyword:" + word );
                            scripting.GetVideoCatalogService().TagVideo(video, word);
                        }
                    }
                }
            }
        }

        // refresh the gui to show the changed file paths.
        scripting.GetGUI().Refresh("");
    } 
}
#endregion

Search for video file name

How to search for a video file in a catalog

Here is a short sample script to search for a video file in the catalog given a filename.

Simply use the search api and provide the VideoQueryProperties. FilePath is a part of the video path you are searching for.

If the search failes to find any videos it will return null.

If it finds videos it will return an array of VideoFileEntry. The entries includes, among other things, the ID of the video. You use the id as key for the other APIs.

As usual, copy paste the script into the script window in Fast video cataloger. This is just a small sample, if you are developing your own script make sure to check our other developer resources.

using System.Runtime;
using System.Collections.Generic;
using VideoCataloger;
using VideoCataloger.RemoteCatalogService;
class Script
{
  static public async System.Threading.Tasks.Task Run ( IScripting scripting, string arguments ) 
  { 
    scripting.GetConsole().Clear();

    VideoQuery query = new VideoQuery();
    query.Properties = new VideoQueryProperties();
    query.Properties.Description = "";
    query.Properties.Link="";
    query.Properties.Title = "";
    query.Properties.FilePath = "part_of_filename";
    VideoFileEntry[] result = scripting.GetVideoCatalogService().SearchVideos( query );
    if (result!=null)
    {
      foreach (VideoFileEntry entry in result)
      {
        scripting.GetConsole().WriteLine( "ID=" + entry.ID );
      }
    }
  }
}