N900 Video Encoding

(New page: = N900 Video Encoding = The N900 is a huge step up from the previous Internet Tablets when it comes to playing video files. It is now capable of playing full 480p (854x480) files encoded ...)
(N900 Video Encoding)
Line 6: Line 6:
[http://www.handbrake.fr Handbrake] is a wonderful tool for doing transcoding that has specific support for DVDs as well as normal files. The latest version (0.94) has significantly improved DVD and H.264 support, making it the perfect tool for producing N900 ready files.
[http://www.handbrake.fr Handbrake] is a wonderful tool for doing transcoding that has specific support for DVDs as well as normal files. The latest version (0.94) has significantly improved DVD and H.264 support, making it the perfect tool for producing N900 ready files.
 +
 +
=== An N900 compatible profile ===
 +
 +
While Handbrake's 'Universal' and 'iPhone' profiles will product compatible files, it will do so at a lower quality level than the N900 supports, so its worth using a more optimised profile. The one I use is available [http://intr.overt.org/misc/Baseline@3.0.plist here].
 +
 +
== Preferred Formats ==
 +
 +
There are three aspects to deciding on the format of your media files:
 +
 +
* The Video Codec
 +
* The Audio Codec
 +
* The Container format
 +
 +
=== Video Codec ===
 +
 +
The two codecs that most people will consider are H.263/XVid and H.264. Handbrake can produce files in both formats but today it heavily emphasizes H.264. At a given file size, H.264 will result in better looking video, at a cost in increased encoding time. This cost is worth it, especially in the Handbrake context, where there is only a single basic Xvid profile and no tweaking allowed.
 +
 +
=== The Audio Codec ===
 +
 +
On the audio side, the two main supported choices are MP3 and AAC. AAC is better than MP3 at the same bitrate so you should always chose AAC. MP3 support is only useful for compatibility.
 +
 +
=== The Container format ===
 +
 +
This one's easy. Handbrake can only produce mkv and mp4 files and the N900 only supports mp4 out of the box. mkv files have additional features, but the N900's media player doesn't support any of them, so don't feel deprived.
 +
 +
=== Extra codec support ===
 +
 +
The [http://maemo.org/downloads/product/Maemo5/decoders-support/ Decoders Support] package adds support for some extra codecs and containers. Most particularly it adds support for mkv containers and ac3 audio tracks. As mentioned above, mkv container support isn't compelling. ac3 audio is interesting because most DVD audio tracks are encoded in ac3. This would allow you to copy the audio track without transcoding it. However, this is not necessarily ideal. Firstly, ac3 decoding will be done by the CPU, while AAC decoding is offloaded to a DSP which reduces power consumption. Secondly, you're not going to be able to take advantage of surround sound - meaning that storing a full 5.1 audio track wastes space.
 +
 +
You can also add Ogg Vorbis support to the N900 but that also suffers from lack of DSP acceleration.
 +
 +
So, I wouldn't recommend using any of these options even though they are available.
 +
 +
== Hardware limits ==
 +
 +
The N900 essentially supports H.264's Baseline@3.0 profile. This particularly means that features like CABAC and B-Frames are not supported. These limits are reflected in the preset I provided. From a resolution point of view, it definitely supports up to 854x480 and doesn't support 1280x720. The actual limit is somewhere in the middle, but I haven't nailed it down. In reality, it's pointless to even use 854x480 because that's bigger than the screen. I'll discuss ideal screen resolutions below.
 +
 +
On the audio side, there are no noticeable limitations. You will want to use AAC with a bitrate no more than 160kbit and 48KHz, which is what is used everywhere.
 +
 +
== Software limits ==
 +
 +
The N900's default media player adds additional limitations - some of which will hopefull be fixed in due course.
 +
 +
=== Anamorphic resolution support ===
 +
 +
DVDs are stored at a resolution of 720x480 but displayed at either 640x480 (for 4:3 video) or 854x480 (for 16:9 video).

Revision as of 20:11, 30 December 2009

Contents

N900 Video Encoding

The N900 is a huge step up from the previous Internet Tablets when it comes to playing video files. It is now capable of playing full 480p (854x480) files encoded with a variety of codecs, particuarly H.263 (MPEG4 Part 2/Xvid) and H.264 (MPEG4 Part 10). However, it still has some limitations which you need to be aware of to successfully transcode files to play back on the N900.

Handbrake

Handbrake is a wonderful tool for doing transcoding that has specific support for DVDs as well as normal files. The latest version (0.94) has significantly improved DVD and H.264 support, making it the perfect tool for producing N900 ready files.

An N900 compatible profile

While Handbrake's 'Universal' and 'iPhone' profiles will product compatible files, it will do so at a lower quality level than the N900 supports, so its worth using a more optimised profile. The one I use is available here.

Preferred Formats

There are three aspects to deciding on the format of your media files:

  • The Video Codec
  • The Audio Codec
  • The Container format

Video Codec

The two codecs that most people will consider are H.263/XVid and H.264. Handbrake can produce files in both formats but today it heavily emphasizes H.264. At a given file size, H.264 will result in better looking video, at a cost in increased encoding time. This cost is worth it, especially in the Handbrake context, where there is only a single basic Xvid profile and no tweaking allowed.

The Audio Codec

On the audio side, the two main supported choices are MP3 and AAC. AAC is better than MP3 at the same bitrate so you should always chose AAC. MP3 support is only useful for compatibility.

The Container format

This one's easy. Handbrake can only produce mkv and mp4 files and the N900 only supports mp4 out of the box. mkv files have additional features, but the N900's media player doesn't support any of them, so don't feel deprived.

Extra codec support

The Decoders Support package adds support for some extra codecs and containers. Most particularly it adds support for mkv containers and ac3 audio tracks. As mentioned above, mkv container support isn't compelling. ac3 audio is interesting because most DVD audio tracks are encoded in ac3. This would allow you to copy the audio track without transcoding it. However, this is not necessarily ideal. Firstly, ac3 decoding will be done by the CPU, while AAC decoding is offloaded to a DSP which reduces power consumption. Secondly, you're not going to be able to take advantage of surround sound - meaning that storing a full 5.1 audio track wastes space.

You can also add Ogg Vorbis support to the N900 but that also suffers from lack of DSP acceleration.

So, I wouldn't recommend using any of these options even though they are available.

Hardware limits

The N900 essentially supports H.264's Baseline@3.0 profile. This particularly means that features like CABAC and B-Frames are not supported. These limits are reflected in the preset I provided. From a resolution point of view, it definitely supports up to 854x480 and doesn't support 1280x720. The actual limit is somewhere in the middle, but I haven't nailed it down. In reality, it's pointless to even use 854x480 because that's bigger than the screen. I'll discuss ideal screen resolutions below.

On the audio side, there are no noticeable limitations. You will want to use AAC with a bitrate no more than 160kbit and 48KHz, which is what is used everywhere.

Software limits

The N900's default media player adds additional limitations - some of which will hopefull be fixed in due course.

Anamorphic resolution support

DVDs are stored at a resolution of 720x480 but displayed at either 640x480 (for 4:3 video) or 854x480 (for 16:9 video).