This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
advance [2013/09/12 18:07] littlebat [Explaination of common.conf] |
advance [2014/07/29 17:00] (current) littlebat [Explaination of common.conf] updated for mobilemate-0.1b1 |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Mobilemate Advanced Usage ====== | ====== Mobilemate Advanced Usage ====== | ||
- | Except for the [[common|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 [[desk#text_editor|text editor]] without the [[video_configure|Video Converting Configure]]. | + | Except for the [[common|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 [[desk#text_editor|text editor]] without the [[video_configure|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" ===== | ===== Explaination of "common.conf" ===== | ||
Line 9: | Line 13: | ||
<file> | <file> | ||
PATH="/opt/mobilemate/bin:/opt/custom/bin:$PATH" | PATH="/opt/mobilemate/bin:/opt/custom/bin:$PATH" | ||
+ | TRIVAL="NO" | ||
+ | DEBUG="NO" | ||
+ | CONVOKFLAG="CONVOK" | ||
DECODED_BY="LIBAV" | DECODED_BY="LIBAV" | ||
- | guiconfirm="NO" | + | GUICONFIRM="NO" |
MAXHISTORY="3" | MAXHISTORY="3" | ||
WORKDIR="/opt/mobilemate" | WORKDIR="/opt/mobilemate" | ||
TASKBASE="${WORKDIR}/task" | TASKBASE="${WORKDIR}/task" | ||
+ | TASKBAKBASE="${WORKDIR}/task.bak" | ||
+ | TASKBACKUP="NO" | ||
TMPBASE="/tmp/mobilemate" | TMPBASE="/tmp/mobilemate" | ||
TMPCONFBASE="${TMPBASE}/conf" | TMPCONFBASE="${TMPBASE}/conf" | ||
- | threads="-1" | + | THREADS="-1" |
STARTTIME="0" | STARTTIME="0" | ||
ENDTIME="0" | ENDTIME="0" | ||
Line 27: | Line 36: | ||
LIBAVSEEK="FAST" | LIBAVSEEK="FAST" | ||
ASYNC="1" | ASYNC="1" | ||
- | logfile="${WORKDIR}/log/mobilemate.log" | + | LOGBASE="${WORKDIR}/log" |
- | v2voptionslistfile="${WORKDIR}/conf/v2voptions.list" | + | V2VOPTIONSLISTFILE="${WORKDIR}/conf/v2voptions.list" |
- | x2aoptionslistfile="${WORKDIR}/conf/x2aoptions.list" | + | X2AOPTIONSLISTFILE="${WORKDIR}/conf/x2aoptions.list" |
- | v2vruleslistfile="${WORKDIR}/conf/v2vrules.list" | + | V2VRULESLISTFILE="${WORKDIR}/conf/v2vrules.list" |
- | x2aruleslistfile="${WORKDIR}/conf/x2arules.list" | + | X2ARULESLISTFILE="${WORKDIR}/conf/x2arules.list" |
- | v2vworkconfigfile="${WORKDIR}/conf/v2vwork.conf" | + | |
- | x2aworkconfigfile="${WORKDIR}/conf/x2awork.conf" | + | |
</file> | </file> | ||
Line 39: | Line 46: | ||
<code>PATH="/opt/mobilemate/bin:/opt/custom/bin:$PATH"</code> | <code>PATH="/opt/mobilemate/bin:/opt/custom/bin:$PATH"</code> | ||
Set the executable PATH environment for Mobilemate. | Set the executable PATH environment for Mobilemate. | ||
+ | |||
+ | <code>TRIVAL="NO"</code> | ||
+ | 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". | ||
+ | |||
+ | <code>DEBUG="NO"</code> | ||
+ | Set if display debug information on console and output to log file. | ||
+ | |||
+ | The available options are: "NO", "YES". | ||
+ | |||
+ | The default option is "NO". | ||
+ | |||
+ | <code>CONVOKFLAG="CONVOK"</code> | ||
+ | The file converting success flag constant string. Don't change it. | ||
<code>DECODED_BY="LIBAV"</code> | <code>DECODED_BY="LIBAV"</code> | ||
Line 62: | Line 86: | ||
<code>WORKDIR="/opt/mobilemate"</code> | <code>WORKDIR="/opt/mobilemate"</code> | ||
- | The Mobilemate tools root directory. Don't change it. | + | The Mobilemate tool root directory. Don't change it. |
<code>TASKBASE="${WORKDIR}/task"</code> | <code>TASKBASE="${WORKDIR}/task"</code> | ||
The Mobilemate task directory. Don't change it. | The Mobilemate task directory. Don't change it. | ||
+ | |||
+ | <code>TASKBAKBASE="${WORKDIR}/task.bak"</code> | ||
+ | The Mobilemate task backup directory. | ||
+ | |||
+ | <code>TASKBACKUP="NO"</code> | ||
+ | Set if backup task files. | ||
+ | |||
+ | The available options are: "NO", "YES". | ||
+ | |||
+ | The default option is "NO". | ||
<code>TMPBASE="/tmp/mobilemate"</code> | <code>TMPBASE="/tmp/mobilemate"</code> | ||
Line 154: | Line 188: | ||
</file> | </file> | ||
- | X264PROFILE="baseline" | + | <code>X264PROFILE="baseline"</code> |
- | XVIDFOURCC="DX50" | + | Set H.264 profile when use libx264 encoder. |
- | LIBAVSEEK="FAST" | + | |
- | ASYNC="1" | + | The avilable options are: "baseline", "main", "high". |
- | logfile="${WORKDIR}/log/mobilemate.log" | + | |
- | v2voptionslistfile="${WORKDIR}/conf/v2voptions.list" | + | 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: [[http://superuser.com/questions/489087/what-are-the-differences-between-h-264-profiles|What are the differences between H.264 Profiles?]]. |
- | x2aoptionslistfile="${WORKDIR}/conf/x2aoptions.list" | + | |
- | v2vruleslistfile="${WORKDIR}/conf/v2vrules.list" | + | Below is option explaination copied from man page of "mplayer_1.0~rc4.dfsg1+svn33713". |
- | x2aruleslistfile="${WORKDIR}/conf/x2arules.list" | + | |
- | v2vworkconfigfile="${WORKDIR}/conf/v2vwork.conf" | + | <file> |
- | x2aworkconfigfile="${WORKDIR}/conf/x2awork.conf" | + | 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) | ||
+ | </file> | ||
+ | |||
+ | <code>XVIDFOURCC="DX50"</code> | ||
+ | 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". | ||
+ | |||
+ | <code>LIBAVSEEK="FAST"</code> | ||
+ | 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. | ||
+ | |||
+ | <code>ASYNC="1"</code> | ||
+ | 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. | ||
+ | |||
+ | <code>LOGBASE="${WORKDIR}/log"</code> | ||
+ | Set the log file directory. | ||
+ | |||
+ | <code>v2voptionslistfile="${WORKDIR}/conf/v2voptions.list"</code> | ||
+ | The options list file of converting to video. Don't change it. | ||
+ | |||
+ | <code>x2aoptionslistfile="${WORKDIR}/conf/x2aoptions.list"</code> | ||
+ | The options list file of converting to audio. Don't change it. | ||
+ | |||
+ | <code>v2vruleslistfile="${WORKDIR}/conf/v2vrules.list"</code> | ||
+ | The rules list file of converting to video. Don't change it. | ||
+ | |||
+ | <code>x2aruleslistfile="${WORKDIR}/conf/x2arules.list"</code> | ||
+ | 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. | ||
+ | <file> | ||
+ | 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" | ||
+ | </file> | ||
+ | |||
+ | The options explaination list below. | ||
+ | |||
+ | <code>format="mp4"</code> | ||
+ | Set the video container format. | ||
+ | |||
+ | The available options: See them in the output of command line "<code>/opt/custom/bin/ffmpeg -formats</code>". | ||
+ | |||
+ | <code>vcodec="mpeg4"</code> | ||
+ | Set the video encoder. | ||
+ | |||
+ | The available options: See them in the output of command line "<code>/opt/custom/bin/ffmpeg -codecs</code>". | ||
+ | |||
+ | <code>vbitrate="256"</code> | ||
+ | Set the video stream bitrate in kb/s. | ||
+ | |||
+ | The available option is any non-zero unsigned integer. | ||
+ | |||
+ | <code>ofps="10"</code> | ||
+ | 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. | ||
+ | |||
+ | <code>vfscale="176:144"</code> | ||
+ | Set the output video resolution. | ||
+ | |||
+ | The available option is in the form of "X:Y", "X" and "Y" is non-zero unsigned integer. | ||
+ | |||
+ | <code>vdar="SAR"</code> | ||
+ | Set video [[http://en.wikipedia.org/wiki/Display_aspect_ratio|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. | ||
+ | |||
+ | <code>vfcroptype="FULL_HEIGHT"</code> | ||
+ | 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. | ||
+ | |||
+ | <code>acodec="aac"</code> | ||
+ | Set the audio encoder. | ||
+ | |||
+ | The available options: See them in the output of command line "<code>/opt/custom/bin/ffmpeg -codecs</code>". | ||
+ | |||
+ | <code>audiochannels="2"</code> | ||
+ | Set audio channels number. | ||
+ | |||
+ | The available options: "1", "2". | ||
+ | |||
+ | The default "2" indicates "stereo" and "1" is "mono". | ||
+ | |||
+ | <code>samplerate="44100"</code> | ||
+ | Set audio sampling rate. | ||
+ | |||
+ | The available options are non-zero integer number. | ||
+ | |||
+ | <code>abitrate="128"</code> | ||
+ | Set audio bitrate in kb/s. | ||
+ | |||
+ | The available option is any non-zero unsigned integer. | ||
+ | |||
+ | <code>audiolevel="ORIGINAL"</code> | ||
+ | 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"). | ||
+ | |||
+ | <code>splittime="-1"</code> | ||
+ | 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". |
蜀ICP备2021012931号-1 川公网安备51092202000377号