We know that our customers are always looking to do more, better, faster, so we put together this list of best practices to help maximize the quality of your transcoding output and in turn make your workflow that much more efficient.
There are a myriad of settings that you can tweak in our platform. This list will help you quickly hone in on some of the more critical settings that affect output quality.
1) Consider Two-Pass Encoding. Two-pass encoding will improve output quality by roughly 10%, but it will also double the processing time.
To enable double pass encoding, simply use this API call.
2) Select the Right Bitrate. When choosing a bitrate for your video, a good starting point is to set a variable bitrate equal to the pixel-width of the video. For example, the bitrate 640×480 SD would be 640 kbps, and 1280×720 HD would be set at 1280 kbps. Video that contains extensive action scenes may require a slightly higher bitrate.
3) Consider Turbo Mode. For HD encoding jobs over 15 minutes in duration we recommend turbo mode or twin turbo mode. This will prove 2x-4x speed gains over normal mode. Enable turbo mode with this simple call. Using turbo mode will increase your costs $1-$2/GB, however baseline jobs will get turbo processing for free if we have idle processors available.
To enable turbo mode simply use this call:
4) Eliminate Blocking Artifacts. Blocking artifacts are often undesirable video characteristics in which objects appear to be made up of small squares, rather than proper detail and smooth edges. To reduce blocking artifacts and improve H.264 encoding efficiency, it’s best that the horizontal and vertical framesize dimensions be multiples of 16. These are the most common framesizes:
– SD (4:3 aspect ratio): 320×240, 432×320, 480×360, 544×400, 640×480, 768×576
– HD (16:9 aspect ratio): 432×240, 576×320, 640×360, 720×400, 848×480, 1024×576, 1280×720, 1920×1080
5) Pay Attention to your Profile Settings. There’s a big punch packed in just tweaking your profile settings. It can make the difference between your video playing or not playing. If your frame dimensions are LD chose baseline. If your frame dimensions are SD choose main frame dimensions SD (720) chose high.
LD mp4 0x240 h264 baseline profile @ 350 Kbps with aac audio 22050 Hz @ 40 Kbps
SD mp4 0x360 h264 main profile @ 600 Kbps with aac audio 44100 @ 64 Kbps
HD mp4 0x576 h264 high profile @ 1000 Kbps with aac audio 44100 @ 80 Kbps
6) Use Progressive Scan Mode for Source Video. Smartphones capture progressive automatically, and most professional cameras offer a progressive capture mode. Interlaced video consumes more bits to preserve fields.
7) Garbage-In Garbage-Out. Providing a high quality source is critical, your output is only as good as your input. The garbage-in garbage-out maxim applies here.
8) Optimize your profiles. MP4 H.264/AVC is the delivery codec used for modern video applications. It is decoded with hardware in just about every video device made today, from phones to HD televisions. Below are some of the optimal target to ensure the highest quality.
LD 240p 3G Mobile @ H.264 baseline profile 350 kbps (3 MB/minute)
LD 360p 4G Mobile @ H.264 main profile 700 kbps (6 MB/minute)
SD 480p WiFi @ H.264 main profile 1200 kbps (10 MB/minute)
HD 720p @ H.264 high profile 2500 kbps (20 MB/minute)
HD 1080p @ H.264 high profile 5000 kbps (35 MB/minute)
H.264 FRAMESIZES – square pixel (PAR 1:1) examples for best performance
4:3 DAR (1.33) standard: 320×240, 384×288, 480×360, 576×432, 640×480, 768×576
16:9 DAR (1.77) widescreen: 432×240, 512×288, 640×360, 768×432, 854×480, 1024×576, 1280×720, 1920×1080
H.264 PROFILES – based on vertical resolution “p" value
Baseline – for low definition (LD) 240p to 288p, compatible with older 3G mobiles
Main – for standard definition (SD) 360p to 480p, good for 4G smartphones and tablets
High – for high definition (HD) 720p to 1080p, best quality for hardware with a good decoder