This is a console tool for creating Sofdec2 data using the H.264 video codec.
You can output a batch file for this tool by performing the Batch Encoding procedure from a project that specifies H.264 as the video codec in the GUI version of the encoding tool.
For details on the platforms that support the H.264 codec, refer to Codec Selection .
Executable File Name
Input and Output Files
- Input Files
When using the console version of the Sofdec2 encoder, specify the input files using the same procedure as explained in Sofdec2 Encoding Wizard to output Sofdec2 data.
For details on each type of file, refer to the following pages:
- Output Files
Basic Usage
To run the Sofdec2 encoder, open a Command Prompt and enter the command in the following format on the command line.
[Format] sofdec2encH264 [-subcommand=param1[,param2,...]]
[Inputs] subcommand : A subcommand
param# : Subcommand parameters
[Example] The following command creates a Sofdec2 file for PS3 named "sample.usm" with an input video file named "sample.avi".
> sofdec2encH264 -in=sample.avi -out=sample.usm -target=ps3
(The subcommand information given below uses the PS3 as an example.)
[Notes] Subcommands
Subcommands are command options that specify to the program what processing to perform.
For example, subcommands are used to specify the input file, output file, and operating methods to the program.
Subcommands List
- File Commands
Subcommand Name | Details |
in | Input video file specification |
out
output | Output file specification |
target | Target platform name specification |
video## | Video file specification |
alpha## | Alpha file specification (not supported) |
audio## | Audio file specification (including surround audio) |
mca##_** | Surround audio specification via monaural materials |
subtitle## | Subtitle information file specification |
cuepoint | Cuepoint information file specification |
- Video Editing Subcommands
Subcommand Name | Details |
crop | Crop |
scale | Resize |
- Video Encoding Settings Subcommands
- Audio Encoding Settings Subcommands
Subcommand Name | Details |
hca | Encode audio materials using the HCA codec |
hca_quality | Audio quality setting when using the HCA codec |
- Other
Subcommand Name | Details |
cleanup | Delete intermediate files |
Subcommand Specifications
File Subcommands
in: Input Video File Specification
[Format] -in=filename
[Input] filename: The input video file.
[Function] Specifies the input video file.
This subcommand is required to specify the input video file.
You can use this subcommand instead of the "video" subcommand.
[Example] Specify "sample.avi" as the input video file.
> sofdec2encH264 -in=sample.avi -out=sample.usm -target=ps3
out: Output File Specification
[Format] -out=filename
[Input] out: The output file (usm file).
[Function] Specifies the output file name. This is the same function as the "output" subcommand.
This subcommand is required to specify the output file name.
Specify "usm" as the file extension.
[Example] Specify "sample.usm" as the output file name.
> sofdec2encH264 -in=sample.avi -out=sample.usm -target=ps3
target: Target Platform Name Specification
[Format] -target=platform
[Input] platform: The platform name.
ps3: SCE PlayStation 3
ps4: SCE PlayStation 4
xboxone: Microsoft Xbox One
wiiu: Nintendo Wii U
vita: SCE PlayStation Vita
[Function Specifies the target platform name. H.264 encoding parameters are automatically selected based on the specified platform.
This subcommand is mandatory. You must specify the target platform.
[Example] Set the target platform to PlayStation 3.
> sofdec2encH264 -video00=smpvid.avi -audio00=smpaud.wav -out=sample.usm -h264_profile=high \
-target=ps3
video: Video File Specification
[Format] -video##=filename
[Input] filename: The video file.
## : Video track number (##=00)
[Function] Specifies the input video file.
(1) Video File
For details on video files, refer to Video Material Files.
(2) Video Track Number
You must specify 00 for the track number.
Other track numbers are not supported.
[Example] Assign the AVI file "smpvid.avi" to track 00.
> sofdec2encH264 -video00=smpvid.avi -audio00=smpaud.wav -out=sample.usm -target=ps3
audio: Audio File Specification (Including Surround Audio)
[Format] -audio##=filename
[Input] filename: The audio file.
## : Audio track number (Range: 00 to 31)
[Function] Specifies the input audio file(s).
(1) Audio File
For details on audio files, refer to Audio Material Files.
(2) Audio Track Number
(a) The track number specified here will be the audio track number in the Sofdec2 file.
(b) If you will only use one audio file, use track 00.
(c) You can specify up to 32 audio files.
(3) Surround Sound Materials
(a) If you are encoding 5.1-channel surround sound audio, specify six channels of audio materials.
(b) If you are encoding surround sound audio using monaural materials, use the mca option.
Channel Number for Six-channel Materials | Speaker Position |
00 | LEFT |
01 | RIGHT |
02 | CENTER |
03 | LFE |
04 | LEFT Surround |
05 | RIGHT Surround |
[Example] Assign English audio to track 01 and Japanese audio to track 02, and assign music file to track 00.
> sofdec2encH264 -video00=smpvid.avi -out=sample.usm -target=ps3 \
-audio00=music.wav -audio01=voice_en.wav -audio02=voice_ja.wav
mca: Surround Audio Specification Via Monaural Materials
[Format] -mca##_**=filename
[Input] filename: The audio file.
## : Audio track number (Range: 00 to 31)
: Audio channel number (Range: 00 to 05)
[Function] Specifies the audio files for surround sound movies.
(1) Audio File
(a) For details on audio files, refer to Audio Material Files.
(b) If you are encoding surround sound audio by specifying six individual monaural materials, use this subcommand.
(c) If you are encoding surround sound audio from six-channel audio materials, use the audio## subcommand.
(2) Audio Track Number
(a) The track number specified here will be the audio track number in the Sofdec2 file.
(b) If you will only use one audio track, use track 00.
(c) You can specify up to 32 audio files.
(3) Channel Number
(a) You cannot omit the channel specifications for surround sound movie data. You must specify a material file for all channels.
(b) The following table shows the channel number and speaker position for each surround sound movie audio file.
Channel Number for Monaural Materials | Speaker Position |
00 | LEFT |
01 | RIGHT |
02 | LEFT Surround |
03 | RIGHT Surround |
04 | CENTER |
05 | LFE |
[Example] Assign a surround sound movie audio file to track 00.
> sofdec2encH264 -video00=smpvid.avi -out=sample.usm -target=ps3\
-mca00_00=fl.wav -mca00_01=fr.wav -mca00_02=sl.wav -mca00_03=sr.wav \
-mca00_04=c.wav -mca00_05=lfe.wav
subtitle: Subtitle Information File Specification
[Format] -subtitle##=filename
[Input] filename: Subtitle Information File
## : Subtitle channel number (Range: 00 to 15)
[Function] Specifies the subtitle information file.
(1) Subtitle Information File
For details on subtitle information files, refer to Subtitle Information Files.
(2) Subtitle Channel Number
(a) The channel number specified here is the subtitle channel number for the Sofdec2 data.
(b) If you will only use one subtitle information file, use channel 00.
(c) You can specify up to 16 subtitle information files.
[Example] Assign an English subtitle information file and a Japanese subtitle information file to channels 00 and 01, respectively.
> sofdec2encH264 -video00=smpvid.avi -audio00=smpaud.wav -out=sample.usm -target=ps3 \
-subtitle00=subttl_en.txt -subtitle01=subttl_ja.txt
cuepoint: Cuepoint Information File Specification
[Format] -cuepoint=filename
filename: Cuepoint Information File
[Function] Specifies the cuepoint information file.
For details on cuepoint information files, refer to Cuepoint Information Files.
[Example]
> sofdec2encH264 -in=sample.avi -out=sample.usm -target=ps3 -cuepoint=sample_cuepoint.txt
Video Editing Subcommands
crop: Crop
[Format] -crop=crx,cry,crw,crh
[Inputs] crx: The X coordinate of the cropped image in relation to the source image.
cry: The Y coordinate of the cropped image in relation to the source image.
crw: The width of the cropped image.
crh: The height of the cropped image.
[Function] Crops a portion of the video material.
You can specify a cropped image within the area of the source image.
By default, no cropping is performed.
The width and height must be specified as a multiple of 16.
[Example] Crop the video material at coordinates (0,0) to a size of 640x480.
> sofdec2enc -in=sample.avi -out=sample.usm -crop=0,0,640,480
scale: Resize
[Format] -scale=scw,sch
[Inputs] scw: The width of the resized image.
sch: The height of the resized image.
[Function] Resizes the source image through pixel value averaging.
By default, no resizing is performed.
You must specify a new size that is between 64x64 and 1920x1088 resolution
and a multiple of 16.
[Example] Resize to 640x480.
> sofdec2encH264 -in=sample.avi -out=sample.usm -target=ps3 -scale=640,480
Video Encoding Settings Subcommands
bitrate: Bit Rate Specification
[Format] -bitrate=rate
[Input] rate: The bit rate (in bps).
[Function] Specifies the bit rate of the output file.
If this subcommand is omitted, a high quality file will be output without retrying.
- Default Value: 3000000 bps
[Example] Set the bit rate to 6 Mbps.
> sofdec2encH264 -video00=smpvid.avi -audio00=smpaud.wav -out=sample.usm -target=ps3 \
-bitrate=6000000
h264_profile: H.264 Profile Specification
[Format] -h264_profile=profile
[Input] profile: The profile name.
high: H.264 High Profile [Default]
main: H.264 Main Profile
baseline: H.264 Baseline Profile
[Function] Specifies the H.264 profile for encoding.
If this subcommand is omitted, encoding is performed with the High Profile.
[Example] Set the H.264 profile to Main Profile.
> sofdec2encH264 -video00=smpvid.avi -audio00=smpaud.wav -out=sample.usm -target=ps3 \
-h264_profile=main
framerate: Frame Rate Specification
[Format] -framerate=decfr
-framerate=fr_num,fr_den
[Inputs] decfr: Specify the frame rate in decimal format.
fr_num: Specify the frame rate as a fraction. Numerator
fr_den: Specify the frame rate as a fraction. Denominator
[Function] Specifies the frame rate of the movie. [fps]
- There are two methods of specifying the frame rate: We will use 29.97 fps as an example.
- Decimal expression: -framerate=29.97
- Fractional expression: -framerate=30000/1001
- You can specify the following frame rates: (10, 15, 20, 23.976, 25, 29.97, 30, 50, 59.94, 60)
- If this subcommand is omitted, the frame rate of the video material is used.
- If you will also specify audio, you must prepare the audio materials so that they match the new frame rate (e.g., by changing the sampling frequency to match up with the video).
- Note that the frame rate setting does not insert frames
or cull frames.
The frame rate information specified here will be embedded in the header of the movie data,
and is used for frame retrieval timing adjustment and other processing during runtime playback.
For example, if you encode 60 fps source video material at 30 fps, the data size will not change.
To create an actual 30 fps movie, you must prepare the source material at 30 fps.
[Example] Set the frame rate to 29.97 fps.
> sofdec2encH264 -video00=smpvid.avi -audio00=smpaud.wav -out=sample.usm -target=ps3 \
-framerate=29.97
Audio Encoding Settings Subcommands
hca: Encode audio materials using the HCA codec.
[Format] -hca=sw
[Input] sw: Switch that designates whether to perform HCA encoding.
ON: Encode.
OFF: Do not encode. (Default)
[Function] Specifies whether to encode audio using HCA encoding.
If the HCA option is set to OFF, the ADX codec is used. For details on codecs, refer to Codec Selection.
hca_quality: Audio Quality Settings When Using the HCA Codec
[Format] -hca_quality=count
[Input] count: The encoding quality setting. You can specify any of the following five values:
5 = Highest quality
4 = High quality (Default)
3 = Medium quality
2 = Low quality (high compression)
1 = Lowest quality (maximum compression)
[Function] Specifies whether to encode audio using HCA encoding.
The general compression ratios for each encoding quality setting value are shown in the following table.
Quality Setting | When Monaural | When Stereo or Better |
5 | 1/4 | 1/4 |
4 | 1/6 | 1/6 |
3 | 1/8 | 1/8 |
2 | 1/10 | 1/12 |
1 | 1/12 | 1/16 |
Other Subcommands
cleanup: Delete intermediate files.
[Format] -cleanup=sw
[Input] sw: Switch that designates whether to delete temporary intermediate files.
ON: Delete. (Default)
OFF: Do not delete.
[Function] Specifies whether to delete intermediate files generated during the encoding process.
If set to OFF, the following material files will remain in the folder.