Fast Video Cataloger 6.40

A new Fast video cataloger is now available for download. Lots of small but pretty important improvements in this update. Get it from https://videocataloger.com/download/

User interface improvements

  • The Scale of thumbnails is now stored per layout.
  • If you right-click on the thumbnails scale slider there is a context menu to select 50%, 100%, and 200% scale.
  • If “Extended properties” and “Extended thumbnail properties” are opened or not in the detail view is now stored with each layout.
  • When you add an actor it is now put first in the list and is selected. This should make it easier to spot if you want to drag it as a cast member right away.
  • When you have one of the top menus opened you used to have to first click outside to close it. Then you could click on other user interface elements. This is now fixed.

Video player

  • Using MadVR returning from fullscreen mode should now work correctly.
  • In fullscreen mode, click on the screen to pause/unpause.

Performance

  • Optimized thread pool usage a bit to fix general slowdown issues.
  • If using “Write metadata in video files” this should no longer block the keywording user interface.
  • Optimized keyword entry so it should be more responsive.

Bug fixes

  • Fixed issue with videos sometimes getting a 0 length when indexed.

Scripting

  • Error messages when compiling scripts should be a bit more clear, and we always scroll to the end of the message automatically.
  • ConsoleWrite could continue to the next line before the text was visible on the screen, this is fixed.

Fast video cataloger 6.39

Today Fast video cataloger 6.39 is available for download. This is a bug fix release without any new major features, thanks to everyone who has reported issues.

New .Net framework

We have updated to use the 4.62 version of the .net framework. If you have the latest version of Windows 10 this is already included with your operating system. If you are on an older version the installer will check if you have the framework and prompt you to install it as part of the installation process. The updated .net framework includes a whole range of general bug fixes and performance improvements in .net. More info on the official .net page.

Usability improvements

  • If you hold ctrl when entering a keyword in the keyword search field it will direct that keyword to the exclude keyword box instead.
  • We limited the height keywords can take in the keywording box to prevent the input field to scroll down if a catalog has lots of keywords and/or the panel is thin.
  • You can now click on the video player screen area to play/pause the video.

Bug fixes

  • Fixed crash after capturing a screenshot to file.
  • Fixed issue with aspect ratio when using MadVR renderer.
  • Fixed issues that it was not possible to drag the seek bar in the videoplayer.
  • Fixed issue with bins not showing up in the dropdown in some cases.

Video web search in Fast video cataloger

I will show you how to access the web browser in Fast video cataloger to easily integrate a web search with your video catalog. In Fast video cataloger 6.31 we opened up the integrated web browser in Fast video cataloger for scripting. If you are on an older version please update to the latest version from our download page or click the upgrade button in the program.

Web browser window

The web browser is what you see when you click on the view button and Help.

Click the help button to open the web browser.

Here is how it looks with just the script console and the web browser open in Fast video cataloger.

Script console and web browser open.

Scripting the browser

IScripting has a new member function GetBrowser(); that will get you the top-level interface to the integrated chromium web browser. The complete interface is documented on the cef GitHub site. To load a web page to the browser window you simply need to call Load() and give your URL as argument.

To get the underlying browser object and access the dom model you can call GetBrowser() to get and IBrowser object. The IBrowser interface has a MainFrame property of type IFrame and from here you can get access to execute javascript. That is outside the scope of this text, let me know if you are interested in more example on how to use that functionality.

Google search

You can do google searches by giving the right arguments to the google URL. http://www.google.com/search is the root URL. Search arguments are passed as q=[search terms]. Search terms need to be separated by a + sign. There are plenty of extra arguments to customize your search, for example, as_filetype=[file extension] to search for a specific filetype or as_sitesearch=[site URL] to search only at a specific site. In this example, I will only use the basic search query but you can easily expand on it to fit your needs. Remember to use & between arguments if you want to send more than the q argument y.

The search sample

We start by getting your current video selection. Then we fetch the VideoFileEntry for that selection using the VideoCatalogService interface. This is very similar to most other samples. Then we do a bit of string manipulation. Spaces in the Google query should be separated by + so we replace all spaces and also all _ as they are probably meant as spaces in the title. Last we check if the title has a “.” in there somewhere and get rid of everything after the . as that is probably a file extension. Now we have the string we want to search for. We need to pass this to google as q= so we put that in the query string.
Next, we get the browser with GetBrowser() and then call Load() with the Google base URL and the search query.

Script Code

Copy-paste the following into the script console to use the selected video title as a search term on google. Click Run to execute the script.

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 ) { 
  var selection = scripting.GetSelection();
  List selected_videos = selection.GetSelectedVideos();
  if (selected_videos.Count>0) {
    var cataloger = scripting.GetVideoCatalogService();
    var video_entry = cataloger.GetVideoFileEntry( selected_videos[0] );
    string title = video_entry.Title;
    title = title.Replace(' ', '+');
    title = title.Replace('_', '+');
    int extension = title.LastIndexOf(".");
    if (extension!=-1)
      title = title.Substring(0,extension);

    string query = "q=" + title;
    var browser = scripting.GetBrowser();
    browser.Load("http://www.google.com/search?" + query);
    }
  }
}

Serve videos from a web server

With Fast video cataloger, you can serve videos you have in your catalog over a web server. This will let you share a video catalog with someone and give them super fast search and access while keeping all the large videos on your web server.

How to host video from a web server

Hosting your videos from a web server can be a practical solution if you need to share a catalog without having to distribute your videos files. A video catalog is usually relatively small (on the order of a few gigabytes) and easy to distribute while the video files can easily take up terabytes of space. If a user has the catalog local it can be searched and browsed quickly. Then when the user finds a video and wants to play it, only the relevant part of the video is served over your web server.

Web server

To set up this workflow you will need to have a web server installed. Windows come preinstalled with IIS but it will need to be enabled. You can enable it through the “Turn Windows features on and off” that you can reach via clicking Windows key + R key and type appwiz.cpl in the run window and press enter. Now you see the Program and Features part of Control Panel and on the left-hand side click on the “Turn Windows features on or off” link and you will see a long list of features. Locate Internet Information Services(IIS) and check that checkbox. Once you click OK windows will take a while to set your IIS server up. When it is done you can navigate to localhost from your web browser and access your IIS webserver.
Another great free web server is the Apache webserver.
In general, we have to refer to the developer of the software on how to install and configure their web server. There is more than plenty of information about it available online.

www root

Once you have your web server setup and configured you need to find the root from where files are served. If you are using IIS this will normally be “C:\inetpub\wwwroot\” and on Apache it will be something like “C:\wamp\apache2\htdocs\” (using the highly recommended Bitnami wamp distribution ). All videos you want to access over the webserver must be below this root folder.

Please note: Not all video formats can be read from an HTTP server, especially old formats that can be problematic. We recommend that the videos you place on your webserver is in mp4 format.
That was the preparation. You should now hopefully have a working web server and videos in the www root of your webserver.

Configure Fast video cataloger for serving videos over http server

The next step is to go to Fast video cataloger and on the info screen click the “Use hosted videos” button.

Where you find the option to configure hosting through a web server

This brings up the configuration wizard and is an easy step by step guidance. In the first dialog, you enter the www root of your web server. Remember that if you are using IIS it might be “C:\inetpub\wwwroot\” and on Apache it might be something like “C:\wamp\apache2\htdocs\”.

In the second field enter the URL of the server as seen when you access it through a web server. When you are running on a local server this would be http://localhost/ or http://127.0.0.1/. You have now configured Fast video cataloger to recognize your web server. The open button is a good way to test it is set up and running.

play video through web server.

Adding videos

Next, you add the videos from your www-root to your catalog. Do this the same way as usual from the add videos window. When you click on one of your added videos you will notice that the path to the video will be something like: [WebServer]\video_indexer.mp4

When you play this video the path will be converted to your www root and played. This is very similar to how special folder work.

To load the video over the webserver you will need to go into the “Use hosted videos” dialog again and check the “Enable loading over http” checkbox.
If you play the video after that it will be loaded through requests to your webserver. This specific setting is saved in the catalog so if you share your catalog with someone else the [WebServer]\video_indexer.mp4 will resolve to the same URL for them as well.

Note: Fast video cataloger works most efficiently when you have your videos and images locally. Only host through a web server if you don’t have direct access to the files.

Fast Video Cataloger 6.33 – Exclude videos with keyword

A new version of Fast video cataloger is now available from the download page

Search – Exclude keywords

You can now exclude videos matching keywords from the search result. You find this option in the search window below the keywords. This excludes filter works on the set of filtered videos. For example, when you search for all videos matching an actor you can exclude videos that have specific keywords. If you search for a keyword and exclude that keyword, the exclusion will take priority.

Search – Actors

The actor search now supports search on Actor Bio and Actor Link.

The Actor window now only load visible portraits to save memory for catalogs with lots of actors. And, we extended the script API with a new SearchActor() function. Make sure to check out our previous blog post on how to write a script to import actors from an external movie database.

Scripting

Talking about scripting. we updated Console writing so it can be done from any thread in a script, for example from a browser callback. I also added some more documentation on the exposed browser. We will write a more detailed post on how you can use it later but it is all working in the current build if you want to try it. Running scripts from an action button always gave an error message, this is fixed.

Meta data in files is faster

Writing metadata to video files (enable from the metadata preference page) is now done in a background thread and is faster.

Video player

We fixed an issue when you clicking on the seek bar while a video was playing and that click was ignored. There were scaling issues when using the vmr9 video player could happen if there was a big difference between the video aspect ratio and the window aspect ratio. Changed order of vmr7 and vmr9 in the preferences ( The recommendation is still to prefer the direct option )

Fast Video Cataloger 6.31 – Play videos from a web server

I am happy to let you know we have just made Fast video cataloger 6.31 available

Play videos from a web server

We have added new support to let you set up videos to be served from a web server. Access this from the catalog/info screen and the “Use Hosted Videos” button. This enables you to put your videos on a web server and then share a catalog with other people so they can easily access your video files. You can then share the relatively small catalog file where they have quick instant access to search and browse without having to distribute all the large video files with them. And you can use this for a selected number of videos in a catalog, i.e. a catalog can have a combination of videos hosted on a server and loaded from your local filesystem.

play video through web server.

Please note that not all videos can be served from a web server, we recommend modern containers like mp4 for videos hosted this way. It is also always slower to load over a server so if you do not need this functionality you should not use it. Also, note that indexing currently needs to happen through the Windows file system.

Save to other than the selected layouts

You can now save a windows layout to another layout than the currently selected one. This new functionality is available from the view menu. Select the layout you want to save to from the dropdown list and then click Save. By default, the dropdown will be the current layout.

Chrome browser

The browser for the start page has been switched to a Chromium-based browser from internet explorer. We have also extended the scripting interface with a new function to give you direct access to the browser window. This will allow an easy way to either write out results to a web page integrated into the software or to gather data from a web page into your solution.

Scripting improvements

The execution of scripts can now be asynchronous. This will allow you to have scripts running as you interact with the rest of the user interface.

The load script dialog will now default to open in the sample script folder, and then the last opened folder.

A new sample script get_actors.xaml.cs will show you how to integrate Fast video cataloger with an external web service. This script is explained in detail here

Progressbar

The program icon in the taskbar now shows progress when a video is being indexed. The progress is per videos not for all videos in the current batch.

And other minor fixes…

It is now possible to multiselect images in the companion image gallery and remove them from the catalog. The Update dialog has gotten an improved layout.

Using TMDB Web API ( The Movie DataBase )

TMDB (The Movie DataBase ) is a large open internet database you can use to search for movies, tv shows, and people in movies. It also has a web API.

Fast video cataloger is a software to organize video clips so you can quickly search, browse, and find what you are looking for.

This example will show how to use the scripting support in Fast video cataloger to integrate with the web API in TMDB. My goal is to show you have to integrate a search for actors using the TMDB web API and then add the metadata to Fast video cataloger. With this start, I hope you can expend it to what you need and perhaps use other functions in the TMDB API.

Script demo

Getting started

If you do not already have Fast video cataloger installed you can download a free trial from here

Before we can start you also need to create a free account at TMDB that you can get from here, When you have your account to go your profile, click settings and find the API tab and request a developer API key.

The script we show here can be downloaded from our sample git hub repository

Place the downloaded scripts get_actor.xaml and get_actor.xaml.cs in the script folder of your fast video cataloger installation.

Open the get_actor.xaml.cs and fine the line near the top that reads

static string api_key = "";

and replace the empty api_key string with your TMDB API key.

Running the script

To run the script in Fast video cataloger open the Script console window. In the window click on the Load button and load the get_actor.xaml.cs script. Click run and you should see a window like this:

tmdb actor search

Integrating with tmdb people search

Search for an actor and you should see something like this

tmdb search results

results of a search in the movie database

You can then click “Add to catalog” to add the actor to your Fast video cataloger database

Script overview

The C# script that is running uses WPF for the user interface. The user interface is defined in the XAML file. We use the rest API for TMDB. You can find full documentation for it here

Note that this sample just uses a minimal subset of the TMDB API. But, the principles are the same for the whole API, and it should be pretty easy to extend this with more functionality. For example, getting poster images or searching for movies.

Another difference to most other Fast video cataloger samples is that this one uses async programming which is needed for the web APIs.

Script walkthrough

You can find the full xaml file here and the full source file here

References

At the very top of the script we need to add our external references. This is what normally would go into “references” in a visual studio c# project. In a Fast video cataloger script you use a comment in the format of :”//css_ref [dependency]”.

//css_ref WindowsBase;
//css_ref PresentationCore;
//css_ref PresentationFramework;
//css_ref System.Runtime;
//css_ref System.ObjectModel;

WindowsBase, PresentationCore, and PresentationFramework are needed for the WPF user interface. System.Runtime and System.ObjectModel has the c# code we need to access and parse the web API.

Static variables

At the top of the script, we have a few static variables. The important one here is again the api_key variable, here you need to fill in your key as mentioned earlier.

Entry point

Run is the entry point of all scripts running from Fast Video cataloger:

static public async Task Run(IScripting scripting, string argument)

The only thing we do in the entry function is to save the passed in scripting interface and then create the GetActors WPF window and show it. We intentionally call Show() and not ShowDialog() since we want to be able to bring up the actor window in Fast video cataloger when we have this window open.

Constructor

In this example, we have put all code in the HelloWindow class. This has the same structure as the basic HelloWpf.cs sample.
The constructor loads the XAML interface definition and sets up the window. It also establishes the connection between the buttons and their click functions (unfortunately we do not support binding directly in the XAML as the XAML file is loaded through the script engine ).

Searching

When the search button is clicked we will get a callback to Search_Click(…). This is the main function that performs the search. We first fetch the text the user entered in the search box.

Then we call SearchActors asynchronously and expect to get a CPersonSearchResult back, more on that later.

private async Task SearchActors( string query )
{
  string encoded_query = System.Net.WebUtility.UrlEncode( query );
  string search_line = api_base_url + "search/person?api_key=" + api_key + /
         "&language=en-US&query=" + encoded_query + "&include_adult=true&page=1";
  CPersonSearchResult header_result = await GetFromJSON(search_line);
  return header_result;
}

After that, we have to check if we got a search hit. In this example, we only care about the first result but you can of course list all the results and let the user pick one of them.

We have our first actor and pick the name. We then call MakeProfileImageUrl(…) to generate a URL for the profile image. We call GetImageData(…) to get the image from that URL.

At this point, we have most of the data we need.

We create a new Actor class in the Fast video cataloger format and store that in m_CurrentActor. We fill in the data members with data from the search and the downloaded portrait data.

Next, we call GetPerson() with the TMDB id for the first actor. Once we have done that we have all the data we need from TMDB.
We create a WPF image from the downloaded image data and call SetActorToUI() to update the user interface.

SetActorToUI()

This function simply updates the user interface from the variable we have designed. The portrait is set to the image, the name and the description is set. The XAML file defines the whole layout of the user interface including size and positions of elements and fonts.

Adding to Fast Video cataloger catalog

If you click add to catalog after you have searched and found an actor you will get a callback to AddToCatalog_Click(…). Here we simply get the interface to the video catalog and call AddActorToDB() with the m_CurrentActor we filled in earlier when we got the search result.

GetConfiguration()

GetConfiguration() is a wrapper to load the TMDB configuration. You only need to call this once in your application and it is needed to among other things figure out the path to any image resource. The configuration is stored globally in m_Configuration. This is a very short function and it is a good example of how to use the TMDB rest API.

First, we create the URL that we will use to access TMDB. It always starts with the base URL and then the API we want to use and some arguments. Among the arguments, you always pass in your API key. We then use this URL and call one a utility function, GetFromJSON(), we have in the sample code. This function takes a class argument, which is of type of the JSON file we want to get from the URL. And, it returns an object of that class or null if it fails.
Let us take a closer look at that utility function.

GetFromJSON()

GetFromJSON() is an asynchronous function that you pass the class of what you want to read from the query string. There is some initial setup and then we call GetAsync( query ) that will asynchronously call the URL and get the result. Once we have the result we read the data from the response message as a string. We then create a memory stream to the string data and create a DataContractJsonSerializer object to parse our data from the JSON data and create the C# object.

public async Task GetFromJSON(string query)
{
  T parsed_stuct = default(T);
  var handler = new HttpClientHandler();
  handler.AllowAutoRedirect = false;
  var client = new HttpClient(handler);
  try
  {
    var videoGetIndexRequestResult = await client.GetAsync(query);
    var result = videoGetIndexRequestResult.Content.ReadAsStringAsync().Result;
    var ms = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(result));
    var serializer = new DataContractJsonSerializer(typeof(T));
    parsed_stuct = (T)serializer.ReadObject(ms);
    ms.Close();
  }
  catch (Exception ex)
  {
    Console.WriteLine(ex.Message);
  }
  return parsed_stuct;
}

If you want to use other parts of the TMDB API you need to create classes for the data that are returned by the functions.

SearchActors( string query )

The SearchActors() function is very similar to the GetConfiguration() function but it uses the search/person API. We pass the api_key but also some extra arguments.

One of the arguments is a query string, this needs to be URL encoded to handle special characters like spaces.

Then again, once we have our URL, we simply use the GetFromJSON() utility to read the result into the CPersonSearchResult class. This class includes info about how many results you have from your query and some basic information about each result returned in an array of class CActorResult. Here you have the name of the actor, an id that we can use in other API calls and a profile_path. Profile_path is needed when you want to create an URL to fetch the profile picture.

MakeProfileImageUrl()

MakeProfileImageUrl() is a utility function that is used to generate an URL to a profile image. For this, we need the configuration data where you have the base_url for all profile images. We need to decide on the size of the image, the different types of sizes are also listed in the profile image, and then finally we need the part of the URL that is unique for every actor. Once we have this URL we can just get the data.

GetImageData()

GetImageData() takes the URL from MakeProfileImageUrl() or really any image URL in the TMDB image URL format. We again use the WebClient API and call DownloadDataTaskAsync(). This function will asynchronously download the image data to an array. This is the right format we need to pass to Fast video cataloger. But we need one more step to display it in the WPF user interface.

private async Task GetImageData(string url)
{
  byte[] image_data = null;
  try
  {
    Uri image_url = new Uri(url);
    var webClient = new System.Net.WebClient();
    image_data = await webClient.DownloadDataTaskAsync(image_url);
  }
  catch (Exception ex)
  {
    Console.WriteLine(ex.Message);
  }
  return image_data;
}

LoadImageFromStream()

LoadImageFromStream() takes a memory stream to the bytes we loaded with GetImageData() and create a BitmapImage object from it. This object can then later be assigned as a source to any Image element we have in our XAML user interface.

Conclusion

I have shown how you can expand on the functionality of Fast video cataloger with web API. In this example we used TMDB but there are tons of other web APIs that might be useful and my hope is that this sample will make it easier for you to get started.

Fast Video Cataloger 6.30 supports video metadata

Fast video cataloger 6.30 is now available with new support for video metadata. Download from our download page

metadata written to video files

We now support writing New option to save out metadata inside the video file. This option will save basic metadata like keywords, descriptions, and ratings into the metadata section of the file. This will make it available in Windows properties of the file. This also means that it will be available for Windows search. Please note that this type of metadata is not supported by some of the older video containers but it should be supported by modern formats like mp4. This option is disabled by default but can be enabled from preferences on the metadata tab.

.nfo metadata next to video files

We have added a new requested feature to write out .nfo file next to the video file. The nfo file will contain basic metadata like keywords, description and ratings in the Kodi format. This option is only recommended if you want to share the metadata in the catalog with another media manager. It is disabled by default and can be enabled from preferences. If the video file already has a .nfo file it will be updated with the data from Fast video cataloger.

video metadata preferences

video metadata settings

More shortcuts

It is now possible to assign shortcuts to show and hide Windows. No default shortcuts are set for these, but you can assign them if you have a need. We still recommend using layouts in most cases.

Bug fixes

And we have continued to fix reported bugs. Import videos can now handle special folders correctly and can detect if a video has been imported already. I.e. if you import videos already in the target catalog they will be skipped. If you had the playlist window undocked and floating and then tried to change the order of playlist items the program crashed, this is now fixed.

Fast Video Cataloger 6.29

Today we release Fast video cataloger 6.29.

A quick update this time around, so a bit fewer changes than usual but I think they are pretty important.

Companion images

It is now possible to delete multiple selected images in the companion image browser window.

If adding or removing images to the companion image browser the window was not refreshed until another video was selected.

Usability

Improved tooltips for the views.

Fast Video Cataloger 6.28

Today we release Fast video cataloger 6.28.

So what is new in this version?

Ctrl+I

The interactive search, Ctrl+I, now selects the search text when you show it after hiding. Just start typing to get a new search or move with arrows to edit the previous search text. If you have not used the interactive search do give it a try.

More Companion image optimizations

We have continued to optimize the companion image browser. This time we did optimizations for when the companion image windows are not visible in a layout. This should make loading of video thumbnails images in cases a video had a very long list of companion images. We have also optimized the companion image browser itself even more.

Crash fix

Fixed a crash when dragging an actor from a floating (non-docked) window into the cast window.

Check for update

Added a new check for update button, and we do a check for updates in the background now when the program starts.