Video encoding

(Nokia Internet Tablet Video Converter)
Line 4: Line 4:
The native resolution of previous tablets is 800x480. Unfortunately, due to hardware limitations, tablets prior to the N900 cannot play videos at that native resolution. Because of this, most videos will need re-encoding for use on the tablets.
The native resolution of previous tablets is 800x480. Unfortunately, due to hardware limitations, tablets prior to the N900 cannot play videos at that native resolution. Because of this, most videos will need re-encoding for use on the tablets.
-
= Quick Guide =  
+
= Encoding Software =
-
== Handbrake Downloadable Presets ==
+
These converters provide fairly simply interfaces to easily convert video to a NIT-friendly format for those who don't want to invest a lot of time or need a lot of customization options.
-
While Handbrake's 'Universal' and 'iPhone' profile will produce compatible files, it will do so at a lower quality level than the N900 supports, so its worth using settings more closely tailored to the device's capabilities.
+
-
- Handbrake Preset 1: [http://intr.overt.org/misc/Baseline@3.0.plist N900 Optimized HandBrake Preset]. (for Handbrake 0.9.4)
+
-
== Step-by-step DVD to MP4 using Handbrake ==  
+
= Converting DVD to N900 using Handbrake =
-
The series of steps below take around 30 seconds to setup in Handbrake and will get you an encoded MP4 with H264 video and AAC audio playable at full speed in the built-in N900 Media Player. They assume you have just loaded Handbrake and are in the Normal preset which it loads by default. Encoding time varies depending on your computer; a 2.66GHz Core2Duo will encode at around 40-50 frames per second but this varies depending on the video content.
+
{{main|Ripping DVDs with Handbrake}}
-
You should follow it exactly as is here - no additions or changes until you know what you are doing; to begin with, only use the '''Necessary steps'''. Handbrake will select AAC and the first audio track and Dolby Prologic II by default if left on automatic. The resulting MP4 file will be the full widescreen movie as per the DVD (for example, 720x304) i.e., it is not a resolution custom made for the N900; however, if you do want to adjust settings such as streaming, resolution, cropping, etc., please refer to the [http://wiki.maemo.org/Video_encoding#Video_Encoding detailed section on Video Encoding] in this document.
+
[http://www.handbrake.fr Handbrake] is a free and open source multiplatform, multithreaded DVD to MPEG-4 converter, available for Linux, Mac OS X, and Windows. HandBrake is intended primarily to convert VOB files from DVDs.  
-
You should have an already existing Source available; a typical example is a VIDEO_TS folder based on a DVD. There are no cropping or resolution changes necessary.
+
While Handbrake's 'Universal' and 'iPhone' profile will produce compatible files, it will do so at a lower quality level than the N900 supports, so its worth using settings more closely tailored to the device's capabilities.
 +
- Handbrake Preset 1: [http://intr.overt.org/misc/Baseline@3.0.plist N900 Optimized HandBrake Preset]. (for Handbrake 0.9.4)
-
- '''Necessary''': (0) ''Source'': Select your source folder
 
-
- '''Necessary''': (1) ''Container'': MP4
 
-
- '''Necessary''': (2) ''Web-Optimized'' selected
 
-
- '''Necessary''': (3) ''Picture'':
 
-
                        (i) Firstly, select None for Anamorphic
 
-
                      (ii) Then, select Custom for Anamorphic (DON'T go editing the resolution!)
 
-
- Optional:  (4) Video Filters:
 
-
                        (i) Decomb set to Default
 
-
- Optional:  (5) Video: Unchanged (default is H264/x264, Constant Quality 60.78%)
 
-
- Optional:  (6) Audio: Unchanged (as you like it)
 
-
- Optional:  (7) Subtitles: Unchanged (as you like it)
 
-
- Optional:  (8) Chapters: Unchanged
 
-
- '''Necessary''': (9) ''Advanced'':
 
-
                        (i) Reference Frames: 4
 
-
                      (ii) B-Frames: 0 (disables B-Frames)
 
-
                      (iii) CABAC Entropy Coding: unticked (switches this off)
 
-
 
-
= Detailed Guide =
 
-
The rest of this Wiki will explain in detail the various aspects to encoding on the N900 and older devices including converters, codecs and more.
 
-
 
-
 
-
 
-
== Encoding Software ==
 
-
These converters provide fairly simply interfaces to easily convert video to a NIT-friendly format for those who don't want to invest a lot of time or need a lot of customization options.
 
-
 
-
=== Handbrake ===
 
-
 
-
[http://www.handbrake.fr Handbrake] is a free and open source multiplatform, multithreaded DVD to MPEG-4 converter, available for Linux, Mac OS X, and Windows. HandBrake is intended primarily to convert VOB files from DVDs.
 
-
=== Nokia Internet Tablet Video Converter ===
+
== Nokia Internet Tablet Video Converter ==
{{main|ITVC architecture}}
{{main|ITVC architecture}}
Line 57: Line 28:
Development of the official Nokia Internet Tablet Video Converter has ceased as of 25 March 2008.
Development of the official Nokia Internet Tablet Video Converter has ceased as of 25 March 2008.
-
=== tablet-encode ===
+
== tablet-encode ==
[http://mediautils.garage.maemo.org/tablet-encode.html tablet-encode] is a [http://www.mplayerhq.hu/ mencoder] wrapper that offers a number of presets designed for the tablets. Additional presets can be set by the user for greater quality, as the default set is generally optimized for streaming.
[http://mediautils.garage.maemo.org/tablet-encode.html tablet-encode] is a [http://www.mplayerhq.hu/ mencoder] wrapper that offers a number of presets designed for the tablets. Additional presets can be set by the user for greater quality, as the default set is generally optimized for streaming.
-
=== Media Converter ===
+
== Media Converter ==
[http://garage.maemo.org/projects/mediaconverter/ MediaConverter] is a Java graphical application with several presets for transcoding video for the N800 or N770. Because it is a Java application it will run on many platforms, including Linux, Windows and Mac. You can select a batch of files, a preset encoding method and let it go. You can also have it produce 30 second samples for trying out different settings. Like tablet-encode it uses mencoder. On Windows, it comes with a setup.exe for easy install, and there are distributions for Linux and the Mac on the [http://garage.maemo.org/frs/?group_id=26 download page.]
[http://garage.maemo.org/projects/mediaconverter/ MediaConverter] is a Java graphical application with several presets for transcoding video for the N800 or N770. Because it is a Java application it will run on many platforms, including Linux, Windows and Mac. You can select a batch of files, a preset encoding method and let it go. You can also have it produce 30 second samples for trying out different settings. Like tablet-encode it uses mencoder. On Windows, it comes with a setup.exe for easy install, and there are distributions for Linux and the Mac on the [http://garage.maemo.org/frs/?group_id=26 download page.]
-
=== viDrop ===
+
== viDrop ==
[http://mympxplayer.org/free-open-source-converter-for-rockchip-mpeg4-xvid-players-vt7071.html/ viDrop] is a free open-source GUI frontend for mencoder originally designed for Rockchip MP4 players but is able to encode to a variety of custom resolutions and bitrates. Supports batch processing, profiles and embedding subtitles, among other features.
[http://mympxplayer.org/free-open-source-converter-for-rockchip-mpeg4-xvid-players-vt7071.html/ viDrop] is a free open-source GUI frontend for mencoder originally designed for Rockchip MP4 players but is able to encode to a variety of custom resolutions and bitrates. Supports batch processing, profiles and embedding subtitles, among other features.
-
 
+
= General Notes on Codec Usage =
-
== Video Encoding ==
+
-
 
+
-
=== General Notes on Codec Usage ===
+
Two of the most popular codecs are H.263/XVid and H.264. As the Xvid and AVI container formats have become deprecated, the latest version of Handbrake (0.9.4) has dropped support for these formats. DivX have also switched to H.264 since version 7. At a given file size, H.264 will result in better looking video, at a cost in increased encoding time. If you wish to encode in Xvid, you can still download the older Handbrake 0.9.3 or other Xvid encoding-software.
Two of the most popular codecs are H.263/XVid and H.264. As the Xvid and AVI container formats have become deprecated, the latest version of Handbrake (0.9.4) has dropped support for these formats. DivX have also switched to H.264 since version 7. At a given file size, H.264 will result in better looking video, at a cost in increased encoding time. If you wish to encode in Xvid, you can still download the older Handbrake 0.9.3 or other Xvid encoding-software.
-
=== Supported Codecs ===
+
== Supported Codecs ==
-
A full list of supported codecs can be found in the [http://wiki.maemo.org/N900_Media_Support N900 Media Support] Wiki.
+
A full list of supported codecs can be found in the [[N900 Media Support]] page.
-
==== H.264 ====
+
=== H.264 ===
H.264 video (MPEG4 Part 10) is supported natively by the N900. The format has a variety of profiles; the N900 supports the Baseline 3.0 profile, which is what Handbrake will encode at by default.
H.264 video (MPEG4 Part 10) is supported natively by the N900. The format has a variety of profiles; the N900 supports the Baseline 3.0 profile, which is what Handbrake will encode at by default.
More information on H.264 can be found on [http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC Wikipedia]
More information on H.264 can be found on [http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC Wikipedia]
-
=== Anamorphic Video ===
+
== Anamorphic Video ==
The native Media Player in the N900 does not support Anamorphic Video. DVDs are stored at a resolution of 720x480 (NTSC) or 720x576 (PAL) but displayed at either 640x480 (for 4:3 video) or 854x480 (for 16:9 video). This means that video frames are stored 'anamorphically' - meaning that they are displayed at a different size from what they are stored at. Particularly, this means that the video frames have non-square pixels. Unfortunately, the media player doesn't understand this and will display the video at 720x480, resulting in squashed or stretched video. So, you must resize the video in Handbrake to ensure pixels are square, or you can disable Anamorphic encoding entirely.
The native Media Player in the N900 does not support Anamorphic Video. DVDs are stored at a resolution of 720x480 (NTSC) or 720x576 (PAL) but displayed at either 640x480 (for 4:3 video) or 854x480 (for 16:9 video). This means that video frames are stored 'anamorphically' - meaning that they are displayed at a different size from what they are stored at. Particularly, this means that the video frames have non-square pixels. Unfortunately, the media player doesn't understand this and will display the video at 720x480, resulting in squashed or stretched video. So, you must resize the video in Handbrake to ensure pixels are square, or you can disable Anamorphic encoding entirely.
-
=== Streaming Video ===
+
== Streaming Video ==
The media player supports streaming video from http urls, but you must be aware of two things. First, in Handbrake you must ensure the 'Web Optimized' checkbox is ticked for mp4 files. This is already in my preset. Without it, you cannot stream the files. Secondly, the buffering algorithm is not designed to handle high bitrate files that would play normally from local storage. This means that you'll see a lot of pausing and buffering messages. It seems the highest bitrate it will stream happily is about 1MBit/s including audio. The preset is optimized for local storage - you can tweak it to produce smaller files if you need to stream.
The media player supports streaming video from http urls, but you must be aware of two things. First, in Handbrake you must ensure the 'Web Optimized' checkbox is ticked for mp4 files. This is already in my preset. Without it, you cannot stream the files. Secondly, the buffering algorithm is not designed to handle high bitrate files that would play normally from local storage. This means that you'll see a lot of pausing and buffering messages. It seems the highest bitrate it will stream happily is about 1MBit/s including audio. The preset is optimized for local storage - you can tweak it to produce smaller files if you need to stream.
-
=== Resolution ===
+
== Resolution ==
As mentioned above, you'll have to resize all DVDs you try to transcode, and maybe other files too. So it's good to know what target resolutions to use.
As mentioned above, you'll have to resize all DVDs you try to transcode, and maybe other files too. So it's good to know what target resolutions to use.
-
==== 4:3 DVDs (Aspect Ratio 1.33) ====
+
=== 4:3 DVDs (Aspect Ratio 1.33) ===
4:3 DVD video is easy to handle. Just resize to 640x480.
4:3 DVD video is easy to handle. Just resize to 640x480.
-
==== 16:9 DVDs (Aspect Ratio 1.78) ====
+
=== 16:9 DVDs (Aspect Ratio 1.78) ===
For 16:9 DVDs, it's harder. 854x480 is a valid choice, but the N900 will have to scale it down to display, so a better choice is 800x448 - which exactly fits on the N900 display. This means you are throwing away vertical detail and bloating the file horizontally but it's the least worst choice without anamorphic support.  If you want smaller file sizes, you can choose to encode your video at other 16:9 compatible resolutions such as 720x416, 704x400 or 640x368 and the N900 will scale the display back up to 800x448, although there may be some loss of image quality.  Please note, these resolutions are not perfect 1.78 aspect ratio, but are the nearest to whilst maintaining widths & heights that are divisible by 16, which improves encoding efficiency.
For 16:9 DVDs, it's harder. 854x480 is a valid choice, but the N900 will have to scale it down to display, so a better choice is 800x448 - which exactly fits on the N900 display. This means you are throwing away vertical detail and bloating the file horizontally but it's the least worst choice without anamorphic support.  If you want smaller file sizes, you can choose to encode your video at other 16:9 compatible resolutions such as 720x416, 704x400 or 640x368 and the N900 will scale the display back up to 800x448, although there may be some loss of image quality.  Please note, these resolutions are not perfect 1.78 aspect ratio, but are the nearest to whilst maintaining widths & heights that are divisible by 16, which improves encoding efficiency.
-
==== Letter box DVDs ====
+
=== Letter box DVDs ===
Occasionally, you'll see a DVD with widescreen content inside a 4:3 frame - so the black borders are in the actual video. To make the video display nicely, you'll need to use handbrake's crop feature to cut out the black bars. This is a pretty involved process because you're cropping the original anamorphic frame but need to store it with square pixels. So you might crop to 720x360 (16:9 inside 4:3) and then store it as 720x408 to get square pixels. For even wider movie content, you're vertical resolution will be even lower (272 and 306 respectively for 2.35:1 content)
Occasionally, you'll see a DVD with widescreen content inside a 4:3 frame - so the black borders are in the actual video. To make the video display nicely, you'll need to use handbrake's crop feature to cut out the black bars. This is a pretty involved process because you're cropping the original anamorphic frame but need to store it with square pixels. So you might crop to 720x360 (16:9 inside 4:3) and then store it as 720x408 to get square pixels. For even wider movie content, you're vertical resolution will be even lower (272 and 306 respectively for 2.35:1 content)
-
==== SD sources ====
+
=== SD sources ===
SD sources will generally have square pixels and 480p or less. You can keep the source resolution unchanged or if you have a true 854x480 source, shrink it to 800x448 as with DVDs.
SD sources will generally have square pixels and 480p or less. You can keep the source resolution unchanged or if you have a true 854x480 source, shrink it to 800x448 as with DVDs.
-
==== HD sources ====
+
=== HD sources ===
If you're scaling down an HD source, you'll want to target 800x448 as well. If the file is a movie that is wider than 16:9, the vertical resolution will be lower than 448 - just set the width to 800 and maintain the aspect ratio. Essentially all HD content has square pixels.
If you're scaling down an HD source, you'll want to target 800x448 as well. If the file is a movie that is wider than 16:9, the vertical resolution will be lower than 448 - just set the width to 800 and maintain the aspect ratio. Essentially all HD content has square pixels.
-
=== N900 Notes ===
+
== N900 Notes ==
The N900 supports a native resolution of 854x480 and doesn't support 1280x720. The actual limit is unknown, but using a resolution larger than the native resolution is not recommended as the resolution would be larger than the screen and therefore inefficient.
The N900 supports a native resolution of 854x480 and doesn't support 1280x720. The actual limit is unknown, but using a resolution larger than the native resolution is not recommended as the resolution would be larger than the screen and therefore inefficient.
-
=== N700, N800/810 Notes ===
+
== N700, N800/810 Notes ==
To encode video that will scale nicely to the screen aspect ratio, you can use either 240x144 (slightly larger than QCIF), 352x208 (slightly smaller than CIF) or 400x240 (N800/N810 only). Of course if your source video is in a 4:3 aspect ratio, then you should stick with CIF (352x288) or QCIF (176x144). The video player will letterbox or pillar box as needed.
To encode video that will scale nicely to the screen aspect ratio, you can use either 240x144 (slightly larger than QCIF), 352x208 (slightly smaller than CIF) or 400x240 (N800/N810 only). Of course if your source video is in a 4:3 aspect ratio, then you should stick with CIF (352x288) or QCIF (176x144). The video player will letterbox or pillar box as needed.
Line 130: Line 98:
* DivXs need a FOURCC of "DIVX" rather than "DX50".
* DivXs need a FOURCC of "DIVX" rather than "DX50".
-
== Audio Encoding ==
+
= Audio Encoding =
-
=== Standard Audio Codecs ===
+
== Standard Audio Codecs ==
-
==== AAC ====
+
=== AAC ===
AAC is supported natively by the Media Player in the N900. AAC is better than MP3 at the same bitrate so you should generally choose AAC unless you require backwards-compatability to older devices.
AAC is supported natively by the Media Player in the N900. AAC is better than MP3 at the same bitrate so you should generally choose AAC unless you require backwards-compatability to older devices.
The N900 will playback without difficulty a 48kHz, 160kbit/sec Dolby Prologic II stream in AAC format (encoded from an AC3 5.1 source).
The N900 will playback without difficulty a 48kHz, 160kbit/sec Dolby Prologic II stream in AAC format (encoded from an AC3 5.1 source).
-
==== MP3 ====
+
=== MP3 ===
MP3 is supported natively by the Media Player in the N900.
MP3 is supported natively by the Media Player in the N900.
-
=== Extra Audio Codecs ===
+
== Extra Audio Codecs ==
It is possible to add extra audio codec support to the N900 by installing the  [http://maemo.org/downloads/product/Maemo5/decoders-support/ Decoders Support] package from Maemo Extras.
It is possible to add extra audio codec support to the N900 by installing the  [http://maemo.org/downloads/product/Maemo5/decoders-support/ Decoders Support] package from Maemo Extras.
-
==== AC3 ====
+
=== AC3 ===
The Decoders Support package adds AC3 audio support. AC3 audio is interesting because most DVD audio tracks are encoded in this format. 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.
The Decoders Support package adds AC3 audio support. AC3 audio is interesting because most DVD audio tracks are encoded in this format. 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.
-
==== Ogg Vorbis ====
+
=== Ogg Vorbis ===
You can also add Ogg Vorbis support to the N900.
You can also add Ogg Vorbis support to the N900.
-
=== Older devices ===
+
== Older devices ==
As for the audio subsystem, MP3 at 128Kbps works well with older tablets like the N700 and N800/810. You can reduce the bitrate if you want to limit the file size and if you plan to play the file with the internal speaker only.
As for the audio subsystem, MP3 at 128Kbps works well with older tablets like the N700 and N800/810. You can reduce the bitrate if you want to limit the file size and if you plan to play the file with the internal speaker only.
Line 156: Line 124:
-
== Container Format ==
+
= Container Formats =
-
 
+
-
=== Introduction ===
+
The "container" is what holds the video and audio together and instructs the playing software what to do with them. Different types of audio and video formats exist in one container package, which you will see as for example ".avi" for the Audio-Video Interleave container.
The "container" is what holds the video and audio together and instructs the playing software what to do with them. Different types of audio and video formats exist in one container package, which you will see as for example ".avi" for the Audio-Video Interleave container.
-
=== Supported Container Formats ===
+
== Supported Container Formats ==
-
==== MP4 ====
+
=== MP4 ===
Supported out of the box in the N900 and is the preference for video container formats. MP4 files can be played natively using the built-in Media Player. MP4 also supports chapters which are encoded by default in Handbrake.  
Supported out of the box in the N900 and is the preference for video container formats. MP4 files can be played natively using the built-in Media Player. MP4 also supports chapters which are encoded by default in Handbrake.  
While Media Player does not support seeking through an MP4 video file by chapter, it has no problem playing MP4s that contain them. It is better therefore to leave them in, as Chapter support may be included in future updates to Media Player.
While Media Player does not support seeking through an MP4 video file by chapter, it has no problem playing MP4s that contain them. It is better therefore to leave them in, as Chapter support may be included in future updates to Media Player.
-
==== AVI ====
+
=== AVI ===
AVI is supported out of the box on the N900; however, MP4 is superior in many ways and should be your preference unless you require backwards compatability. AVI is deprecated as a container and support has been dropped by Handbrake since version 0.9.4. DivX also switched to using the MKV container since 2008. AVI files can be played natively using the built-in Media Player.
AVI is supported out of the box on the N900; however, MP4 is superior in many ways and should be your preference unless you require backwards compatability. AVI is deprecated as a container and support has been dropped by Handbrake since version 0.9.4. DivX also switched to using the MKV container since 2008. AVI files can be played natively using the built-in Media Player.
-
==== MKV ====
+
=== MKV ===
MKV is a superior format to both AVI and MP4, but is not fully supported as yet by the native Media Player in the N900. It supports multiple audio tracks, multiple subtitle tracks along with chapter support and more features.  
MKV is a superior format to both AVI and MP4, but is not fully supported as yet by the native Media Player in the N900. It supports multiple audio tracks, multiple subtitle tracks along with chapter support and more features.  
Support can be added by [http://maemo.org/downloads/product/Maemo5/decoders-support/ downloading the Decoders Support package] from Maemo Extras. However, MKV files will only play with mplayer which is still in development for Maemo 5/ N900. As such, it is not recommended at this time and there are significant performance costs when not using the built-in Media Player.
Support can be added by [http://maemo.org/downloads/product/Maemo5/decoders-support/ downloading the Decoders Support package] from Maemo Extras. However, MKV files will only play with mplayer which is still in development for Maemo 5/ N900. As such, it is not recommended at this time and there are significant performance costs when not using the built-in Media Player.
-
== Subtitles ==
+
= Subtitles =
Subtitle support is one area where options are severely limited - the tablet's media player doesn't handle them. So, the only choice available is 'burned' subtitles - where Handbrake renders them into the video stream.
Subtitle support is one area where options are severely limited - the tablet's media player doesn't handle them. So, the only choice available is 'burned' subtitles - where Handbrake renders them into the video stream.
Line 184: Line 150:
-
== Media Players ==
+
= Media Players =
-
=== Media Player ===
+
== Media Player ==
Media Player is the native N900 media player and has the primary advantage of being integrated into the UI and have DSP hardware acceleration. If you choose one of the alternatives, you lose this advantage and have to deal with increased battery usage and other problems. It is preferential for your video file to be playable on the native Media Player.
Media Player is the native N900 media player and has the primary advantage of being integrated into the UI and have DSP hardware acceleration. If you choose one of the alternatives, you lose this advantage and have to deal with increased battery usage and other problems. It is preferential for your video file to be playable on the native Media Player.
-
=== mplayer ===
+
== mplayer ==
mplayer is currently in development for the N900. It supports MKV playback and subtitles, but must be used from either the command-line or using a front-end like SiB or KMPlayer. However, despite it's support for MKV, there is a significant increase in CPU usage due to the lack of hardware acceleration compared to the native player at this time.
mplayer is currently in development for the N900. It supports MKV playback and subtitles, but must be used from either the command-line or using a front-end like SiB or KMPlayer. However, despite it's support for MKV, there is a significant increase in CPU usage due to the lack of hardware acceleration compared to the native player at this time.
-
== Manual conversion instructions ==
+
= Manual conversion instructions =
{{main|Manual video encoding}}
{{main|Manual video encoding}}
These tools offer manual conversion for those who need lots of customization options or just like getting down to the nitty-gritty.
These tools offer manual conversion for those who need lots of customization options or just like getting down to the nitty-gritty.
-
== See also ==
+
= Firther reading =
-
*[[Video Encoding Basic Guide|A basic video encoding guide]]
+
* [[Ripping DVDs wiki Handbrake|A basic step by step guide to using Handbrake]]
-
*[[N900 Media Support|List of codecs supported on the N900]]
+
* [[N900 Media Support|List of codecs supported on the N900]]
 +
* [[Manual video encoding]]
 +
*
[[Category:Media]]
[[Category:Media]]
[[Category:Wiki page of the day]]
[[Category:Wiki page of the day]]
[[Category:Power users]]
[[Category:Power users]]

Revision as of 17:31, 6 February 2010

Contents

Introduction

The N900 is a huge step up from the previous Internet Tablets when it comes to playing video files. It is 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.

The native resolution of previous tablets is 800x480. Unfortunately, due to hardware limitations, tablets prior to the N900 cannot play videos at that native resolution. Because of this, most videos will need re-encoding for use on the tablets.

Encoding Software

These converters provide fairly simply interfaces to easily convert video to a NIT-friendly format for those who don't want to invest a lot of time or need a lot of customization options.

Converting DVD to N900 using Handbrake

Main article: Ripping DVDs with Handbrake


Handbrake is a free and open source multiplatform, multithreaded DVD to MPEG-4 converter, available for Linux, Mac OS X, and Windows. HandBrake is intended primarily to convert VOB files from DVDs.

While Handbrake's 'Universal' and 'iPhone' profile will produce compatible files, it will do so at a lower quality level than the N900 supports, so its worth using settings more closely tailored to the device's capabilities.

- Handbrake Preset 1: N900 Optimized HandBrake Preset. (for Handbrake 0.9.4)


Nokia Internet Tablet Video Converter

Main article: ITVC architecture


Internet Tablet Video Converter is the official Nokia video conversion application for N800 and N810 devices, available for Mac OS X and Windows.

The application is designed to be a simple drag-n-drop bulk converter of videos, with minimal configuration option to be simple and fast to use. In addition, it provides a developer API for hooking into the conversion process so that 3rd party developers can modify what gets converted and how.

The built in video player on the n8x0 devices should be used if videos were converted with this tool, versus mplayer.

Development of the official Nokia Internet Tablet Video Converter has ceased as of 25 March 2008.

tablet-encode

tablet-encode is a mencoder wrapper that offers a number of presets designed for the tablets. Additional presets can be set by the user for greater quality, as the default set is generally optimized for streaming.

Media Converter

MediaConverter is a Java graphical application with several presets for transcoding video for the N800 or N770. Because it is a Java application it will run on many platforms, including Linux, Windows and Mac. You can select a batch of files, a preset encoding method and let it go. You can also have it produce 30 second samples for trying out different settings. Like tablet-encode it uses mencoder. On Windows, it comes with a setup.exe for easy install, and there are distributions for Linux and the Mac on the download page.

viDrop

viDrop is a free open-source GUI frontend for mencoder originally designed for Rockchip MP4 players but is able to encode to a variety of custom resolutions and bitrates. Supports batch processing, profiles and embedding subtitles, among other features.


General Notes on Codec Usage

Two of the most popular codecs are H.263/XVid and H.264. As the Xvid and AVI container formats have become deprecated, the latest version of Handbrake (0.9.4) has dropped support for these formats. DivX have also switched to H.264 since version 7. At a given file size, H.264 will result in better looking video, at a cost in increased encoding time. If you wish to encode in Xvid, you can still download the older Handbrake 0.9.3 or other Xvid encoding-software.

Supported Codecs

A full list of supported codecs can be found in the N900 Media Support page.

H.264

H.264 video (MPEG4 Part 10) is supported natively by the N900. The format has a variety of profiles; the N900 supports the Baseline 3.0 profile, which is what Handbrake will encode at by default.

More information on H.264 can be found on Wikipedia

Anamorphic Video

The native Media Player in the N900 does not support Anamorphic Video. DVDs are stored at a resolution of 720x480 (NTSC) or 720x576 (PAL) but displayed at either 640x480 (for 4:3 video) or 854x480 (for 16:9 video). This means that video frames are stored 'anamorphically' - meaning that they are displayed at a different size from what they are stored at. Particularly, this means that the video frames have non-square pixels. Unfortunately, the media player doesn't understand this and will display the video at 720x480, resulting in squashed or stretched video. So, you must resize the video in Handbrake to ensure pixels are square, or you can disable Anamorphic encoding entirely.

Streaming Video

The media player supports streaming video from http urls, but you must be aware of two things. First, in Handbrake you must ensure the 'Web Optimized' checkbox is ticked for mp4 files. This is already in my preset. Without it, you cannot stream the files. Secondly, the buffering algorithm is not designed to handle high bitrate files that would play normally from local storage. This means that you'll see a lot of pausing and buffering messages. It seems the highest bitrate it will stream happily is about 1MBit/s including audio. The preset is optimized for local storage - you can tweak it to produce smaller files if you need to stream.

Resolution

As mentioned above, you'll have to resize all DVDs you try to transcode, and maybe other files too. So it's good to know what target resolutions to use.

4:3 DVDs (Aspect Ratio 1.33)

4:3 DVD video is easy to handle. Just resize to 640x480.

16:9 DVDs (Aspect Ratio 1.78)

For 16:9 DVDs, it's harder. 854x480 is a valid choice, but the N900 will have to scale it down to display, so a better choice is 800x448 - which exactly fits on the N900 display. This means you are throwing away vertical detail and bloating the file horizontally but it's the least worst choice without anamorphic support. If you want smaller file sizes, you can choose to encode your video at other 16:9 compatible resolutions such as 720x416, 704x400 or 640x368 and the N900 will scale the display back up to 800x448, although there may be some loss of image quality. Please note, these resolutions are not perfect 1.78 aspect ratio, but are the nearest to whilst maintaining widths & heights that are divisible by 16, which improves encoding efficiency.

Letter box DVDs

Occasionally, you'll see a DVD with widescreen content inside a 4:3 frame - so the black borders are in the actual video. To make the video display nicely, you'll need to use handbrake's crop feature to cut out the black bars. This is a pretty involved process because you're cropping the original anamorphic frame but need to store it with square pixels. So you might crop to 720x360 (16:9 inside 4:3) and then store it as 720x408 to get square pixels. For even wider movie content, you're vertical resolution will be even lower (272 and 306 respectively for 2.35:1 content)

SD sources

SD sources will generally have square pixels and 480p or less. You can keep the source resolution unchanged or if you have a true 854x480 source, shrink it to 800x448 as with DVDs.

HD sources

If you're scaling down an HD source, you'll want to target 800x448 as well. If the file is a movie that is wider than 16:9, the vertical resolution will be lower than 448 - just set the width to 800 and maintain the aspect ratio. Essentially all HD content has square pixels.

N900 Notes

The N900 supports a native resolution of 854x480 and doesn't support 1280x720. The actual limit is unknown, but using a resolution larger than the native resolution is not recommended as the resolution would be larger than the screen and therefore inefficient.

N700, N800/810 Notes

To encode video that will scale nicely to the screen aspect ratio, you can use either 240x144 (slightly larger than QCIF), 352x208 (slightly smaller than CIF) or 400x240 (N800/N810 only). Of course if your source video is in a 4:3 aspect ratio, then you should stick with CIF (352x288) or QCIF (176x144). The video player will letterbox or pillar box as needed.

The demo video that comes with the N800 is encoded at 600kbps, with a frame rate of 30fps and a resolution of 400x240. To calculate the pixels per second, the equation is 400x240x30 = 2.88 Megapixels/second.

Some recent tests have found that in some cases, higher resolutions can produce good results on the N800/N810. Specifically, 576x352 @ 24/25 fps or 480x288 @ 30 fps have been reported to work well if the bitrate is kept around 600 kbps.

For the Nokia 770, 1.52 Megapixels/second is achievable, but again, this depends on the complexity of the action.

The standard media player has some limitations:

  • Horizontal and vertical dimensions must be multiples of 16.
  • Video data rate and resolution is limited to about 800Kbps and 400x240 (352x288 on the 770).
  • Audio must be at 44.1kHz or lower (performance drops dramatically with 48KHz audio).
  • It does not support external subtitles, so they must be hardcoded.
  • DivXs need a FOURCC of "DIVX" rather than "DX50".

Audio Encoding

Standard Audio Codecs

AAC

AAC is supported natively by the Media Player in the N900. AAC is better than MP3 at the same bitrate so you should generally choose AAC unless you require backwards-compatability to older devices.

The N900 will playback without difficulty a 48kHz, 160kbit/sec Dolby Prologic II stream in AAC format (encoded from an AC3 5.1 source).

MP3

MP3 is supported natively by the Media Player in the N900.

Extra Audio Codecs

It is possible to add extra audio codec support to the N900 by installing the Decoders Support package from Maemo Extras.

AC3

The Decoders Support package adds AC3 audio support. AC3 audio is interesting because most DVD audio tracks are encoded in this format. 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.

Ogg Vorbis

You can also add Ogg Vorbis support to the N900.

Older devices

As for the audio subsystem, MP3 at 128Kbps works well with older tablets like the N700 and N800/810. You can reduce the bitrate if you want to limit the file size and if you plan to play the file with the internal speaker only.


Container Formats

The "container" is what holds the video and audio together and instructs the playing software what to do with them. Different types of audio and video formats exist in one container package, which you will see as for example ".avi" for the Audio-Video Interleave container.

Supported Container Formats

MP4

Supported out of the box in the N900 and is the preference for video container formats. MP4 files can be played natively using the built-in Media Player. MP4 also supports chapters which are encoded by default in Handbrake.

While Media Player does not support seeking through an MP4 video file by chapter, it has no problem playing MP4s that contain them. It is better therefore to leave them in, as Chapter support may be included in future updates to Media Player.

AVI

AVI is supported out of the box on the N900; however, MP4 is superior in many ways and should be your preference unless you require backwards compatability. AVI is deprecated as a container and support has been dropped by Handbrake since version 0.9.4. DivX also switched to using the MKV container since 2008. AVI files can be played natively using the built-in Media Player.

MKV

MKV is a superior format to both AVI and MP4, but is not fully supported as yet by the native Media Player in the N900. It supports multiple audio tracks, multiple subtitle tracks along with chapter support and more features.

Support can be added by downloading the Decoders Support package from Maemo Extras. However, MKV files will only play with mplayer which is still in development for Maemo 5/ N900. As such, it is not recommended at this time and there are significant performance costs when not using the built-in Media Player.

Subtitles

Subtitle support is one area where options are severely limited - the tablet's media player doesn't handle them. So, the only choice available is 'burned' subtitles - where Handbrake renders them into the video stream.


Media Players

Media Player

Media Player is the native N900 media player and has the primary advantage of being integrated into the UI and have DSP hardware acceleration. If you choose one of the alternatives, you lose this advantage and have to deal with increased battery usage and other problems. It is preferential for your video file to be playable on the native Media Player.

mplayer

mplayer is currently in development for the N900. It supports MKV playback and subtitles, but must be used from either the command-line or using a front-end like SiB or KMPlayer. However, despite it's support for MKV, there is a significant increase in CPU usage due to the lack of hardware acceleration compared to the native player at this time.

Manual conversion instructions

Main article: Manual video encoding

These tools offer manual conversion for those who need lots of customization options or just like getting down to the nitty-gritty.

Firther reading