Mobilemate Advanced Usage

Except for the common usage of Mobilemate, there are more flexible controling converting using its common configuration file “tce/conf/common.conf”.

And, because Mobilemate's work is based on its converting configuration file, so you can also create your own configuration file using text editor without the Video Converting Configure. For example, you can create your configuration file based on default configuration file which is “tce/conf/v2vdefault.conf” for converting to video, and “tce/conf/x2adefault.conf” for converting to audio.

Because the configuration file “v2vdefault.conf” for converting to video includes the options of “x2adefault.conf”, so we only explain the file “v2vdefault.conf” below.

Explaination of "common.conf"

This “common.conf” file is used for setting global convert options for all convertings. It is located in directory of “tce(TinyCore Extensions Directory)/conf”. The default whole “common.conf” is below.

PATH="/opt/mobilemate/bin:/opt/custom/bin:$PATH"
TRIVAL="NO"
DEBUG="NO"
CONVOKFLAG="CONVOK"
DECODED_BY="LIBAV"
GUICONFIRM="NO"
MAXHISTORY="3"
WORKDIR="/opt/mobilemate"
TASKBASE="${WORKDIR}/task"
TASKBAKBASE="${WORKDIR}/task.bak"
TASKBACKUP="NO"
TMPBASE="/tmp/mobilemate"
TMPCONFBASE="${TMPBASE}/conf"
THREADS="-1"
STARTTIME="0"
ENDTIME="0"
MPEGTS_MENCODER_OFPS="12.5,25"
DEFAULT_SOURCE_PAR="1"
COMPARE_DAR_CONSTANT="100"
X264PRESET="medium"
X264PROFILE="baseline"
XVIDFOURCC="DX50"
LIBAVSEEK="FAST"
ASYNC="1"
LOGBASE="${WORKDIR}/log"
V2VOPTIONSLISTFILE="${WORKDIR}/conf/v2voptions.list"
X2AOPTIONSLISTFILE="${WORKDIR}/conf/x2aoptions.list"
V2VRULESLISTFILE="${WORKDIR}/conf/v2vrules.list"
X2ARULESLISTFILE="${WORKDIR}/conf/x2arules.list"

Explain all options below:

PATH="/opt/mobilemate/bin:/opt/custom/bin:$PATH"

Set the executable PATH environment for Mobilemate.

TRIVAL="NO"

Set if display “Mencoder” or “Libav” output on console when converting. This output will not write into log file regardless of this option.

The available options are: “NO”, “YES”.

The default option is “NO”.

DEBUG="NO"

Set if display debug information on console and output to log file.

The available options are: “NO”, “YES”.

The default option is “NO”.

CONVOKFLAG="CONVOK"

The file converting success flag constant string. Don't change it.

DECODED_BY="LIBAV"

Set which decode tool to be used.

The available options are: “LIBAV”, “MENCODER”.

Mobilemate can use one of two tools for its decoding, the default is FFmpeg(libav), and the alternate of Mencoder. If you found the default “LIBAV” can't decode your source file(I have not met ever until today), try “MENCODER”. But, the converting time maybe need more than default when you convert multiple files at the same time.

guiconfirm="NO"

Set if confirm it after every step of configuring or converting.

The available options are: “NO”, “YES”.

The default option is “NO”. When you change it to “YES”, you need confirm every steps when you configure or convert.

MAXHISTORY="3"

Set the how many history configuration files to be kept.

The avialable options are: “1”, “2”, “3”, …, unsigned integer equal to or bigger than 1.

Moblemate will keep your history converting configuration files, the history configuration file is located in folder “tce/conf”, and its name is in the form of “v2vhistoryX.conf” for converting to video and “x2ahistoryX.conf” for converting to audio, “X” is the unsigned integer equal to or bigger than 0.

WORKDIR="/opt/mobilemate"

The Mobilemate tool root directory. Don't change it.

TASKBASE="${WORKDIR}/task"

The Mobilemate task directory. Don't change it.

TASKBAKBASE="${WORKDIR}/task.bak"

The Mobilemate task backup directory.

TASKBACKUP="NO"

Set if backup task files.

The available options are: “NO”, “YES”.

The default option is “NO”.

TMPBASE="/tmp/mobilemate"

The Mobilemate temporary directory. Don't change it.

TMPCONFBASE="${TMPBASE}/conf"

The Mobilemate temporary configuration directory. Don't change it.

threads="-1"

Set how many converting threads working in the same time.

The available options are: “-1” and “1”, “2”, “3”, …, unsigned integer.

The default “-1” indicates the threads number is equal to the amount of CPU cores.

STARTTIME="0"

Set the start point of the file to be converted in second number or in the form of “HH:MM:SS”(Hours:Minutes:Seconds) or “MM:SS” or “-HH:MM:SS”(-Hours:Minutes:Seconds) or “-MM:SS”.

The available options are: Negative integer, …, “-3”, “-2”, “-1”, “0”, “1”, “2”, “3”, unsigned integer. Or, “-01:01:21”, “01:01:21”, etc.. Or, “-11:21”, “11:21”, etc..

Negative value indicates the distance between the specified time point and the end of the file. Unsigned value indicates which time point begin to convert. The default “0” indicates the begin of the original file.

ENDTIME="0"

Set the end point of the file to be converted in second number or in the form of “HH:MM:SS”(Hours:Minutes:Seconds) or “MM:SS” or “-HH:MM:SS”(-Hours:Minutes:Seconds) or “-MM:SS” or “+HH:MM:SS” or “+MM:SS”.

The available options are: Negative integer, …, “-3”, “-2”, “-1”, “0”, “1”, “2”, “3”, unsigned integer, and “+1”, “+2”, “+3”, positive integer. Or, “-01:01:21”, “01:01:21”, etc.. Or, “-11:21”, “11:21”, etc.. Or, “+11:21”, etc..

Negative value indicates the distance between the specified time point and the end of the file. Unsigned value indicates which time point of the file to end of the converting. Positive value indicates the distance between the specified time point and the start time. The default “0” indicates the end of the original file.

MPEGTS_MENCODER_OFPS="12.5,25"

Set the valid Mencoder ofps value for converting mpegts file.

The available option is the unsigned number separated with comma.

Sometimes(or any time, no deep testing), when convert mpegts video files, mencoder need special ofps for its bug.

DEFAULT_SOURCE_PAR="1"

Set the default source video's PAR(Pixel Aspect Ratio) value.

The available option is the unsigned non-zero number.

Sometimes, Mobilemate can't detect the PAR value of the source video file correctly. So this default value will be used. Default “1” indicates the square pixel.

COMPARE_DAR_CONSTANT="100"

Set the constant for comparing the DAR(Display Aspect Ratio) value between the converting intermediate temporary pipe video file and destination video. Only used when using Mencoder as the decoding tool.

The available option is the unsigned non-zero integer number.

The default “100” indicates if the difference between the temporary pipe video DAR times 10000 and destination DAR times 10000 less than “100”, we see the DAR is same between these two files.

X264PRESET="medium"

Set preset to select encoding settings when use libx264 encoder.

The avilable options are: “ultrafast”, “superfast”, “veryfast”, “faster”, “fast”, “medium”, “slow”, “slower”, “veryslow”, “placebo”.

Basically, more slower get more better quality and more smaller file size, but more long converting time. The default is “medium”.

Below is option explaination copied from man page of “mplayer_1.0~rc4.dfsg1+svn33713”.

Use a preset to select encoding settings.
   ultrafast
        no8x8dct aq_mode=0 b_adapt=0 bframes=0  nodeblock  nomb‐
        tree  me=dia  nomixed_refs  partitions=none ref=1 scene‐
        cut=0 subq=0 trellis=0 noweight_b weightp=0
   superfast
        nombtree me=dia nomixed_refs partitions=i8x8,i4x4  ref=1
        subq=1 trellis=0 weightp=0
   veryfast
        nombtree nomixed_refs ref=1 subq=2 trellis=0 weightp=0
   faster
        nomixed_refs rc_lookahead=20 ref=5 subq=4 weightp=1
   fast rc_lookahead=30 ref=2 subq=6
   medium
        Default settings apply.
   slow b_adapt=2   direct=auto   me=umh  rc_lookahead=50  ref=5
        subq=8
   slower
        b_adapt=2 direct=auto  me=umh  partitions=all  rc_looka‐
        head=60 ref=8 subq=9 trellis=2
   veryslow
        b_adapt=2 b_frames=8 direct=auto me=umh me_range=24 par‐
        titions=all ref=16 subq=10 trellis=2 rc_lookahead=60
   placebo
        bframes=16 b_adapt=2  direct=auto  nofast_pskip  me=tesa
        me_range=24    partitions=all   rc_lookahead=60   ref=16
        subq=10 trellis=2
X264PROFILE="baseline"

Set H.264 profile when use libx264 encoder.

The avilable options are: “baseline”, “main”, “high”.

Basically, “baseline” has the most and “high” has the least compatibility for hardware, but “high” has the more advanced features, e.g., can get same quality as “baseline” but with smaller file size. The default is “baseline”. See also: What are the differences between H.264 Profiles?.

Below is option explaination copied from man page of “mplayer_1.0~rc4.dfsg1+svn33713”.

Constrain options to be compatible with an H.264 profile.
 baseline
      no8x8dct  bframes=0  nocabac cqm=flat weightp=0 nointer‐
      laced qp>0
 main no8x8dct cqm=flat qp>0
 high qp>0 (default)
XVIDFOURCC="DX50"

Set FOURCC tag using -vtag option in ffmpeg(libav) using libxvid encoder.

The available options are: “XVID”, “DIVX”, “DX50”.(todo: maybe isn't too exact?)

The default is “DX50”.

LIBAVSEEK="FAST"

Set the FFmpeg(Libav) seeking method.

The available options are: “FAST”, “SLOW”.

When the default “FAST” used, the “-ss” used as an input option (before -i), seeks in this input file to position. Note in most formats it is not possible to seek exactly, so it will seek to the closest seek point before position. When “SLOW” used, the “-ss” used as an output option (before an output filename), decodes but discards input until the timestamps reach position. The “SLOW” option will result more accurate seeking but it will decode the part before seeking point and spend more time to seek.

ASYNC="1"

Set audio sync method of FFmpeg(Libav).

The available options are “”(empty) and any non-zero unsigned integer number.

This option is mainly used for solving some Audio and Video syncing problem. The non-zero unsigned integer will pass to FFmpeg(Libav) “-async” option. This will “Stretches/squeezes” the audio stream to match the timestamps, the parameter is the maximum samples per second by which the audio is changed. The default “1” is a special case where only the start of the audio stream is corrected without any later correction.

And ASYNC=“” indicates don't use “-async” option.

LOGBASE="${WORKDIR}/log"

Set the log file directory.

v2voptionslistfile="${WORKDIR}/conf/v2voptions.list"

The options list file of converting to video. Don't change it.

x2aoptionslistfile="${WORKDIR}/conf/x2aoptions.list"

The options list file of converting to audio. Don't change it.

v2vruleslistfile="${WORKDIR}/conf/v2vrules.list"

The rules list file of converting to video. Don't change it.

x2aruleslistfile="${WORKDIR}/conf/x2arules.list"

The rules list file of converting to audio. Don't change it.

Explaination of "v2vdefault.conf"

This “v2vdefault.conf” is the default configuration file used for converting video file to video file. The default whole “v2vdefault.conf” is below.

format="mp4"
vcodec="mpeg4"
vbitrate="256"
ofps="10"
vfscale="176:144"
vdar="SAR"
vfcroptype="FULL_HEIGHT"
acodec="aac"
audiochannels="2"
samplerate="44100"
abitrate="128"
audiolevel="ORIGINAL"
splittime="-1"

The options explaination list below.

format="mp4"

Set the video container format.

The available options: See them in the output of command line “

/opt/custom/bin/ffmpeg -formats

”.

vcodec="mpeg4"

Set the video encoder.

The available options: See them in the output of command line “

/opt/custom/bin/ffmpeg -codecs

”.

vbitrate="256"

Set the video stream bitrate in kb/s.

The available option is any non-zero unsigned integer.

ofps="10"

Set the converting output video FPS.

The available option is any non-zero unsigned number. For example: “10” and “29.97” is available. But “30000/1001” can not be used here.

vfscale="176:144"

Set the output video resolution.

The available option is in the form of “X:Y”, “X” and “Y” is non-zero unsigned integer.

vdar="SAR"

Set video Display Aspect Ratio(DAR).

The available options are: “SAR” and “X:Y”(“X” and “Y” is non-zero unsigned integer).

The default “SAR” indicates use the same value as the value of “vfscale” above.

vfcroptype="FULL_HEIGHT"

Set how to crop the video image mainly for wide screen source video.

The available options are: “FULL_WIDTH”, “HALF_WIDTH” and “FULL_HEIGHT”.

“FULL_WIDTH” is preserving full width and padding the black block into top and bottom area. As the contrast, the default “FULL_HEIGHT“, it preserves full height and crop left and right parts of the picture. “HALF_WIDTH” is the compromise between the previous two.

acodec="aac"

Set the audio encoder.

The available options: See them in the output of command line ”

/opt/custom/bin/ffmpeg -codecs

“.

audiochannels="2"

Set audio channels number.

The available options: “1”, “2”.

The default “2” indicates “stereo” and “1” is “mono”.

samplerate="44100"

Set audio sampling rate.

The available options are non-zero integer number.

abitrate="128"

Set audio bitrate in kb/s.

The available option is any non-zero unsigned integer.

audiolevel="ORIGINAL"

Set audio volume level.

The available options are: “ORIGINAL”, “VOL2”, “VOL5”, “VOL10”, “VOL20” and “VOLNORM”.

The default “ORIGINAL” indicates keep volume unchanged. “VOLx”(x is 2, 5, etc.) indicates increase xdB. And, “VOLNORM” is only available when using Mencoder as decoding tool, set in common.conf: DECODED_BY=“MENCODER” above, indicates “Maximizes the volume without distorting the sound.”(from “man mencoder”).

splittime="-1"

Set how long of a split segment in seconds.

The available options are: ”-1“ and non-zero unsigned integer number.

The default ”-1“ indicates don't split the video.

Reset Configuration Directory

Sometimes, if you want reset configuration directory, you can use the two ways below.

1, You can delete the entire “conf” directory under “tce(TinyCore Extension)” directory. Then reboot the MobileMate, the original configuration directory will appear.

2, The original configuration directory has been compressed into ”/opt/mobilemate/conf.tar.gz“, you can delete the “conf” directory and uncompress “conf.tar.gz” into “tce” directory to reset configuration directory.

And, if you need only reset default video configuration file “v2vdefault.conf” or audio configuration file “x2adefault.conf”, you can copy “v2vdefault.conf.orig” as “v2vdefault.conf” or copy “x2adefault.conf.orig” as “x2adefault.conf”.

advance.txt · Last modified: 2014/07/29 17:00 by littlebat
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0

蜀ICP备2021012931号-1 川公网安备51092202000377号