---
name: "meshlabserver"
section: "1"
platform: "linux"
package: "meshlab"
version: "2020.09+dfsg1-2"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/meshlabserver"
---

# meshlabserver(1)

The open source batch mesh processing system

## NAME

**meshlabserver** – The open source batch mesh processing system

## SYNOPSIS

**meshlabserver** \[**-d** *output*\]

**meshlabserver** \[**-l** *logfile*\] \[**-p** *projectfile*\] \[**-w** *outputprojectfile* \[**-x**\]\] \[**-i** *meshfile*\] ...\[ **-o** *outfile* \[**-l** *opt\_layer*\] \[**-m** *opt\_mask*\]\] \[**-s** *scriptfile*\]

## DESCRIPTION

**meshlabserver** allows batch-processing usage of functionality available in the interactive [meshlab(1)](/meshlab/1.md) application.

The arguments are as follows:

- **-d** *output*

  dump on a text file a list of all the filtering functions

- **-l** *logfile*

  log of the filters is output on a file

- **-p** *projectfile*

  meshlab project ( .mlp ) to be loaded

- **-w** *outputprojectfile* \[**-x**\]

  output meshlab project (.mlp) to be saved. If **-x** flag is specified, any 3D model file(s) *meshfile.ext* contained in the input project will be overwritten. Otherwise, for an input filename of *meshfile.ext*, the model will be saved in the same directory of input mesh as a new file called *meshfile\_out.ext*. ALL the mesh attributes will be exported in the saved files.

- **-i** *file*

  mesh that has to be loaded

- **-o** *outfile* \[**-l** *opt\_layer*\] \[**-m** *opt\_mask*\]

  the name of the file where to write the current layer of the project.

  - **-l** *opt\_layer*

    Save the specified layer to the chosen filename. Valid values for *opt\_layer* can be

    - A number in the range \[0, last\_layer\_in\_the\_project\]

      to indicate the desired layer by its index.

    - ‘c’

      indicate the CURRENT layer in the project

    - ‘x’

      indicate the LAST layer in the project

  - **-m** *opt\_mask*

    the listed mesh attributes will be saved in the output file. The parameter *opt\_mask* can be a space-separated list of the following attributes:

    - ‘vc’

      vertex colors

    - ‘vf’

      vertex flags

    - ‘vq’

      vertex quality

    - ‘vn’

      vertex normals

    - ‘vt’

      vertex texture coords

    - ‘vr’

      vertex radius

    - ‘fc’

      face colors

    - ‘ff’

      face flags

    - ‘fq’

      face quality

    - ‘fn’

      face normals

    - ‘wc’

      wedge colors

    - ‘wn’

      wedge normals

    - ‘wt’

      wedge texture coords

    - ‘mp’

      polygonal mesh info

    - ‘sa’

      save in ascii format

- **-s** *scriptfile*

  the script to be applied. Must be in the xml format saved by MeshLab.

## NOTES

There can be multiple meshes loaded and the order they are listed matters because filters that use meshes as parameters choose the mesh based on the order.

The format of the output mesh is guessed by the used extension.

## EXIT STATUS

The **meshlabserver** utility exits 0 on success, and \>0 if an error occurs.

## EXAMPLES

Apply the script contained in the file *meshclean.mlx* to the mesh contained in *input.obj*. Save the per-vertex-color, the per-face-quality, and the per-wedge-texture attributes contained in the current layer into *output.ply*.

```
$ meshlabserver -i input.obj -o output.ply -m vc fq wt -s meshclean.mlx
```

Apply the script contained in the file *meshclean.mlx* to the mesh contained in *input.obj*. Save the per-vertex-color, the per-face-quality and the per-wedge-texture attributes contained in the layer 2 (if it exists!) into *output.ply*. Save the last layer of the project to *output\_last* with the default geometric attributes.

```
$ meshlabserver -i input.obj -o output.ply -l 2 -m vc fq wt -o output_last.ply -l l -s meshclean.mlx
```

Apply the script contained in the file *meshclean.mlx* to the mesh composed of *input0.obj* and *input1.ply*. Make *input1.ply* the current mesh of the project (i.e. the mesh to which the filters operating on a single model will be applied). Generate a new output project *outproj.mlp* containing references to *input0.obj* and *input1.ply*. The files *input0.obj* and *input1.ply* will be overwritten. A log will be written to *logfile.txt*.

```
$ meshlabserver -l logfile.txt -p proj.mlp -i input.obj -w outproj.mlp -s meshclean.mlx
```

## SEE ALSO

[meshlab(1)](/meshlab/1.md)

## AUTHOR

Paolo Cignoni - Visual Computing Lab - ISTI - CNR
