H.264 MP4 encoding walk-through

Let's get you started with using Flip and go through the full workflow to encode an MP4 file from scratch. We want to create following output from the source file:

  • 1280x720p H.264 MP4 video
  • 128bit AAC audio
  • map 5.1 to stereo output downmix
  • have 10 evenly spaced thumbnails

Create Factory

Factory is a container for elements essential to the transcoding process:

  • your encoding profiles - they define the output files the Flip service is producing
  • your encoding jobs - actual processing of the files you submit to Flip Service
  • your storage settings - where the processed outputs should be delivered

You can think of Factory as a way to group your encoding jobs and profiles based on some criteria, e.g. production vs. testing environment or the client to which the content is delivered. Before you can start processing any media you need to create a Factory.

Each Factory has an output store associated with it. It can also use watch-folders to automatically trigger jobs, without API integration in place. We recommend setting up a storage before creating a factory. Follow our Stores Management guides to find out how to do that.

First step lets you set a factory name and define output path format which is a set of predefined keywords that makes it easier to put output files in specific folders based on certain parameters.

The following keywords can be combined to create outputs path format:

  • :id - ID of the encoding.
  • :video_id - ID of the video.
  • :original - original filename of the uploaded video
  • :date - date the video was uploaded (YYYY-MM-DD).
  • :profile - profile name used by the encoding.
  • :type - video type, original or encoding
  • :resolution - resolution of the encoding

📘

Please make sure all keywords are preceded by “:” (colon) sign.

33603360

Add Factory - Output path format and storage selection.

From the list, select store where the output files should be delivered. Click Next to move on to selecting output profiles for the Factory.

840840

Add Factory - Output profiles

We want to create an H.264 MP4 file so check the related checkbox and click Next to move on to the last step - summary. We will take care of modifying the profile in a moment.

Output profiles summary simply shows the list of profiles added for the Factory, in this case is just single H.264 preset.

840840

Add Factory - Summary

If everything looks good click Finish to complete the process.

Customize encoding profile

Encoding profiles define the output file parameters, primarily related to video and audio settings. New profiles can be added to a Factory at any time by going to Encoding Profiles list in the Factory and clicking Add Profile

To edit your existing profile(s) simply click it on the list.

16811681

Encoding profiles list.

Go to your factory and select your H.264 profile and select Video tab. Set the resolution field to HD720p. Image size will be automatically set to 1280x720. You may want to increase the bitrate to match the higher image size.

780780

Profile - Video settings

Next, let's take a look at the audio settings. Here, we want to make sure that Program select is set to 2.0 Stereo to produce stereo AAC audio and channel mapping section contains correct audio mapping sequence - 0.0:0.0,0.2,0.4; 0.1:0.1,0.2,0.5. This will tell us how to map your source 5.1 audio streams and channels to stereo.

10961096

Profile - Audio settings

Finally in the Thumbnails tab. Select Create __ evenly space thumbnails and put in 10 as a number of thumbnails. Generated thumbnails will be uploaded to the output storage using naming convention based on output path settings with thumbnail number appended to its name.

27142714

Profile - Thumbnails config

Click Save to update the profile.

Submit encoding job

To start encoding job go to Encoding Jobs view in your Factory and click Submit Job.

33603360

Encoding jobs list

Then simply drag&drop, pick a file from your local machine or paste a signed URL to the source file that you wish to process.

33603360

File upload

Clicking Submit Job will start the process of uploading the file followed by the transcoding and upload of the output to the destination storage. You can monitor the job progress in web console. Encoding Jobs list will display essential information about each job and input file.

You can get more details about each job by clicking on the list to display input and output files metadata.

12801280

Source and output files details

Review output file

Once the encoding job is finished you can review the output MP4 directly in browser. For any other output types that are not playable on the web you need to download the the file first and use an application like Telestream's Switch.


Did this page help you?