Quick intro to MovieScanner2
As with the original MovieScanner (released originally in 2013), this project is one of my experiments to build cross platform applications with Lazarus Pascal.
The application was developed on a Mac and the compiled under Windows and Linux to have it available under the most common platforms, and this work surprisingly well.
The purpose of MovieScanner2 is to basically keep track of your video files and the specifications of each video file, allowing you to sort by resolution, filter by language, etc.
Please be aware though that this tool only looks at the media aspects, and it not a replacement for tools that manage your movie library. There are other tools for this.
This application was developed with Lazarus Pascal, and depends on the following applications:
FFProbe is one of the very handy and powerful command-line tools by the FFMpeg organization. The included version of FFProbe is an unmodified, pre-compiled version.
Credit to the magnificent developers there for some very cool tools.
SQLite is a software library that implements a self-contained, server-less, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.
macOS X already comes with SQLite onboard, and the Windows version includes an unmodified DLL downloaded from the SQLite homepage.
Linux users will need to manually install SQLite3 on their system (which is typically already the case).
Respect to the developers of the SQLite team for such a great and powerful database engine …
Getting started with MovieScanner2
Getting started with MovieScanner2 is pretty straight forward, depending on the Operating System you’re running.
If you like MovieScanner2 …
If you like MovieScanner, then please consider sending me a cup of coffee … (see on the left here, or in the “About” in MovieScanner2)
And don’t forget to vote for MovieScanner at Alternativeto.net.
- Minor cosmetic bug fix in the about window (mostly for Linux)
- Clean Database option (manual for the entire database, or optional when updating file/directory/all).
Removes files from the database that no longer exist.
- Fixed rounding bug for displaying filesize.
- Added the option to disable warning message when emptying the database.
- For Windows: minor bug fix added for situations where there was a SetFocus error on startup.
- Bug fix for macOS only: fixes an SQLite error for older macOS (Mojave) versions.
- Reduced minimum window size to accommodate smaller screens (or zoomed screens)
- Added “About” to the popup window
- Bug fix for Windows only – illegal floating point operation in very rare cases
- Cosmetic fix for Windows 7 only – trying to prevent text overlap
- Added new Rescan options (this used to be only one file at a time), which should make it easier to rescan you library.
The options are:
– Rescan All files in the database
– Rescan All files in the directory of the selected file 1
– Rescan All files in the parent directory of the directory of the selected file 2
– Rescan All files in the directories of All the files in de database 1
– Rescan All files in the parent directory of the directories of All the files in de database 2
1 – Where a directory can hold multiple videos/movies
2 – Where each video/movie has it’s own directory (typical for media-center like applications)
– Better notifications (Windows support for Toast notifications, etc)
– More efficient update/rescan
– MacOS: dialogs are now modal sheet dialogs (in Big Sur this will show as a modal dialog)
– Cleaned up filter section (better sizing, slightly smaller than before)
– Removed About button (can be found in the menu anyway)
- Bug fixes:
– sometimes and illegal filter would be constructed when a field remained empty – this has been fixed.
v2.0.4 build 15
– detection of embedded pictures (allows filtering + list, reports and export)
– Chapter detection (only if more than 1 chapter was found, allows filtering + list, reports and export)
– File size display options to the main menu (Bytes, KB, MB, GB, precision 0, 1, or 2 digits)
– Database version check on start up. If not the correct version, a new empty database will be created, optionally the original database can be renamed to a .BAK file
– Aspect Ratio hint window now shows Traditional/Widescreen/etc
– Export list of filenames (just the filename, or the full path) to text file
– Display list/report/export audio and subtitle streams in original order OR in sorted order (audio: quality, language – subs: location, language)
– Rescan option for a single file (right click in the list)
– ffProbe output to clipboard for debugging (right click in the list)
– Auto Apply filter – list changes right away when changing the filter. Useful for smaller lists. Not recommended for large lists
- Bug fixes:
– Fixed audio filter (“Up to” failed)
– Display resolution (p-value, HD name) didn’t load properly at startup
– Filtering language didn’t always work correctly (when no subtitles were available)
– Optimized grid rebuilding (would rebuild grid twice when changing database)
– Export data and short report, would width x width instead of width x height
– On rare occasions Windows would report an invalid last modified date, catching that now.
– Aspect Ratio calculation, to better match common aspect ratios
– language filtering naming (less confusing)
– Export text file prepopulates file name <databasename>.txt
– Embedded picture listed in text export as “PIC (width x height)”
– video sort order (best resolution first, or original stream order)
– audio sort order (best quality first, and ordered by language – or by original stream order)
– Export file: Subtitle on export text added subtitle codec
– Export file: Added “Container” format
– Export file: Field order changed: Directory, Name, Extension, File Size, Playback Time, Container, Pics, Video, Audio, Embedded Subtitles, External Subtitles, has Chapters
– Clean up of very long subtitle codec names
– MJPEG (framerate=0) pictures now listed as JPEG
– Unknown profile no longer added as text to audio codec
– DTS audio cleanup, shows DTS-HD, DTS-ES if reported
– PCM audio cleanup – show bits (eg PCM-16b, PCM-24b)
– MPEG2VIDEO video codec cleanup – displays MPEG2 now
v2.0.2 build 12
- Added Aspect Ratio calculation for those video streams where ffProbe reports a missing Aspect Ratio (N/A).
v2.0.1 build 11
- User can now select file size format (Bytes, KB, MB or GB) and precision (0, 1, or 2 decimals).
These settings can be accessed through right clicking on the grid: View Display File size in ….
These settings apply to the main list, export files, and printed reports.
- Database can now be emptied quickly from the popup menu (right click grid).
- Fixed a few typos.
- Added 3D Anaglyph to filter.
macOS (64 bit, Intel)
Download the DMG file, open the DMG and drag MovieScanner2 to your Applications.
The application is signed and notarized, and does support Dark Theme based on your system settings.
The macOS version relies on SQLite3 coming with macOS, and comes with a precompiled ffProbe version.
Download - MovieScanner2-v2.0.11-macOS-64bit.dmg
Windows (32 bit)
Download the Setup, run it, and follow the instructions.
Due to some Windows limitations (Win32 applications vs UWP), Dark Theme is not supported under Windows.
The Windows version comes with a precompiled SQLite DLL and ffProbe version.
I have chosen the 32 bit version, since this keeps MovieScanner2 the most compatible with most Windows version.
Download - MovieScanner2-2.0.11-Windows-32bit-setup.exe
Windows Portable Application
MovieScanner2 can run as a portable application.
To use it as a portable application, just follow the install instructions and select the directory where you’d like to have MovieScanner2 (for example somewhere on your USB stick).
The database and preferences will be saved in the same directory as the application, when this directory is not located in the default Program Files location.
When running the application in portable mode, you will see in the window title “(Portable)”.
Linux (64 bit, Intel)
First off: I’m not a Linux expert, but I do believe that applications should not dictate what operating system you’re running.
So MovieScanner is available for Linux as well and I tested it on a few distros for GTK and QT5.
The Linux version comes with a precompiled version of ffProbe, some icons and a readme.txt with some details on how to create an application shortcut with icon.
As I’m no expert, so I have not created any “standard” package.
Any recommendations, tips or trick, to make a Linux install easier? Please let me know.
MovieScanner2 utilizes the SQLite3 library. Most systems have this installed by default, you can test this by executing this command in Terminal:
SQLite version 3.34.0 2020-12-01 16:14:00
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
If you do not get output similar to this one, then you’ll need to install SQLite3 through the package manager of your Linux distro, or use the good old apt-get method (if available):
sudo apt-get update
sudo apt-get install sqlite3
MovieScanner2 for GTK
The GTK version does support a Dark Theme.
However, I have seen that with some theme managers, the GTK2 widget set is not “getting the message”.
This implies that Dark Theme may or may not work on your setup.
As for the setup: extract the archive and place the files in a directory of your choosing.
Make sure SQlite3 is available and run the executable.
Note: there is a known bug with the GTK version, which show the list black only at startup. Clicking the grid will redraw it correctly.
Download - MovieScanner2-2.0.11-Linux-GTK-64bits.tar.gz
MovieScanner2 for QT5
The QT5 version does support Dark Theme.
As with GTK, the functionality of Dark Theme depends on the Linux distro you’re running.
This implies that Dark Theme may or may not work on your setup, but it is more likely to work than with GTK.
The QT5 version has an additional dependency: it needs QT5Pas (which may be named libqt5pas or libqt5pas1), which handles the QT5 bindings.
Use your system’s package manager or (if available) apt-get:
sudo apt update
sudo apt install libqt5pas
Download - MovieScanner2-2.0.11-Linux-QT5-64bits.tar.gz
MovieScanner2 is a really simple program to use.
When started the first time, a default database will be created and is located in these locations.
The default database file is called “MovieScanner.db” and preferences are stored in “MovieScanner.ini“.
Database and INI locations
|| Database and Preferences location
|macOS (MacOS X)
|Linux (GTK and QT5)
Adding Files or Directories to MovieScanner2
At first start, obviously the list will be empty.
Adding files is easy; simply drag and drop a file or a directory on MovieScanner, and if valid files have been found, they will be scanned and added.
You can also use the “Add File” or “Add Directory” option from the File menu, or the popup menu by right clicking the grid.
When adding a directory, all files in this directory and its subdirectories will be scanned.
MovieScanner2 – Added a few files
Updating files already in the Database
When a file already exists in the database (same size, same last modified date and same amount of subtitles), it will automatically be skipped.
If at least one of these criteria have changed, the file and its external subtitles will be scanned again.
This was implemented with the idea to make updating a video library faster.
In the Database menu you can disable this, so that files will always be scanned.
As you can see in the example screenshot, quite a few details are listed:
|– Full Filename
– File ID
– Last Modified
|Year, resolution, and/or 3D tags optionally stripped
||– Common name
||– Resolution p-value
|Resolution (Width x Height)
– Bitrate (if available)
– Resolution p-value
– Resolution common
– 3D SBS/TAB
– Effective resolution
||– Size in bytes
||– Full name of container type
||– Full name of video codec
– If available: codec specifics
||– Full name of audio codec
– Sample rate
|Audio Channels and Language
||– Channel count
– Audio Layout
– If available: Track title
||– Full name of Subtitle codec
||– Filename if external subtitle
– Purple C = This file has Chapters
– Red Number = Number of embedded pictures
Note : a video container (file) can contain multiple streams. For example multiple audio tracks or subtitles, but even multiple video streams.
MovieScanner2 – Details
Video File Formats
The following file extensions are supported and recognized as a video file:
.3GP, .ASF, .AVI, .DIVX, .DVB, .FLV, .M2TS, .M4V, .MJPEG, .MK3D, .MKV, .MOV, .MP2, .MP4, .MPG, .MTS, .OGG, .OGM, .OGV, .QT, .RAW, .RMVB, .TS, .VOB, .WMA, .WMV, .XVID.
External Subtitle Formats
External subtitles will be scanned as well, and an attempt will be done to recognize them correctly.
Currently the following external subtitle formats are detected:
- ASS (Advanced SSA) Alpha (.ASS)
- Compressed VOBSUB Subtitle (.RAR)
- DVD Subtitle (.IDX and .SUB file)
- MicroDVD Subtitle (.SUB)
- PowerDivX Subtitle (.PSB)
- Structured Subtitle Format (.SSF)
- Sub Station Alpha Subtitle (.SSA)
- Subrip Subtitle (.SRT)
- Synchronized Accessible Media Interchange (.SMI)
- Universal Subtitle Format (.USF)
Naturally, MovieScanner will detect and support all resolutions. However, resolutions are often named bij their p-value or common name, and MovieScanner2 will do an attempt to find a match.
Some standard p-values:
480p, 720p, 1080p, 2000p, 2160p, 4000p, 2540p, 5320p.
Additionally MovieScanner2 tries to map the resolution to common names:
SD, HD, FHD, 2K, 4K, 5K, 8K.
Different colors are used for the different main resolutions, to easier identify which ones are low or high resolution.
Sorting files in MovieScanner2
As you may have noticed, there is a option to sort by Title, Resolution, File Size, Video Codec, and Duration.
By default files are sorted alphabetically by title.
When selecting another sort order, for example Resolution, title sorting will remain a secondary sort.
At least one and at most 2 sort orders can be used at the same time, where a second criteria always will be the title.
This is done to make sure the sort order priority remains clear to the end user.
Filtering files in MovieScanner2
Compared to the previous version of MovieScanner, this version allows for a wider range of options to filter the list.
To avoid confusion: the content of the list will match the set filter options. So when the user sets “titles” to be “like” a certain text, then all titles in the list will match that criteria.
Tip: in the lower right corner of the window you will see a count of the number of files in the database. When a filter is activated, then this count will show how many files of the total number of files are displayed due to the filter.
After setting your filter criteria, you will need to click the “Apply” button for it to become active.
The following filtering options are available:
– Not Like
– Equal to
– Better than
– Less than
– Not equal to
– Bigger than
– Small than
|Size can be in kB, MB, GB
– All but
|Selection based on all found codecs
– Not HDR
– 3D SBS
– 3D TAB
– 3D Anaglyph
– Not 3D
– At least
– Up to
– Not Equal
|Selection based on number of channels
– Audio NOT
– Subs NOT
– Audio OR Subs
– Audio OR Subs NOT
– Audio AND Subs
– Audio AND Subs NOT
|Selection based on all found languages
– Has pictures
– Does not have Pictures
– Has at least 2 Chapters
– Does not have Chapters
– At least
– Up to
|Selection based on hours:minutes
MovieScanner comes with a few additional database features, which not everybody may need.
- Database backup/restore
- Creating additional databases
- Empty Database
- Optimize Database
Most of these functions are pretty obvious, but for some the ability to use multiple databases can be useful for those working with multiple libraries or locations.
For those interested, the data can be directory accessed through the database file by using one or the other SQLite3 database browser or an ODBC connection.
For example Valentina Studio (there is a free version for Windows, Linux and macOS) or DB Browser for SQLite (free, available for Windows, Linux and macOS).
However, this is not for everybody, so a simple TAB separated export is optionals well, thought for export to Excel, which uses the following format (first line is the header);
TAB separated Text Export
||File Extension (.XYZ)
||Time in HH:MM:SS
||Embedded picture count
||Codec, WxH, Aspect Ratio, 3D, HDR
||Language, Codec, Channels
I’ve included two formats for printing a list: a compact list (lanscape mode) and a more extensive list (portrait mode).
Note the actual printout may look a little different due to added features.
Here an partial example of both:
MovieScanner2 – Printing an more compact list
MovieScanner2 – Printing an Extended list