| | 148 | |
|---|
| | 149 | == Updates to process-style transcoders == |
|---|
| | 150 | |
|---|
| | 151 | Support for transcoders with type "process" has been extended as follows. |
|---|
| | 152 | data output by the 'process' is bufferized in a FIFO, up to a given size. Above this size, the process is paused. To be frank, the concepts here are heavily 'borrowed' from [[http://mediatomb.cc mediatomb]]. |
|---|
| | 153 | Here are to the available parameters, besides existing {{{type}}}, {{{name}}} and {{{target}}}: |
|---|
| | 154 | |
|---|
| | 155 | {{{ pipeline }}} : the command to launch the transcoder process. This command takes the form of a python formatting string, with the following variables: |
|---|
| | 156 | - either a single {{{%s}}} or {{{%uri}}} variable, corresponding to the source URI or file path. The command has to output transcoded data to its standard output. |
|---|
| | 157 | - either both {{{%uri}}} and {{{%output}}} variables, corresponding to the source URI or file path, and file path to a pipe file that coherence will stream to the client |
|---|
| | 158 | |
|---|
| | 159 | {{{ source }}} : the mimetype (as attribute {{{mimetype}}}) for which the transcoder will be applied. For other data types, no transcoded resources will be proposed. |
|---|
| | 160 | |
|---|
| | 161 | {{{priority}}} : defines how the transcoded resource will be published, besides the original one. Available values are: |
|---|
| | 162 | - -1: the transcoded resource will be published before the original one(s) |
|---|
| | 163 | - 0: the transcoded resource will be published in place of the original one(s) |
|---|
| | 164 | - 1: the transcoded resource will be published after the original one(s) |
|---|
| | 165 | - 2: the transcoded resource will be published at the end of the list |
|---|
| | 166 | |
|---|
| | 167 | {{{buffer}}} : (optional)tuning parameters for the buffering taking place at the server side, when streaming the transcoded resources. Attributes are: |
|---|
| | 168 | - {{{size}}} : total size of the buffer |
|---|
| | 169 | - {{{chunk-size}}} : size of data chunks read from the FIFO and served to the client |
|---|
| | 170 | Values may be tuned according to your setting, to smoothen playback or optimize server resource consumption. |
|---|
| | 171 | |
|---|
| | 172 | Below a sample transcoder configuration (see svn for the source code for the given {{{bash_memcoder_srt2mpeg}}} command: it takes a srt file, accompanying a video file, and transcode it to mpeg embedding the subtitles). |
|---|
| | 173 | |
|---|
| | 174 | {{{ |
|---|
| | 175 | <transcoder> |
|---|
| | 176 | <pipeline>misc/transcoders/bash_memcoder_srt2mpeg %uri %output</pipeline> |
|---|
| | 177 | <type>process</type> |
|---|
| | 178 | <name>srt2video</name> |
|---|
| | 179 | <target>video/mpeg</target> |
|---|
| | 180 | <!--<buffer size="5242880" chunk-size="8192"/>--> |
|---|
| | 181 | <source mimetype="application/x-srt"/> |
|---|
| | 182 | <priority>0</priority> |
|---|
| | 183 | </transcoder> |
|---|
| | 184 | }}} |