---
title: Files and video
project: Flow
version: 11.1
section: components
language: en
license: MIT
url: https://totaljs.es/docs/flow/11-1/components/files-and-video/
updated: 2026-11-20T06:50:52.962Z
---

# Files and video

> Components that watch, write, rename and remove files, and convert videos.

Components that watch, write, rename and remove files, and convert videos. This page holds the catalogue groups **Files**, **Video**.

Each entry lists the inputs and outputs of the component, its main settings and the text of its readme. To add a component to a FlowStream, see [Download components](/flow/11-1/guides/download-components/).

## API

### filewatcher.html · version 1

Type: `component`

Waits for a file to exist, reads it, sends its content and removes it.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `path` | `String` | no |  | Path. |
| `parser` | `String` | no | `json` | Parser. One of: `json` (JSON), `text` (Text), `buffer` (Buffer), `number` (Number), `date` (Date). |
| `interval` | `Number` | no | `1000` | Interval (milliseconds). |

**Inputs:** none.  
**Outputs:** `output` (Output).

The component watches the existence of the file, then reads the content and sends it next. The file will be removed automatically after reading.

### filewriter.html · version 1

Type: `component`

Writes incoming data into a file.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `path` | `String` | no |  | Path. |
| `serializer` | `String` | no | `json` | Serializer. One of: `json` (JSON), `text` (Text), `buffer` (Buffer). |
| `rewrite` | `Boolean` | no | `true` | Rewrite content. |
| `divider` | `String` | no | `\n` | Divider. |

**Inputs:** `input` (Input).  
**Outputs:** none.

The component writes incoming data into the file.

### fileswatcher.html · version 1

Type: `component`

Watches a folder for new files.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `path` | `String` | no | `/www/` | Path. |
| `ext` | `String` | no | `.mp4` | Extension. |
| `interval` | `Number` | no | `5000` | Interval (milliseconds). |
| `expire` | `String` | no | `10 minutes` | Expire. |

**Inputs:** none.  
**Outputs:** `output` (Output).

This component watches new files.

__Output__:

```js
{
	"filename": "filename.mp4",
	"size": 10785133,
	"atime": "2026-04-30T06:53:00.501Z",
	"ctime": "2026-05-27T16:44:08.217Z",
	"mtime": "2026-04-30T06:53:00.501Z",
}
```

### fsunlink.html · version 1

Type: `component`

Removes a file.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `prop` | `String` | no | `filename` | Read filename from the property. |

**Inputs:** `input` (Filename).  
**Outputs:** `output` (Output).

This component removes file according to the configuration path.

__Payload__:

```js
String

// or

{
	filename: 'String'
}
```

__Output__:

Incoming payload.

### fsrename.html · version 1

Type: `component`

Renames a file.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `prop` | `String` | no | `filename` | Read filename from. |
| `prop2` | `String` | no | `rename` | Rename filename to. |

**Inputs:** `input` (Input).  
**Outputs:** `output` (Output), `error` (Error).

This component renames file according to the input values.

__Payload__:

```js
{
	filename: 'String',
	rename: 'String'
}
```

__Output__:

Incoming payload.

### fstouch.html · version 1

Type: `component`

Updates the modification time of a file.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `path` | `String` | no | `filename` | Property. |

**Inputs:** `input` (Input).  
**Outputs:** `output` (Output).

This component updates a file's modification timestamp if the file exists.

__Input__:

```js
{
	filename: '/absolute/path/to/file.txt'
}
```

__Output__:

```js
{
	filename: '/absolute/path/to/file.txt'
}
```

### ffmpegconverter.html · version 1

Type: `component`

Resizes a video and changes its frame rate with FFmpeg.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | `Number` | no | `400` | Width. |
| `fps` | `Number` | no | `0` | FPS. |
| `path` | `String` | no | `/` | Path. |
| `prop` | `String` | no | `response` | Output property. |
| `prop2` | `String` | no | `preview` | Output preview. |
| `prop3` | `String` | no | `duration` | Output duration. |

**Inputs:** `input` (File).  
**Outputs:** `output` (Output), `error` (Error).

This component resizes video and change framerate according to the component settings. The component extends the output by adding an __Output property__ with a containing the file name.

__Output__:

```js
{
	// incoming payload
	...
	output_property: String
}
```
