More and more customers are looking for ways to deal with multimedia in their applications since Oracle Multimedia is desupported in Database 19c. We’re going to take a look at the alternatives from an Oracle APEX perspective.
Oracle Multimedia (formerly Oracle interMedia) was introduced in Oracle 8i as a feature to store, manage and manipulate multimedia data managed by Oracle Database. Its most common use-case for the APEX community was to resize images.
The documentation states the following:
“As an alternative for image processing and conversion, Oracle recommends that you store multimedia content in SecureFiles LOBs, and use third party products, such as Piction.”
APEX Media Extension (AME) makes it easy to process or convert media before or after it is stored in the Oracle Database.
All modern browsers can deal with multimedia graphics using the Canvas API. The support for Web Audio API is also growing. Even video manipulation is possible by putting each frame in the canvas element. This way you could do manipulations before the files are uploaded to your database server.
A common use-case for Oracle Multimedia is resizing images. So, if browsers can do it, how hard can it be in pure PL/SQL? Well, browsers decode the images into their uncompressed bitmap format and apply some resizing magic if needed. The amount of work crafting a pure PL/SQL solution is much greater than the work of implementing one of the existing alternatives.
The common approach is to offload multimedia manipulations to a multimedia service which you call from PL/SQL using REST.
You could try this out on the new Oracle Cloud Free Tier where you have your autonomous database making requests to your multimedia service on a compute instance (virtual machine).
The following frameworks are known as the Swiss army knives for multimedia manipulation:
All three offer a command-line utility that you can encapsulate in a Node.js REST API. There are other options if you go for Node.js. A search on NPM will list popular packages.
You could also look at these open-source projects (for images) that offer a self-hosted server:
Although I haven’t seen an example yet, it should be possible to have a Java based alternative using Java Stored Procedures inside the database.
There are multiple third-party cloud-based solutions if you want to outsource the work. They all seem to offer REST APIs which you call from PL/SQL.
Hopefully this serves as a good starting point to look for alternatives. Perhaps the Oracle Database Multilingual Engine (MLE) will expose even more options in the future.