NVIDIA Tegra Tegra Linux Driver Package
Developers' Guide

April 13, 2012
R15 Beta Release


Getting Started
This section contains information to help you get started using this pre-release of NVIDIA® Tegra® Linux Driver Package. It covers the following topics:
Requirements
The following lists the requirements to use this Tegra Linux Driver Package release:
A kernel image (zImage). Tegra Linux Driver Package does contain a kernel image (zImage), and you can also download and rebuild from source. After you have a zImage, you can create the vmlinux.uimg that is used for U-Boot booting. For more information, see Synchronizing the Kernel Sources and Tool Chain in this guide.
Boot loader. This can be Fastboot or U-Boot. Flashing on Tegra 3 series (code-named Cardhu) and Tegra 2 series (code-named Ventana) developer boards requires a boot loader. This boot loader can be either the Fastboot utility or U-Boot, both of which are included in this release.
A rootfs device which can be an SD card, a USB hard disk, or USB stick formatted to EXT3, or it is also possible to use the target device’s internal memory, or your Linux Host PC hard-drive through NFS.
(Cardhu) A USB Micro-B plug to USB Std A female cable to plug into the board’s recovery port.
(Ventana) A USB Micro-B plug to Std A female cable to plug into the board’s recovery port [J10].
Boot Options
It is currently possible to boot Tegra Linux Driver Package on the Tegra 2 series Ventana developer board, as well as Tegra 3 series Cardhu with a root file system from:
USB stick or USB hard disk
Setting Up Your Environment
The following subsections contain information to help you get started using this pre-release of Tegra Linux Driver Package. They cover the following topics:
Extracting Tegra Linux Driver Package
Note: The procedures in this document assume you extract the release package in ~/.
To extract Tegra Linux Driver Package
$ sudo tar -vxjf <platform>_Tegra-Linux-R15.beta.1.0_<release_type>.tbz2
where <release_type> is armel (for softfp ABI).
Setting Up Your Board
Tegra Linux Driver Package requires a Tegra 2 series developer board (Ventana), or a Tegra 3 series (Cardhu) as well as a host PC running Linux. Please consult your board documentation for steps on how to setup and configure your board.
Prerequisites
You need a device specified above in the “Boot Options” topic (formatted to EXT3). (It can also be a memory card with a USB adapter.) You also need a mini-B USB male-to-USB Std A female cable to plug into the board’s recovery port [J3].
$ export TARGET_BOARD=ventana
$ export TARGET_BOARD=cardhu
Setting Up Your File System
This section describes the steps for setting up your file system. You must set up the root file system and copy the file system to your boot device.
About the Root File System
To replicate the sample file system, the ttyS0.conf and nv.conf files have been added. Both are accessible from the provided sample file system and are placed in the user-generated file system, should you decide to replicate the rootfs.
The provided sample root file system was created with Rootstock 0.1.99.4 using this command:
$ sudo rootstock --fqdn tegra-ubuntu --login ubuntu --password ubuntu --imagesize 1G -d natty --seed ubuntu-minimal,xserver-xorg-core,xinit,xterm,alsa-utils,wireless-tools,wpasupplicant,x11-xserver-utils,openssh-client,openssh-server
This creates a file system with the hostname tegra-ubuntu, the username ubuntu, and the password ubuntu.
Note: The provided sample target file system does not come with pre-generated ssh host keys. These host keys can be re-generated with the following command:
$ ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
View the ssh-keygen man page for other -t options.
We have also made the following changes:
Added: /etc/init/{ttyS0.conf, nv*, wpa_supplicant.conf}
Modified: /etc/{init/ssh.conf, X11/Xwrapper.conf, resolve.conf}
Deleted: /etc/ssh/ssh_host_*
To replicate these changes in your own rootstock file-system, copy or make similar modifications from those files to your own rootstock file system.
The following packages are installed by default:
Setting Up the Root File System
The next step in booting the target board is to configure the root file system. Follow the procedures in this section to set up the rootfs and to copy the file system to the rootfs device.
Note: The instructions below use the sample file system that is provided by NVIDIA as the base. If you would like to use your own, set the LDK_ROOTFS_DIR environment variable to point to where your rootfs is located and skip Steps 1 and 2.
To set up the rootfs
1.
Download the following file to your home directory:
Tegra-Linux-Sample-Root-Filesystem_<release_type>.tar.gz
where <release_type> is armel (for softfp ABI).
This file contains the NVIDIA-provided sample root file system.
2.
Extract the compressed file as follows:
Navigate to the rootfs directory for the extracted NVIDIA driver package with this command:
$ cd <your_L4T_root>/Linux_for_Tegra/rootfs
where <your_L4T_root> is your L4T root directory, which is assumed to be your home directory (~).
For more information, see Extracting Tegra Linux Driver Package in this section.
$ sudo tar zxpf ../../Tegra-Linux-Sample-Root-Filesystem_<release_type>.tar.gz
3.
Run the apply_binaries.sh script to copy the NVIDIA user space libraries into the target file system:
$ sudo ./apply_binaries.sh
Note: The apply_binaries.sh installs the appropriate default version, for the provided sample file system, of the Tegra X driver by creating a sym-link to point to the proper ABI. The script installs the sym-link to the following location in the rootfs:
./usr/lib/xorg/modules/drivers/tegra_drv.so
If you are using a different rootfs, or if you already have configured your rootfs, you can apply the NVIDIA user space libraries by setting the LDK_ROOTFS_DIR environment variable to point to your rootfs. Then run the script, as shown above, to copy the binaries into your target file system.
To install a different X driver Application Binary Interface (ABI):
Use the apply_binaries.sh script and pass the –abi <number> flag by executing:
$ sudo ./apply_binaries.sh –abi <number>
where <number> is the ABI version to install, either 5, 6, 7, 8, 10, 11, or 12. The ABI default value for the X driver is ‘X ABI version 10’ and it is the version that is compatible with the provided sample file system. You can find the version to use in the sample file system by following the directions listed below.
To determine the X driver ABI of the X server used in the root file system:
Examine the resulting file /var/log/Xorg.0.log, which will contain something like the following:
(II) Module ABI versions:
X.Org ANSI C Emulation: 0.4
X.Org Video Driver: 8.0
The X.Org Video Driver line reports the ABI version. The sample Ubuntu 11.04-based root file system uses X driver ABI 10.
4.
5.
6.
To copy the file system to the external rootfs device
1.
2.
If your device is not formatted as Ext3, enter the following command to format it with an Ext3 file system:
$ sudo mkfs.ext3 /dev/sd<port>1
where <port> is the port your device is mounted. You can use the dmesg command to determine the port.
3.
If needed, mount your device with the following command:
$ sudo mount /dev/sdX1 <mntpoint>
where <mntpoint> is your rootfs device’s mount point.
4.
$ cd ${LDK_ROOTFS_DIR}
$ sudo tar -cpf - * | ( cd <mntpoint> ; sudo tar -xpf - )
If it is not set, copy the rootfs directory that is included in the release by executing the following commands:
$ cd <your_L4T_root>/rootfs
$ sudo tar -cpf - * | ( cd <mntpoint> ; sudo tar -xpf - )
Once you have flashed your board, you can then unmount the disk and plug it to the board. For more information about flashing, see the Flashing the Boot Loader and Kernel in this section. For information about configuring your board setup, see the hardware documentation for your developer board.
Updating drivers on an existing target system
These instructions are for the situation where there was a previous release or driver package loaded onto a target board and that target device is booted.
Prerequisite
You must attach an Ethernet cable to the device through either the Ethernet port (if available) or through the USB Ethernet adaptor. Alternatively, you can connect through Wi-Fi if the appropriate driver and firmware are enabled and installed.
To update drivers on an existing target system
1.
2.
Download the NVIDIA Tegra Linux driver release and the additional support packages (for example the codec's package) from the nvidia.com links with wget. For example, to download the last (not the latest) release do the following:
wget http://developer.nvidia.com/sites/default/files/akamai/tools/files/l4t/r15_alpha/cardhu_Tegra-Linux-R15.alpha.1.0.tbz2
wget http://developer.nvidia.com/sites/default/files/akamai/tools/files/l4t/r15_alpha/cardhu_Tegra-Linux-codecs-R15.alpha.1.0.tar.gz
Note: The release shown in this example is a previous release and not the current release.
3.
Extract the release For more information, see Extracting Tegra Linux Driver Package in this section.
4.
$ export LDK_ROOTFS_DIR=/
$ echo ${LDK_ROOTFS_DIR}
5.
$ cd Linux_for_Tegra
6.
Run the apply_binaries.sh script to install the NVIDIA drivers onto your target board. For more information, see Setting Up the Root File System in this section.
7.
(Optional) Change your X driver ABI as a variable passed into apply_binaries. For more information, see Setting Up the Root File System in this section.
8.
For the codecs, or other additional packages, extract the files, being sure to extract them to your root '/' directory. For more information, see Installing Additional Packages in this section.
Determining the Success of a Driver Update
You can determine whether a driver update went successfully.
To determine the success of a driver update
$ cat /etc/nv_tegra_release | grep -v -P '^#.*$' | sha1sum -c
Installing Additional Packages
This section explains how to install the additional NVIDIA packages, additional Ubuntu packages, and Google Chrome.
Installing Additional NVIDIA Packages
NVIDIA may supply additional packages. You can install these packages onto the target device’s root file system. These may include the following packages:
restricted_codecs.tbz2, which is included in the <target_board>_Tegra-Linux-codecs-<version>_<release_type>.tar.gz
Directly after the "apply_binaries" step in Setting Up the Root File System, you can install the package into the configured rootfs.
To install an NVIDIA package when the rootfs is already installed on the device
1.
$ sudo mount <device> /mnt
where <device> is the device such as /dev/sda1.
2.
$ tar -C /mnt -xjf <path-to>/$<package_name>
where <package_name> is one of the packages.
For example, if you have the restricted_codecs.tbz2 file located in:
<home>/restricted_codecs.tbz2
then your line will look like:
$ tar -C /mnt -xjf <home>/restricted_codecs.tbz2
3.
Unmount the device with this command:
$ sudo umount <device>
and attach the device to the target board.
Installing Additional Ubuntu Packages
This section explains how to install additional packages from Ubuntu by using the provided sample file-system. For example, you may wish to download the following packages:
openssh-server for remotely logging in
ubuntu-desktop for the standard Ubuntu graphical user interface
Prerequisite
You must attach an Ethernet cable to the device through either the Ethernet port (if available) or through the USB Ethernet adaptor, or connect through Wi-Fi if the appropriate driver and firmware are enabled and installed.
To install more packages
1.
Boot the target device.
2.
Turn on networking by executing:
$ sudo dhclient
3.
Install packages using apt-get. For example, to install wget execute this command:
$ sudo apt-get install wget
Installing Google Chrome
You can install Google Chrome from the command line, without using a browser.
Note: This installation procedures are untested.
To install Google Chrome from the command line
1.
$ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
2.
$ sudo add-apt-repository 'deb http://dl.google.com/linux/chrome/deb/ stable main'
3.
$ sudo apt-get update
4.
$ sudo apt-get install google-chrome-stable
Or install the beta version (latest version) with:
$ sudo apt-get install google-chrome-beta
For instructions on installing Google Chrome, see:
http://www.ubuntuupdates.org/ppa/google_chrome
Configuring NFS Root on the Linux Host
To boot the target device from NFS, you must provide an NFS root mount point on your Linux host machine. The procedure in this section describes the basic steps to do so.
Prerequisites
You must have an Ethernet connection on the target, as well.
To configure NFS root on the Linux host
1.
Install the nfs components on your host machine:
$ sudo apt-get install nfs-common nfs-kernel-server
2.
Modify /etc/exports to look somewhat like this:
$ /nfsroot *(rw,nohide,insecure,no_subtree_check,async,no_root_squash)
After adding the entry, restart using the following command:
$ sudo /etc/init.d/nfs-kernel-server restart
3.
Create an /nfsroot directory on your Linux host machine:
$ sudo mkdir /nfsroot
4.
$ cd ./rootfs
$ sudo tar -cpf - * | ( cd /nfsroot ; sudo tar -xpf - )
5.
$ sudo exportfs -a
Alternatively, you can export or un-export all directories by using the -a and -u flags. The following command un-exports all directories:
$ sudo exportfs -au
6.
(Optional) If the Ubuntu firewall blocks NFS root access, it must be disabled depending upon your configuration. You can do so with the following command:
$ sudo ufw disable
7.
If there are issues performing the NFS boot, to separately verify everything on the ‘host’ machine is configured properly, you can perform the following step on a booted target board through USB/SD/internal eMMC. It should be possible to mount the host NFS root point on the target device:
$ mkdir rootfs
$ sudo mount -v -o nfsvers=3 <IP-ADDR>:/nfsroot rootfs
Where <IP-ADDR> is the IP address of the Linux Host machine as taken from the “ifconfig” command. This proves that the host configuration is correct.
Note: You must install the nfs-common package using the following command prior to executing the mount command on the target machine:
$ sudo apt-get install nfs-common
To boot the target with the NFS root point, see Flashing the Boot Loader and Kernel section and be sure to include the -N option for the nfs root point.
Setting Power Saving Options
This section explains how to enable the hotplug driver and the Tegra CPU power-gated state (LP2) for power savings on the target board.
Enabling the Auto-Hotplug Driver
The auto-hotplug driver implements the policy for when to bring cores online/offline. The auto_hotplug driver also implements the policy for when to switch clusters, i.e. when to switch from companion CPU to main CPU or vice versa. Cluster switching is transparent to the OS. The switch happens when software enters a power-gated state on one CPU core and hardware resumes the execution on a different physical CPU core.
To enable the auto-hotplug driver
$ echo 1 > /sys/module/cpu_tegra3/parameters/auto_hotplug
Enabling the Tegra CPU Power-Gated State (LP2)
With the LP2 power state, the CPU core is power-gated if supported by the hardware. If all CPU cores on the VDD_CPU power rail are in LP2, Tegra hardware signals the PMIC to turn off the regulator.
To enable the LP2 power state
$ echo Y > /sys/module/cpuidle/parameters/lp2_in_idle
Flashing the Boot Loader and Kernel
This section describes the steps that must be taken to boot the target board (Ventana or Cardhu) and provides usage information for the flash.sh script.
Flash Procedure
The first step is to flash the board with the boot loader and kernel.
Prerequisites
The following directories must be present:
/bootloader—boot loader plus flashing tools (NvFlash, CFG, BCTs, etc.)
/kernel—a kernel zImage plus scripts to sync/build the kernel
/rootfs—the root file system that you download
/nv_tegra—NVIDIA® Tegra® user space binaries
You must also have the USB cable connected to the recovery port prior to running the commands listed below. For more information, see the Requirements topic.
To flash the boot loader and kernel
1.
2.
Now run the flash.sh script that is in the top level directory of this release. The script must be supplied with the device name that it will have in the root file system:
$ sudo ./flash.sh <target_board> <rootdev>
If the root file system will be on a USB disk, execute the script as follows:
$ sudo ./flash.sh <target_board> sda1
Otherwise, if the root file system will be on an SD card, execute the script as follows:
$ sudo ./flash.sh <target_board> mmcblk1p1
Where <target_board> is ventana or cardhu, depending upon your target device.
The above examples are for fastboot. For U‑Boot, add the following argument:
-L <PATH_TO_U-BOOT_BIN_FILE>
For example:
$ sudo ./flash.sh –L bootloader/<target_board>/u-boot.bin <target_board> <rootdev>
The boot loader and kernel will load.
Flash Script Usage
You can find the most up-to-date usage information by running the flash.sh script included in the release. The basic usage information is as follows.
Usage
sudo ./flash.sh [options] <target_board> <rootdev>
Where you specify the required parameters and one or more of the options shown in the following table.
Is one of ventana or cardhu.
Is one of following:
Specifies the kernel command line. Warning: This manual kernel command line should be *FULL SET*. Upon detecting the manual command line, the boot loader overrides the entire kernel command line with this <cmdline> input.
Specifies initrd file. Null initrd is the default.
Specifies the X driver ABI TBZ2 file.
Specifies the xorg.conf file to override the default.
Synchronizing the Kernel Sources and Tool Chain
You can manually rebuild the kernel used for this package. Internet access is required to do so. All the related scripts are located in the kernel directory.
Prerequisites
You must install Git. This can be done on Ubuntu 10.04 by running the following command:
$ sudo apt-get install git-core
Your system must have the default Git port 9418 open for outbound connections.
To rebuild the kernel
1.
$ cd ./kernel/
$ ./kernel_sync.sh
Which will prompt you to enter a ‘tag’ name, which is provided in the release notes. Alternatively, you can provide the ‘tag’ name when calling the script. For example:
$ ./kernel_sync.sh <TAG_NAME>
—Or—
You can also manually sync the sources, as follows:
$ cd <myworkspace>
$ git clone git://nv-tegra.nvidia.com/linux-2.6.git kernel_sources
$ cd kernel_sources
$ git checkout <TAG_NAME>
where <TAG_NAME> is the ’tag’ name that is available in the release notes.
You can sync to any Linux tag you would like, but the tag provided in the release notes will sync the sources to the same sources the release binary was built from. To see a list of the available release tags, use:
$ git tag –l ‘tegra-l4t*
2.
Install the tool chain by running the install_3rdparty.sh script:
$ ./install_3rdparty.sh
Building the NVIDIA Kernel
Follow the steps in this procedure to build the NVIDIA kernel.
Prerequisites
To build the Tegra Kernel
1.
$ export CROSS_COMPILE=<crossbin>
$ export TEGRA_KERNEL_OUT=<outdir>
$ export ARCH=arm
where:
<crossbin> is the prefix applied to form the path to the tool chain for cross compilation, e.g., gcc. For the CodeSourcery tool chain, it will look something like:
<csinstall>/arm-2009q1-203-arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-
2.
$ cd <myworkspace>/kernel
$ mkdir $TEGRA_KERNEL_OUT
$ make O=$TEGRA_KERNEL_OUT tegra3_defconfig
$ make O=$TEGRA_KERNEL_OUT tegra_defconfig
Where <myworkspace> is the parent of the Git root.
Configuring ALSA
This topic documents how to configure the Advanced Linux Sound Architecture (ALSA) to enable playback. It pertains to both the Cardhu and Ventana boards.
To playback using headset
Execute the following command:
$ amixer cset numid=45 1
To playback using speaker on Cardhu
$ amixer cset numid=42 2
$ amixer cset numid=43 2
$ amixer cset numid=44 63,63
$ amixer cset numid=45 4
$ amixer cset numid=49 1
$ amixer cset numid=50 1
$ amixer cset numid=51 1
$ amixer cset numid=52 1
$ amixer cset numid=53 1
$ amixer cset numid=54 1
$ amixer cset numid=55 1
$ amixer cset numid=56 1
$ amixer cset numid=29 120,120
Using Example Applications
This section describes two example applications you can use to test multimedia and OpenGL/EGL functionality on NVIDIA Tegra platforms.
OpenGL/EGL Gears Test Application
If you would like to run a sample OpenGL/EGL test application, you can run the open-source Gears application.
To install and run Gears test application
1.
$ sudo apt-get install mesa-utils-extra
2.
Manually create the sym-links in the target root file-system for /usr/lib/libEGL.so.1 and /usr/lib/libGLESv2.so.2.
$ mv /usr/lib/libEGL.so /usr/lib/libEGL.so.1
$ mv /usr/lib/libGLESv2.so /usr/lib/libGLESv2.so.2
$ ln -s /usr/lib/libEGL.so.1 /usr/lib/libEGL.so
$ ln -s /usr/lib/libGLESv2.so.2 /usr/lib/libGLESv2.so
3.
$ export DISPLAY=:0
$ X&
$ /usr/bin/es2gears
GStreamer and NvGstPlayer
You can use the GStreamer open source multimedia framework and NvGstPlayer for testing multimedia. This section tells you how to install and use these applications. This section includes the following sub-topics.
Installing GStreamer
You install GStreamer from the Internet directly on the target. There is a wrapper library called gst-openmax that is an interface between GStreamer and OpenMAX, which enables accelerated NVIDIA plug-ins in the GStreamer framework
For more information about GStreamer, see the following website:
http://gstreamer.freedesktop.org
NvGstPlayer is a multimedia player test application.
To install GStreamer on the target
1.
$ sudo apt-get -y install gstreamer-tools
$ sudo apt-get -y install gstreamer0.10-plugins-good
$ sudo apt-get install gstreamer0.10-plugins-base
$ sudo apt-get -y install alsa-utils
$ sudo apt-get -y install gstreamer0.10-alsa
$ sudo apt-get –y install gstreamer0.10-ffmpeg # required for nvgstcapture
2.
Once this is installed you can see if the installation is complete by typing the following:
gst-inspect | grep qtdemux
To install GStreamer-0.10 on Cardhu
1.
Execute the following command:
$ sudo apt-get install gstreamer-tools gstreamer0.10-alsa gstreamer0.10-plugins-good gstreamer0.10-plugins-base gstreamer0.10-ffmpeg
2.
Place nvgstplayer from the libraries dir to /home/ubuntu.
3.
Execute the following commands at the Ubuntu prompt, which specify the headset route and volume increase:
xinit &
export DISPLAY=:0
amixer cset numid=45 1
amixer cset numid=38 63,63
Using NvGstPlayer
NvGstPlayer is a command line media file player. It will play audio/video files encapsulated in MP4, 3GP, AVI, ASF, WMA, MKV, M2TS, WEBM, MOV. This section describes NvGstPlayer usage, runtime commands, default settings, and important notes.
Usage
./nvgstplayer [OPTIONS]
Where you can specify one or more of the options shown in the following table.
Specifies to use Playbin, which are ready made collections of elements provided by GStreamer.
Runtime Commands
You can execute the following commands while running the test.
Quit the application.
Go to next track.
Restart the current track.
Go to the previous track.
Query for position.
Seek by <val> milliseconds, relative to current position,
for example:
f:23901.
Default Settings
The following shows the default settings.
Important Notes
If p is -1 then playback will pause until the end of segment (EOS) with the interval of gap seconds.
To create the pipeline, this application selects elements based on their ranks automatically. So if you want to stop this default behavior and want the application to use some particular elements, then specify those elements in elements file and use that file with -e option.
All command line arguments will apply to all streams in the URIs file unless explicitly specified for a stream in URI file. For example:
./nvgstplayer -u uri -e elem --no-audio
specifies all the streams in the URIs file will play without audio.
NvGstPlayer Examples
This section provides example commands, elements file, and URIs file.
Example Commands
Example Command
This plays the stream as a command line argument.
This specifies the stream should be played 4 times.
This specifies to start the media from 1 percent of the duration, and to start the segment at 70 seconds.
This specifies to start the segment in media at 10 seconds.
Plays for a duration of 90 seconds.
Disables all A/V sync.
Uses Playbin.
Disables audio.
Disables video.
Forces the use of audio parser.
Forces the use of video parser.
This specifies to seek to 1 percent of duration, 75 times.
This specifies to seek the media to 15 seconds, 30 seconds, and 60 seconds.
This specifies to display the image for 5 seconds.
This specifies to show the stream statistics, which are saved in the following file:
Example Elements File
The following shows an example of an elems file, which is used in Number 2 in the below execution description.
#Decoders
[decode_videompeg4]
name=nv_omx_mpeg4dec
 
[decode_audioaac]
name=nv_omx_aacdec
 
[decode_audiomp3]
name=nv_omx_mp3dec
 
[decode_videoh264]
name=nv_omx_h264dec
 
#Sinks
[sink_video]
name=nv_gl_eglimagesink
 
[sink_audio]
name=alsasink
In the previous example name is the property of element. You can mention other properties of element followed by name property, each on separate line, if they exist. For example, you can mention as follows:
#Sinks
[sink_video]
name=nv_gstbin_videosink
rendertarget=1
Example URIs File
The following shows an example of uris file, which is used in Number 2 and Number 3 in the below execution descriptions.
[/home/ubuntu/All_streams/<filename>.3gp]
seekper=1
seeks=25;0;65
 
[/home/ubuntu/All_streams/<filename>.mpg]
pauses = 5
gap = 7
 
[/home/ubuntu/All_streams<filename>.wmv]
startper = 1
start = 50
 
[/home/ubuntu/All_streams/<filename>.avi]
start = 20000
duration= 10000
Execution Descriptions
./nvgstplayer -i <filename>.mp4
The application will play the <filename>.mp4 stream until end of stream (EOS) and will exit.
./nvgstplayer -u uris -e elems
The stream <filename>.3gp will play with seeks to 25% duration, then 0% duration (i.e., start of stream) and then 65% duration of the stream. And then will play until EOS.
Then the next stream from uris file will be taken up, (i.e., <filename>.mpg). This stream will pause 5 times with the gap of 7 seconds between two consecutive pauses.
Then the next stream from URIs file will be taken up, (i.e., <filename>.wmv). This stream will
Start from 50% duration of the stream.
Then the next stream from URIs file will be taken up, (i.e., <filename>.avi).
./nvgstplayer -u uris --no-sync
All the streams from uris file will play without AV sync. All command line arguments will apply to all streams in the uris file, unless explicitly specified for a stream in uris file.
./nvgstplayer -i <filename>.mp4 --loop=3 --pauses=4 seeks=10000:0:45000
<filename>.mp4 will be played 3 times, and each playback will pause for 4 times and will seek to 10th sec, then 0th sec, and then 45th sec of the playback.
./nvgstplayer. -i <filename>.mp4 -p 2 -x 3 -s:10000:20000:30000:40000
This playback will have 2 pauses and seeks to 10th second, then 20th second, then 30th second, then 40th second, and the consecutive pauses and seeks will have a gap of 3 seconds.
./nvgstplayer -i rtsp://10.25.20.77/mp4/AAC/<filename>.mp4
Player provides RTSP/HTTP streaming support. The stream <filename>.mp4 will be played until EOS.
Camera Capture Application (NvGstCapture)
This section documents the following new nvgstcapture application options:
This section documents the following new nvgstcapture application options:
Camera Options
Gst Camera
Application Commands
Camera Capture Mode selection
"mo:0" or "mo:1" where,
(0): video
(1): image
Camera iso control (exposure control)
Value : auto[-1]/[num]
[100 200 400 800]
Contrast: Range val= 0 - 100
ct:<val>, eg : "ct:50"
Flash:
xx:<val> , eg : "xx:0"
(0): on
(1): off
Zoom: Range val= 1-8
z:<wscale>x<hscale> , eg : "z:2x2"
Camera Pre-capture converge control
Brightness: Range val= 0 - 100
bt:<val>, eg : "bt:50"
Camera saturation control
Saturation: Range val= -100 - 100
st:<val>, eg : "st:50"
Hue: Range val= 0 - 100
ht:<val>, eg : "ht:50"
Camera white balance control
Value :
[off,sunlight,
cloudy,shade,
tungsten,fluorecent,
flash,horizon,auto]
White Balance:
wb:<val> , eg : "wb:1"

(0) : off

(1) : auto

(2) : sunlight

(3) : cloudy

(4) : shade

(5) : tungsten

(6) : fluorescent

(7) : incandescent

(8) : flash

(9) : horizon
Value :
[Normal/Continuous shot/
Out-focusing shot/Smile shot/
Panorama shot]
Camera image filter control (color effect)
Value :
[none,bw,
sepia,emboss,
negative,solarize,
posterize]
Filter Control:
ft:<val> , eg : "ft:0"

(0) : none

(2) : emboss

(3) : negative

(10) : solarize

(805306368) : posterize

(805306369) : sepia

(805306370) : bw
Camera pause preview after capture
Flicker Control:
fl:<val> , eg : "fl:1"

(0) : off

(1) : auto

(2) : 50Hz

(3) : 60Hz
Camera edge enhancement control
Camera meter mode control (exposure control)
Metering:
mt:<val>, eg : "mt:2"

(0) : average

(1) : spot

(2) : matrix
Preview Options
Gst Camera
Application Commands
Resolution value :
pr:<w>x<h> , eg "pr:640x480"
[174x144,320x240,640x480,
720x480,1280x720,1920x1080]
Still Capture Options
Gst Camera
Application Commands
Resolution value :
cr:<w>x<h> , eg "cr:640x480"
[174x144,320x240,640x480,800x600,
720x480,1280x720,1280x960(1 MP),
1600x1200(2 MP),2048x1536(3 MP),
2240x1680(4 MP),2560x1920(5 MP)]
Note: Applicable to JPEG only.
Image Encoder: val= nv_omx_jpegenc
ie:<val>

Default : JPEG only
JPEG encode in various chroma subsampling
Video Capture Options
Gst Camera
Application Commands
Resolution value :
cr:<w>x<h> , eg "cr:1280x720"
[174x144,320x240,640x480,
720x480,1280x720,1920x1080]
Note: Applicable to H.264 only.
Video Encoder: val= nv_omx_h264enc
ve:<val>

Default : H264 only
Audio Capture Options
Gst Camera
Application Commands
Note: Applicable to AAC only.
Audio Encoder: val= nv_omx_aacenc
ae:<val>

Default : AAC only
Common Options
Gst Camera
Application Commands
Note: Applicable to MP4 only.
Note: On only.
Basic NvGstCatpure Functions
Follow these steps to install the nvgstcapture application.
To install nvgstcapture
1.
2.
$ export DISPLAY=:0
$ xinit &
3.
$ amixer cset numid=82 on
$ amixer cset numid=71 1
$ amixer cset numid=1 on
$ amixer cset numid=4 on
$ amixer cset numid=77 0
$ amixer cset numid=74 on
$ amixer cset numid=42 63,63
$ amixer cset numid=2 31,31
$ amixer cset numid=5 31,31
4.
$ nvgstcapture
5.
When nvgstcapture is running you can type commands to do video and camera capture.
Note: At this point, the nvgstcapture application does not look like it is accepting input but it is.
Additional Notes
The filenames are named as nvgsttest(%d).jpg or nvgsttest(%d).mp4.The %d indicates a counter starting from 0 every time the application is launched.
CAUTION: Be sure to backup the recorded files if you need them before launching the application again; otherwise, if you start nvgstcapture and take an image, then close it and restart and take another image, the image taken originally taken is overwritten.
mo:1 <PRESS ENTER>
2 <PRESS ENTER>
mo:0 <PRESS ENTER>
1 <PRESS ENTER>
0 <PRESS ENTER>
For more advanced operations of nvgstcapture, follow the instructions listed in the Commands column in the Camera Capture Application (nvgstcapture) topic.