Fast Video Cataloger 6.27

I am happy to let you know we have just released Fast video cataloger 6.27.

So what is new in this version?

Companion image browser

Companion image browser lets you view photos in the same folder or a subfolder of the video. We have done a very significant performance pass on the companion image browser. And, we have added an image cache to make it even faster.

Actions

There is now a way to launch actions without waiting for them to complete and without showing the console window. The recommendation is to first test your command with the usual command-line version so you can view what is being executed. Once it is working you can switch to the new mode, “Shell execute”

Execute commands

We have added a new action argument to pass in the selected companion image, {preview_image} we also added the folder of a video “{video_folder}”.

Preview video companion image

Problem opening catalog

We have added check and error dialog for when the program is not allowed to write to a folder. This can be caused by some antivirus/antimalware software if they are not configured correctly. Now there is a message instead of a silent fail when you tried to create a new catalog in a folder the program was not allowed to write to.

And bug fixes

As usual, we have a few bug fixes in this update…

In some cases the volume of the video player was set to 0 when it should not have been. This should now be fixed.

If you right-clicked a video and selected “assign to bin” from the menu, the video was not moved to the bin as it should have been. Also, we did a pass on the user interface of the assign bin dialog to make it more clear as in some cases the colors made it hard to read.

If you right-clicked a companion image browser it had some menu options incorrectly disabled.

Finally, we fixed an in the keyword manager that prevented keywords to be completely deleted from a catalog.

Setting tags to video files

Video tags and keywords

I will show you how to write tags to video files so they can be searched from Windows file explorer.

In Fast video cataloger, you can assign tags (keywords) to videos as well as to specific points in time inside of the video files. You can quickly search across all your videos even if the video files are archived away and not accessible. Keywords in Fast video cataloger are stored in the catalog and not in the video files. If you want to be able to use Windows search and have the same tags as in Fast video cataloger you need to transfer the tags to the actual video files. Fortunately, this can be easily be done with the integrated script support in Fast video cataloger.

Setting tags to video files

If you don’t care about the details simply copy the script at the bottom of this text into the script window in Fast video cataloger. Select the videos you want to transfer tags to and run the script.

Tags on files in Windows

When you do a search in Windows you search on metadata stored inside files. Windows can build and maintain an index of all this metadata to make searching a bit quicker so that it does not have to access all files every time you search. What metadata you can add to a file depends on the file format. It is not the same for all files and for some file formats it is actually quite limited. For example, not all video file formats support tags. To see what tags are set to a video file, click properties in Explorer and go to the Details tab.

Tags in video file details

Video detail property page

You can also get to the properties from inside Fast video cataloger, just right-click the video in the catalog list and select File/Properties.

If you see a Tags line in the property sheet then the format support Tags. You will also find a rating, title, and a comments field. If the tags field is not there for the file format, that format simply does not support tags. If the format does not support tags then this script will fail when trying to assign tags to it. This is also one of the reasons why Fast video cataloger does not store tags inside of the video files by default.

C# code walkthrough

WindowsAPICodePack

We will use the "Microsoft.WindowsAPICodePack.Shell" package to write the tags to files. To be able to use that package we need to add a reference to it from our project. If you are copying this code for a normal C# project, i.e. not a Fast video cataloger script you can add the reference in the Visual studio solution (look in references). For a script in Fast video cataloger we don’t have a solution, the way we need to do this is with a special comment. The first line in the script adds that reference: //css_ref Microsoft.WindowsAPICodePack;. Then we also need to add the using lines to bring in the library to the file: using Microsoft.WindowsAPICodePack.Shell;. Now that we have solved the extra dependencies we can use this library to write our tags to the videos.

The code

The beginning of this script is very similar to most other Fast video cataloger sample scripts. We get the id of the selected video(s) and then use that id to the path to the file.

The ConvertToLocalPath(...) is needed in case your catalog has used special folders and will convert these special folders into an absolute path. If the path is already absolute this will do nothing.

Then we need to get a shell reference to the file with ShellFile.FromFilePath. In the Windows shell not all entries are files. The shell API references entries in the shell using pidl and not normal file paths. This API call simply gets the path in the shell to the file.

The next step is to get the function to write to the property page of the shell object. file.Properties.GetPropertyWriter(); give us the interface we need and then we only need to call WriteProperty(..) to write property values of the file. For the calls to succeed the property needs to be supported by the file format as mentioned before and the file needs to be writable.

External references

As all other samples this sample is available on the Fast video cataloger github repository.

Documentation on properties for Windows files can be found here

C# code – Tag to video file


//css_ref Microsoft.WindowsAPICodePack;
using Microsoft.WindowsAPICodePack.Shell;
using Microsoft.WindowsAPICodePack.Shell.PropertySystem;
using System.Collections.Generic;
using System.Runtime;
using System;
using VideoCataloger;

namespace VideoCataloger
{
  public class WriteTags
  {
    static public void Run(IScripting scripting, string argument)
    {
        scripting.GetConsole().Clear();
        var catalog = scripting.GetVideoCatalogService();
        ISelection selection = scripting.GetSelection();
        List selected = selection.GetSelectedVideos();
        foreach (long video in selected)
        {
          try
          {
            var entry = catalog.GetVideoFileEntry(video);

            IUtilities utilities = scripting.GetUtilities();
            var selected_path = utilities.ConvertToLocalPath(entry.FilePath);

            var file = ShellFile.FromFilePath(selected_path );

            var selected_videos = new long[1];
            selected_videos[0] = video;
            var TagInstances = catalog.GetTagsForVideos(selected_videos);
            List tag_list = new List();
            foreach (var tag in TagInstances)
            {
              tag_list.Add( tag.Name );
            }

            scripting.GetConsole().Write( "Tagging : " + selected_path + " ..." );
            ShellPropertyWriter propertyWriter =  file.Properties.GetPropertyWriter();
            propertyWriter.WriteProperty(SystemProperties.System.Keywords, tag_list.ToArray() );
            int Rating = 0;
            if (entry.Rating==1)
              Rating = 1;
            if (entry.Rating==2)
              Rating = 25;
            if (entry.Rating==3)
              Rating = 50;
            if (entry.Rating==4)
              Rating = 75;
            if (entry.Rating==5)
              Rating = 99;
            propertyWriter.WriteProperty(SystemProperties.System.Rating, Rating );
            propertyWriter.WriteProperty(SystemProperties.System.Comment, entry.Description );
            propertyWriter.Close();

            scripting.GetConsole().WriteLine( "Done " );
          }
          catch (Exception ex)          
          {
            scripting.GetConsole().WriteLine( ex.Message );
          }
        }       
    }
  }
}

Fast video cataloger 6.26

We just uploaded Fast video cataloger to version 6.26, download it from videocataloger.com/downnload/ the download page.

So what is new in this version? The largest change is probably an update to the docking framework which should fix a number of bugs as well as improve performance.

The “Find duplicate videos tool” has been further improved, Select “Clean” from the start menu. We also removed the old tool from the repair dialog.

And, finally, this is pretty small. We added a new shortcut to “refresh search” (Shift + Alt + R). This shortcut just refreshes the current search and is useful if you have added new videos to a catalog after the search.

Media player classic as video player in Fast video cataloger

Media player classic

A really great and free video player is MPC-HC Media player classic home cinema. From their own site:

“MPC-HC is an extremely light-weight, open-source media player for Windows®. It supports all common video and audio file formats available for playback. We are 100% spyware free, there are no advertisements or toolbars.”

This post will show you how to use media player classic as a video player in Fast video cataloger? But first, what about the internal video player?

The integrated video player

Fast video cataloger has an integrated video player that can play your video straight from the selected thumbnail. There are a whole lot of ways to configure the video player to your liking. The integrated video player is really great for quickly browsing your video collection and finding what you are looking for. However, if you really want to watch a video from your collection you might want to use an external favorite video player.

Setting up media player classic

First download a stable 64-bit version version of MPC-HC from https://mpc-hc.org/downloads/ and unpack it to a folder (or run the installer). I unpacked the program to this folder:
D:\utils\MPC-HC.1.7.13.x64\ so the path to the video player is: “D:\utils\MPC-HC.1.7.13.x64\mpc-hc64.exe”

Just running mpc-hc64.exe will start it with the normal user interface.

You can also start the video player with command line arguments, if you run the program from the command line with the /? switch you get a list of command-line arguments. Here are the ones we are going to use:

/fullscreen : Start in full-screen mode
/play : Start playing the file as soon the player is launched
/close : Close the player after playback (only works when used with /play)
/startpos : start from a time in the video

So let us say we want to start playing a video c:\video files\sample.avi in fullscreen a minute into the video file. We can do that with the following command line:

“D:\utils\MPC-HC.1.7.13.x64\mpc-hc64.exe” “c:\video files\sample.avi” /startpos 00:01:00 /fullscreen

Notice the path to the video file is in quotes since there is a space in the path.

To use this from Fast video cataloger we need to create a command-line with the selected video and the time of the selected thumbnail. You can do this easily with an action.

Media player classic as an action

Actions are created from the preferences in Fast video cataloger.

In preferences go to the “Action” tab and click the “Add” button to create a new action.
1. Enter a good name for your new action and a tool tip. (Don’t name it Play as then it will collide with the normal play-action)

media player classic action name

Name of video player action

2. Click on the execute tab and browse for the mpc-hc64.exe file.

media player classic executable path

pick the media player classic executable

3. Click on the arguments tab and enter the following line as an argument:
“{video_file}” /startpos {thumb_time} /fullscreen /play
The arguments inside {} will be replaced when the action is executed.
Click “Ok” to create your action.

arguments to media player classic

media player classic arguments

Click OK again to close Preferences. Preferences and actions are stored in your local settings and not per catalog.

In Fast video cataloger click the view button and make sure the action window is visible (the button should be blue).

In the Action window, you can find your new command if you expand the custom actions.

Custom video player action

Find the new video player action in the custom actions section

If you click this button now it will play the currently selected video in fullscreen from the time of the selected thumbnail with the mpc video player.

Shortcut to the media player classic action

Now let’s assign a shortcut to the video player. Click the catalog button and then the shortcut button.

video player shortcut

shortcut for video player

In the shortcut dialog scroll to the bottom of the list and you will find your new “Play MPC” command there. Click on the Key column for the command and enter press your new shortcut. Then Click OK to close the shortcut dialog.

Fast video cataloger 6.24

We just uploaded fast video cataloger 6.24, get it from videocataloger.com/downnload/. We improved the help for new users and added help to the preferences. The C# videoindexer scripting interface has got an extension. It is now easier to add whole folders of videos just as if you are using the graphical user interface and add a folder from the add video window.

File organizer

The video File Organizer in Fast video cataloger allows you to manage the videos on your computer while still keeping your catalog up-to-date. You can move a video file that is part of your catalog by dragging it from the Video Catalog window to a folder in the File Organizer window.

Attract windows

Atract windows in Fast video cataloger is a way to rediscover your catalog. The attract windows display content from your video catalog automatically as different slideshows. There is an attract window for your actors, for your companion images and ofcource for your videos.

We took the name from old arcade games that had an attract mode where they console played the game itself trying to attract players. So the purpose of these windows is to let you discover your entire video catalog. Perhaps for inspiration or perhaps just as a nice “screen saver”.

Here are is a short summary of how you can configure the preferences for your attract windows