NAME
encode - encode video, audio and/or speech files
SYNOPSIS
encode [options...]
DESCRIPTION
This demo uses the Codec Engine to encode data from peripheral device
drivers to files. Video and speech files are supported. The files
created will be encoded elementary streams of video or speech.
You must supply at least one file for the demo to run.
This demo needs a 720P @ 60Hz or 50Hz video source connected to
component in.
The DSP Link and CMEM kernel modules need to be inserted for this demo
to run. Use the script 'loadmodules.sh' to make sure both kernel modules
are loaded with adequate parameters.
OPTIONS
-v <video file>, --videofile <video file>
Encodes video data to the given file. The file will be created if
it doesn't exist, and truncated if it does exist. The demo
detects which type of video file is supplied using the file
extension. Only H.264 BP (.264 extension) is supported.
-s <speech file>, --speechfile <speech file>
Encodes speech data to the given file. The file will be created
if it doesn't exist, and truncated if it does exist. The demo
detects which type of speech file is supplied using the file
extension. The only supported speech algorithm as of now is
G.711 (.g711 extension).
-r <resolution>, --resolution <resolution>
The resolution of video to encode in the format 'width'x'height'.
Default is the resolution of the input video standard detected.
Note that the preview will still display the full frame even if
this option is used.
-b <bit rate>, --videobitrate <bit rate>
This option sets the bit rate with which the video will be
encoded. Use a negative value for variable bit rate. Default is
variable bit rate.
-p <bit rate>, --soundbitrate <bit rate>
This option sets the bit rate with which the audio will be
encoded. Default is 128000.
-u <sample rate>, --samplerate <sample rate>
This option sets the sample rate with which the audio will be
sampled and encoded (ignored for speech). Default is 44100 Hz.
-l, --linein
This option makes the input device for sound recording be the
'line in' as opposed to the 'mic in' default.
-k, --keyboard
Enables the keyboard input mode which lets the user input
commands using the keyboard in addition to the IR remote control
interface. At the prompt type 'help' for a list of available
commands.
-t <seconds>, --time <seconds>
The number of seconds to run the demo. Defaults to infinite time.
-o, --osd
Enables the On Screen Display for data visualization. If this
option is not passed, the data will be output to stdout instead.
If you don't pass a video file, the -o flag will be ignored.
-h, --help
This will print the usage of the demo.
EXAMPLE USAGE
First execute this script to load kernel modules required:
./loadmodules.sh
General usage:
./encode -h
H.264 video encode only in CIF NTSC resolution:
./encode -v test.264 -r 352x240
H.264 video encode at 1Mbps with keyboard interface:
./encode -v test.264 -b 1000000 -k
H.264 video encode and G.711 speech encode:
./encode -v test.264 -s test.g711
AAC audio encode 44100 Hz and 128kbps:
./encode -a test.aac -u 44100 -p 128000
COPYRIGHT
Copyright (c) Texas Instruments Inc $year
Use of this software is controlled by the terms and conditions found in
the license agreement under which this software has been supplied or
provided.
KNOWN ISSUES
VERSION
2.0
CHANGELOG
1.4:
No changes to run time behavior.
SEE ALSO
For documentation and release notes on the individual components see
the html files in the host installation directory.
- 1
- 2
前往页