was successfully added to your cart.

By | Uncategorized | No Comments

iSize Precoder on Amazon EC2

By | Uncategorized | No Comments

Set up iSIZE Precoder for Linux on Amazon EC2

This guide will help you setup iSIZE precoder for Linux on Amazon EC2 marketplace instances.

Create an AWS account

You must have an AWS account before you can deploy iSIZE Precoding Engine on Amazon EC2.

Choose an AWS Marketplace subscription

Our AWS Marketplace subscription options offer easy methods for configuring and launching your EC2 instance for optimized performance.

Choose iSIZE Precoder Engine (Linux PAID) from the marketplace. This subscription enables you to purchase a iSIZE Precoder Engine AMI with an embedded license for the software. The embedded license enables unlimited use of the precoder. This option provides the convenience of a combined monthly invoice from Amazon for running instance time, storage, bandwidth consumption, and precoder engine usage

Launch the instance

The EC2 Console web interface lets you configure the iSIZE Precoder Engine instance from a web browser before you launch it. Many users find that it’s easier to use the console instead of the EC2 command-line tools.

Get the instance public domain name and ID

You must use the public domain name (or host name) and instance ID of your running instance to access the instance remotely for configuration using iSIZE Precoder Engine, to connect to the instance using Secure Shell (SSH), and to access the dashboard.

Sign in to iSIZE Precoder Engine Dashboard and test the instance

Enter the following URL in a web browser:


Replace [public-domain-name] with the Public DNS value for the instance. (See Get the instance public domain name and ID.)
Sign in with the user name ‘isize’ and a password. The password is the Instance ID. (See Get the instance public domain name and ID.)

This is your dashboard and you can precode your videos using different precoding options from here.

As a first test you can use input “input/aspen_100frames.mp4” and output “output/aspen_100frames_precoded.mp4” and leave the other options as it is. Click “Process” button to start the precoding process. You should see progress and link to the precoded file when the job is finished.

Running from terminal

You can connect to your instance via SSH and run iSIZE precoder in a terminal. You should connect to your marketplace instance [public-domain-name] or IP address using username ‘ec2-user’ and the key you used when starting the instance. The name of the iSIZE precoder binary is isize_direct_encoder. If you type ‘isize_direct_encoder’ in terminal and press enter it will show you the parameters it accepts. As an example, if you want to precode output to raw YUV422 10-bit progressive output in Y4M container and use the balanced (int8_enh0m) model then the command would be:

isize_direct_encoder -input example_1080p.mp4 -codec wrapped_avframe -pix_fmt_dst yuv422p10le -nn_model int8_enh0m -output example_1080p_enh0m.y4m

Output would be in the same folder where you run the command from but you are free to use absolute path as well. Say, you want to precode output to 720p raw YUV420 8-bit progressive output in Y4M container and use the MaxVMAF (int8_enh3m) model with the output being in another folder:

isize_direct_encoder -input example_1080p.mp4 -codec wrapped_avframe -resize 1280×720 -pix_fmt_dst yuv420p -nn_model int8_enh3m -output /home/ec2-user/precoded_files/example_720p_enh3m.y4m

To precode output to lossless Y4M and use balanced (int8_enh0m) precoding:
isize_direct_encoder -input example_1080p.mp4 -codec wrapped_avframe -nn_model int8_enh0m -output /home/ec2-user/precoded_files/example_720p_enh0m.y4m

Using Custom Encoders with iSIZE Precoder

By default iSIZE precoder uses LGPL FFmpeg libraries that allow decoding of most popular video formats and encoding results to y4m/webm.
If you wish to add native support for other encoders (that interface with libavcodec) into our binary you can build & install your custom version of FFmpeg.

For example we provide a script to build GPL FFmpeg with libx264 & libx265 support – /usr/local/isize_precoder-0.1/3rdparty/FFmpeg_gpl/build_gpl.sh.
Note that by running the script you agree to FFmpeg, libx264 & libx265 licenses (provided in FFmpeg, x264 and x265 folders respectively).

To precode output to lossless MP4 in AVC and use balanced (int8_enh0m) precoding:
isize_direct_encoder -input example_1080p.mp4 -codec libx264 -nn_model int8_enh0m -crf 0 -output example_1080p_x264_enh0m.mp4

To precode output to lossless MP4 in HEVC and use balanced (int8_enh0m) precoding:
isize_direct_encoder -input example_1080p.mp4 -codec libx265 -nn_model int8_enh0m  -x265-params qp=0 -output example_1080p_x265_enh0m.mp4

To precode output to lossless WEBM in VP9 and use MaxVMAF(int8_enh3m) precoding:
isize_direct_encoder -input example_1080p.mp4 -codec libvpx-vp9 -nn_model int8_enh3m -lossless 1 -quality good -speed 2 -auto-alt-ref 1 -lag-in-frames 25 -tile-columns 6 -frame-parallel 1 -tile-rows 2 -row-mt 1 -output example_1080p_x265_enh3m.webm


Terminate the instance

When you terminate an instance, you’ll lose all changes or files that you have on the server. If you have anything that you don’t want to lose, be sure to save it to Amazon Simple Storage Service (Amazon S3) before terminating the instance or you’ll lose data. After you’ve saved your data, do the following to terminate the instance:

  • In the Navigation pane, under Instances, click Instances.
  • Select the running instance that you want to terminate.
  • Click the Actions button, click Instance State, and then click Terminate. The Instance State column for the selected instance will show shutting-down and then terminated.

Cancel your subscription

Be sure to terminate all running instances for the subscription you want to cancel, then do the following:

  • Sign in to your AWS account management page.
  • Under Your software, click Manage your software subscriptions.
  • On the Your Software webpage, find the software subscription that you want to cancel and click Cancel subscription.