MPEG-4. The Best Codec for Streaming

You have a great choice for streaming, when encoding a video and dropping it into MPEG-4. It is usually characterized by a choice at low bitrates over limited bandwidth and it can show great results under bandwidth and processor limitations.

There are a great number of containers for MPEG-4: well-known and always good like AVI, MOV and the raw transport stream (TS), which you will often have found dumped from your DVB hardware, as well as newer variants like MP4 and MKV. Your choice depends on the compatibility of your playback device, but encoding them shouldn’t be too difficult.

As for free tools – the only reliable one is the open source FFmpeg utility. You can use it to create MPEG-4 compatible files, although there are plenty of expensive commercial options available that may stick closer to the original specification.

When it comes to encoding, the main limiting factor is available bandwidth rather than playback hardware. You may want to stream video across a wireless-N network, for example, and while its specification may boast a transfer speed of 108Mbps, the results are seldom as fast as promised.

This means you need to find a compromise between resolution, bandwidth and quality that hits your bandwidth sweet spot, and unlike the limitless world of high definition, you’ll also need to compress the audio. The codec you choose will depend on the playback hardware, but the most common options is MP3 encoded through Lame.

The best codec for iOs

If you are encoding video for playback on Apple devices, you need to make as many cuts as you can, because even Apple devices are constrained by bandwidth and hardware. It will be good, for example,to scale your original material to 1,024 x 768 before encoding for playback on an iPad.

Fortunately, Apple has strict encoding discipline that makes the process of codec choice easier. For best results on your iOS device, you need to choose an MOV container using the H.264 codec.

29.97fps (NTSC) is the best framerate to choose, which you can enter as 30,000/1,001 if you’re using FFMPEG, and audio should use the AAC codec with a bitrate of around 160kbps.

The Best Codecs for HD Video

Let’s define two notions: a codec and a container.

A codec is a compression algorithm, used to reduce the size of a stream. There are audio codecs and video codecs. MPEG-1, MPEG-2, MPEG-4, Vorbis, DivX, etc. are codecs.

A container format contains one or several streams already encoded by codecs. Very often, there is an audio stream and a video one. AVI, Ogg, MOV, ASF are container formats. The streams contained can be encoded using different codecs.

So, you can choose certain video codec and use it with a container. With MKV files, for example, you can choose between H.264, MPEG-4 and VP3. All three use similar technology, but the first and the second are far better than the third one.

It’s better to use H.264 for high definition. This is often represented by x264, which is the free software implementation of the codec.

Bitrates and resolution are also important. 1080p source material has 2.25 times more pixels than 720p, and higher rates can be harder to decode on your playback hardware. As a rough approximation, we recommend generating a file with a size within the 8-12GB region for a typical two-hour HD movie. To maximise quality, aim for a 12GB+ file with a bitrate of 10+ Mbps.

Audio codec choice depends on AV setup’s capabilities. You may not touch the audio at all and use the ‘pass-through’ option in your encoding software.

This Aviberry Is So Different

Aviberry is not the only one fixed solutions, it is at least three solution forms and each one complies certan requirements.

Cloud Online Video Converter
It accepts video from multiple sources – FTP, HTTP, S3 – and works with almost all media formats. The output video can be tuned to match your specific requirements: size, dimensions, bitrate, etc.
Professional-grade, stable and reliable, it will meet the requirements of any business with a predictable amount of video content to be converted every month.

Hosted Managed Video Server
It is a server that’s maintained by our engineers and dedicated to serving your media encoding needs. Integrating with the Aviberry service is simple: we support all platforms and provide a fully documented, easy to use API (both JSON-RPC and XML-RPC). As for delivery, Aviberry works with HTTP/FTP and Amazon S3 services for both source video retrieval and output video delivery.
The Aviberry Managed Hosted Server is ideal for corporate customers with moderate quantities of video content to process that`s predictable on a monthly basis.

Video Server Software License
It gives you total in-house control over your video encoding needs. It`s a time-saving solution that will convert your server farm into a media encoding studio producing enterprise-quality video.
Aviberry Video Server Software License is the ideal solution for large organizations with an existing server farm or who are restricted to running a conversion service only within their data center.

Standard Aviberry Presets

What is a preset? It is a set of conversion settings used in encoding software.

Each preset contains optimal settings designed for conversion into a certain format or for a certain device. Presets usage makes your conversion tasks faster and more effective.

Using Aviberry you can choose among existing presets or create your own. Aviberry provides a huge variety of them, both format and device presets. To choose the needed one is the simplest task with Aviberry Presets Catalog.
Here you can set a bunch of filters based on your demands.

Try the feature and enjoy its simplicity and amenity.

Encoding in the Cloud

Have you heard about cloud-based video encoding? Do you know what it is? Do you know how it can be used? Here we’d like to cover several aspects concerning encoding in the cloud.

What is it?
Cloud encoding services are internet-based companies to which you upload your source video files and then choose encoding and delivery parameters. They convert and deliver your files to the designated locations.

How does it work?
To get your files encoded, you upload your source video files to the cloud encoding service, typically through some type of XML or API. Some services also enable a more casual interface for less-automated activities, such as creating FTP-based watch folders or even direct file upload similar to YouTube. Once uploaded, you create and designate encoding templates and delivery destinations, just like you would with a desktop program, and then start the encoding job.

Why do you need it?
You need to be profitable. Utilizing a transcode solution that maximizes your audience and delivers
superior quality is an imperative. At the same time, it is now possible with cloud‐based encoding to stay current with the latest and greatest formats, bit rates, codecs, etc., while reducing your management costs. A robust cloud‐based encoding solution can further automate your workflow and free up
valuable resources to focus on feature and performance enhancements.

How to Resize a Video

Sometimes you need to change aspect ratio when converting a videofile. For example, you have a widescreen (16:9 aspect ratio) video that you want to watch on your iPhone (which has a 4:3 aspect ratio screen). If you try to upload the video to your device without resizing, it will either not play at all on your device or it will be displayed incorrectly (probably with elongated images). You can fix the problem using Aviberry.

Step 1. Sign in to your Aviberry account.

Step 2. Set file source and file target.

Step 3. Choose the right preset.

Step 4. Click Advanced and check preset settings. Here you can check width and height, and select the resize method. There are three of them: strech, letter box, and crop.

Stretch – the original video frame is stretched (or condensed) to the specified frame size (width and height).

Letter Box – the original video frame is placed within the output frame. The aspect ratio stays the same, and the free space between the input and the output frames appears as black bars.

Crop – the original video frame is placed within the output frame. The aspect ratio stays the same, and the parts of the input frame that go beyond the output frame size are cut off.

With regard to resize quality, two options are available: Normal (Fast) and Best (Slow).

The other way to resize your video is to use Aviberry API:

{
    "version":"1.1",
    "method":"startConversion",
    "id":1,
    "params":
    {
        "source_url":"ftp:\/\/user:password@host\/path_to_file\/source_video.avi",
        "target_url":"mailto:user@mail.ru",
        "preset":
        {
            "format_id":"16505",
            "preset_id":"920",
            "preset_data":
            "{
                \"Width\":\"320\",
                \"Height\":\"240\",
                \"ResizeMethod\":\"1\",
                \"ResizeQuality\":\"1\",
            }"
        }
    }
}

10 Reasons To Use Aviberry

Some opensource projects are really great. They have a plenty of real use cases, large community behind them, and fairly good support. But at the same time they have a lack of certain features and advantages.

FFmpeg is one of those great opensource projects. And here we got 10 reasons for using Aviberry instead of FFmpeg, which you may want to take into account before choosing an encoding solution.

  1. FFmpeg developers have their own bug-fixing priorities and not always ready to solve your problems. As for Aviberry, you don’t have to wait. Aviberry developers work for you.
  2. Aviberry is not just an encoder, but a complete conversion workflow with pre-processing and post-processing features like files uploading. If you want to adjust something, Aviberry team is always ready to do it.
  3. Aviberry allows to involve IntelMedia and CUDA, that makes conversion up to 8 times faster. But even without these technologies Aviberry encodes H.264 25% faster than FFmpeg.
  4. Aviberry allows you to convert 2D video into 3D, FFmpeg, in its turn, — does not.
  5. FFmpeg has no any built-in functionality for joining and splitting video files. Aviberry has the Join and the Split functions.
  6. Intuitive web-based GUI vs. the good old command-line. What do you like most?
  7. To maximize the use of your server computational power, you are to implement parallel conversion management solution by yourself.
  8. FFmpeg does not support many of codecs. WMV, for example.
  9. Using Aviberry you can apply various effects like deinterlacing, deblocking, adjustment of brightness, contrast, hue, saturation, automatic adjustment of contrast and white balance. There are no such abilities in FFmpeg.
  10. API Aviberry makes multiple conversion possible. Convert one or several files into several presets.

Why Video?

We are talking all the time about adding videos to your web site, but the main question – what for? – is not answered yet.

Here are some “pros” of adding videos to your website:

  • Videos are the simplest way to make your website more attractive to visitors. They possess that “wow”-factor, grab our attention, and keep us engaged.
  • Videos help to communicate relevant information to the visitors of your website more effectively than texts. The spoken word is stronger than the written one. So it goes.
  • Videos are really informative. Far more informative, than this very post. They educate, entertain and excite.
  • Adding videos to a website can help improve search engine rankings. Videos can allow any business to compete on a more equal playing field with its competitors, regardless of how new or small its website is.
  • Videos make the so-called “instantaneous connection”, that is always appreciated by the viewers.
  • Videos are just a kind of magic.

How to Add Video to Your Website

Today the most advanced way to add a video to your website is to use HTML5. HTML5 has a fancy new <video> tag. It is supported by all modern web browsers, but has limited format choice.

Codec support differs from browser to browser and the best practice is to include video at least in two formats: WebM and MP4 with H.264 codec in a <video> tag.

<video width="320" height="240" controls>
    <source src='video.webm' type='video/webm; codecs="vp8.0, vorbis"'>
    <source src='video.mp4' type='video/mp4; codecs="avc1.4D401E, mp4a.40.2"'>
    <p>Sorry, this content is not supported by your web browser</p>
</video>

Web browser will try to play the first file and if it fails, it will switch to the second one. So, you’ll cover all modern browsers and provide a fallback message for old ones.

The thing is that your video should be converted into two different formats. Aviberry is a good solution in this case. The converting process is simple and you may try it right now:

  1. Go to http://www.aviberry.com/signup.html and register a trial account.
  2. When the registration completed, login to Aviberry.
  3. Choose My tasks tab and upload your video.
  4. Specify the target destination for your converted files (the most easy way is to get them on your e-mail) and add two presets: WebM and H.264 (choosing iPod or iPhone preset would do the trick: H.264 is used for them).
  5. Then click Convert and wait for an e-mail with download links.

Now you can just insert those links in your HTML code and add a video to your website.