EasyManua.ls Logo

ODROID N2 Series - User Manual

ODROID N2 Series
2 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
Loading...
2023/05/01 12:27 1/2 How to change the camera encoder
ODROID Wiki - https://wiki.odroid.com/
'ODROID-N2' on this page refers to the ODROID-N2 series
(N2, N2+, N2L).
The H.265(HEVC) codec is supported only 4Gb RAM model.
If you set HEVC your 2Gb RAM N2 model, It has a plobme for playback.
How to change the camera encoder
The ODROID-C4/N2 support the H.265(HEVC) and H.264(AVC) codec Encoder.
And you can select the codec for video capturing by Camera on the Android.
Also you can customize your own settings to capture Camera's video & audio codecs.
MAIN
Please following the commands on the ODROID-C4/N2 board.
target
$ cd /odm
$ vi default.prop
And change the configuration xml file name of media.settings.xml.
Default Setting
...
media.settings.xml=vendor/etc/media_profiles_V1_0_h264.xml
...
Codec Selection table
Video codec / Audio codec path
H.264(AVC)/ACC /vendor/etc/media_profiles_V1_0_h264.xml
H.265(HEVC)/ACC /vendor/etc/media_profiles_V1_0_hevc.xml
H.264(AVC)/ARMWB /system/etc/media_profiles_V1_0.xml
If you have ODROID-N2/N2+ with 4Gbyte RAM, Edit /odm/env.ini
target
$ cd /odm
Question and Answer IconNeed help?

Do you have a question about the ODROID N2 Series and is the answer not in the manual?

Summary

How to change the camera encoder

ODROID-N2 Series Identification

Clarifies that 'ODROID-N2' designation includes N2, N2+, and N2L models.

HEVC Codec RAM Requirement

Warns that H.265(HEVC) codec requires 4GB RAM for proper playback, otherwise playback issues occur.

Main Configuration Commands

Guides users to change encoder settings by executing commands like `cd /odm` and editing `default.prop`.

Default Codec Settings

Shows the default configuration line for media.settings.xml, specifying the H.264 profile.

Codec Selection Table

Lists video/audio codecs (H.264, H.265) and their corresponding configuration file paths.

Environment Configuration for 4 GB RAM

Instructs users with 4GB RAM ODROID-N2/N2+ models to edit the `/odm/env.ini` file.

Customizing Codec Selection

Explains how to customize codec selection by editing `media_profiles.xml`, noting hardware vs. software encoding.

Supported Codecs and Containers

Lists supported video codecs (H.263, H.264, H.265) and audio codecs, plus default containers (3gp, mp4).

Overview

This document outlines the process for changing the camera encoder settings on ODROID-C4/N2 series devices, which include the N2, N2+, and N2L models. The primary function described is the ability to select and customize video and audio codecs for camera capturing on Android. This allows users to tailor their device's recording capabilities to specific needs, whether prioritizing file size, quality, or compatibility.

Function Description

The ODROID-C4/N2 devices support both H.265 (HEVC) and H.264 (AVC) video codecs for encoding. Users can choose their preferred codec for video capturing directly through the camera application on Android. Beyond simple selection, the system allows for extensive customization of these settings, enabling users to define their own configurations for both video and audio codecs when capturing content. This flexibility is crucial for applications requiring specific encoding parameters, such as surveillance systems, custom multimedia projects, or professional video recording setups where standard settings might not suffice.

The core mechanism for this customization involves modifying a configuration file named media.settings.xml. This file dictates which codec profiles the system uses. By editing this XML file, users can specify different encoding parameters, bitrates, resolutions, and other relevant settings that influence the final output of their captured video and audio. The document provides a default path for this file, vendor/etc/media_profiles_V1_0_h264.xml, which serves as a starting point for customization.

For devices with 4GB of RAM, specifically the ODROID-N2/N2+, there's an additional configuration file, env.ini, that might need editing. This suggests that certain high-performance codecs or settings might be exclusive to models with more memory, potentially to handle the increased processing demands. The env.ini file, located in /odm, likely contains system-level environment variables or hardware-specific configurations that influence how codecs are utilized.

The document also clarifies that while some codecs are handled by a hardware encoder, many are processed by a software encoder. This distinction is important for understanding performance implications; hardware encoding typically offers better efficiency and lower power consumption, while software encoding provides greater flexibility but might consume more CPU resources. Users are encouraged to check and make their own settings, implying a degree of experimentation might be necessary to achieve optimal results for their specific use case.

The supported video codecs include H.263, H.264 (AVC), and H.265 (HEVC). The document indicates whether these codecs are supported by hardware (H/W Encoder) or software. For audio, the supported codecs include AMR-WB, AAC, HE-AAC, AAC-ELD, and AMR-NB. This comprehensive list ensures that users have a wide range of options for both video and audio encoding, catering to various quality and compatibility requirements.

Usage Features

To change the camera encoder settings, users need to access the device's file system and modify specific configuration files. The process begins by navigating to the /odm directory using the command $ cd /odm. From there, the default.prop file needs to be edited using a text editor like vi (e.g., $ vi default.prop). Within default.prop, users will find a line that specifies the media.settings.xml file. This line needs to be changed to point to the desired media profile XML file.

The document provides a "Codec Selection table" that lists different video and audio codec combinations along with their corresponding XML file paths. For instance, if a user wants to use H.264 (AVC) with ACC audio, they would point to /vendor/etc/media_profiles_V1_0_h264.xml. For H.265 (HEVC) with ACC, the path would be /vendor/etc/media_profiles_V1_0_hevc.xml. There's also an option for H.264 (AVC) with ARMWB, located at /system/etc/media_profiles_V1_0.xml. This table simplifies the process of selecting the correct configuration file for a desired codec combination.

For ODROID-N2/N2+ models equipped with 4GB of RAM, an additional step involves editing the /odm/env.ini file. This is accessed similarly by navigating to /odm and using vi to open env.ini (e.g., $ vi env.ini). While the specific modifications for env.ini are not detailed in this excerpt, it's implied that this file might contain settings critical for leveraging the full capabilities of the 4GB RAM models, especially concerning HEVC encoding.

The document highlights a crucial point regarding the H.265 (HEVC) codec: it is only supported on 4GB RAM models. Attempting to use HEVC on a 2GB RAM N2 model will result in playback issues. This serves as an important warning and a usage constraint that users must be aware of to avoid compatibility problems.

Users are also advised that they can customize the codec selection configuration by directly editing the media_profiles.xml file. This allows for fine-grained control over encoding parameters beyond simply choosing a pre-defined profile. The /system/etc/media_profiles_V1_0.xml file is provided as a reference, suggesting that users can examine its structure and content to understand how to create or modify their own custom profiles.

The default supported container formats for recorded media are 3gp and mp4. This information is useful for users planning to integrate their recorded content with other systems or applications, ensuring compatibility with common media players and editing software.

Maintenance Features

The document implicitly suggests several maintenance practices through its instructions and warnings.

Firstly, understanding the hardware limitations is a key maintenance aspect. The explicit warning about H.265 (HEVC) being exclusive to 4GB RAM models prevents users from misconfiguring their devices, which could lead to non-functional recordings or system instability. This emphasizes the importance of verifying device specifications before attempting advanced configurations.

Secondly, the ability to customize media_profiles.xml serves as a powerful maintenance tool. If a user encounters issues with specific recording scenarios (e.g., poor quality, large file sizes, or compatibility problems), they can modify their custom profiles to troubleshoot and optimize performance. This allows for iterative refinement of encoding settings to achieve the best balance between quality, file size, and processing demands for their particular application.

Thirdly, the provision of a reference media_profiles_V1_0.xml file is a valuable resource for maintenance. If a custom configuration causes problems, users can refer back to the default or reference files to understand the correct syntax and structure, helping them to debug their own modifications. This acts as a safety net, allowing users to revert to known working configurations if necessary.

Regularly checking and updating the system, as implied by the "Last update" timestamp on the document, is also a general maintenance practice. While not explicitly stated as a maintenance step for the encoder, keeping the device's software up-to-date can ensure that any bug fixes or performance improvements related to codecs are applied, potentially enhancing the stability and efficiency of the camera encoder.

Finally, the instructions for editing system files (default.prop, env.ini, media_profiles.xml) require a basic understanding of Linux command-line operations and file editing. This implies that users should be comfortable with these tools or be willing to learn them. Proper backup of original configuration files before making changes is an unstated but crucial maintenance practice to prevent irreversible errors and facilitate easy restoration if a custom configuration fails. The ODROID Wiki, mentioned as the source, is a primary resource for ongoing support and information, serving as a maintenance hub for users seeking further guidance or troubleshooting.

ODROID N2 Series Specifications

General IconGeneral
ProcessorAmlogic S922X
RAM2GB or 4GB
StorageMicroSD card slot
USB Ports4 x USB 3.0, 1 x USB 2.0
Video OutputHDMI 2.1 (4K@60Hz)
Audio OutputHDMI, 3.5mm audio jack
NetworkGigabit Ethernet
WirelessOptional via USB dongle or expansion module
GPIO40-pin header
Power Supply12V/2A DC
Dimensions90mm x 90mm
Operating SystemUbuntu, Android
GPUMali-G52 MP6 (6 cores)

Related product manuals