---
title: "Control remote capture"
canonical: "https://help.vicon.com/space/Tracker43/344557332/Control%20remote%20capture"
format: markdown
---
You can control remote capture in these ways:

- Use the Tracker API to trigger capture remotely or receive capture notifications. For more information, see [Vicon Tracker Python API Quick Start Guide](https://vicon-help.atlassian.net/wiki/spaces/Tracker43/pages/344557624).
- Use a simple UDP protocol to broadcast when capture has started. Tracker can also receive these messages, which can be used to trigger a capture remotely over a network.

For information on how to set up remote triggering in Tracker, see [Capture live data](https://vicon-help.atlassian.net/wiki/spaces/Tracker43/pages/344557323), and in particular, Step 5.

Sample code is provided showing how to remotely start, stop or cancel a capture and extensive documentation is included in the code (see [Example code to control remote capture](https://vicon-help.atlassian.net/wiki/spaces/Tracker43/pages/344557350)).

> ⚠️ **Important**  
> ⚠️ If you use **Broadcast Capture**, packet information is automatically populated based on the way Tracker is currently configured.

## Example notifications

The XML file contains the following notifications.

> Macro (toc)

> Macro (scroll-pagebreak)

### Start notification

The following example shows a Start notification. Note that the broadcast must fit into one UDP packet. The actual packet is not indented and white space between tokens is removed.

```xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<CaptureStart>
	<Name VALUE="dance"/>
	<Notes VALUE="The pets ants crime deer jump. "/>
	<Description VALUE="The crowd pencil pets alert fold deer. With welcome practice representative complete great? Or jolly tiny memorise thread. However wool insect pipe! "/>
	<DatabasePath VALUE="D:/Jeremy/Susan/Captures/Take"/>
	<Delay VALUE="33"/>
	<PacketID VALUE="33360"/>
</CaptureStart>
```


    <span style="color: #172B4D">Where:</span>


> Macro (scroll-tablelayout)

|  |  |
| --- | --- |
| `Name` | The name of the capture, which is used as the filename for the capture files, for example `<Name>.x2d`. Note that the name must be unique for the given `DatabasePath`.<br>:warning: If you enter a name for a file that already exists, the original file is treated as a "backup" and is renamed to "[NAME].backup_{date}_{time}.”. For example "Dance" would be renamed to Dance.backup_01012024_135530 |
| `Notes` | Any notes provided |
| `Description` | Any description provided. Avoid very long description strings as the broadcast must fit into one UDP packet. If it does not, the broadcast is not sent. |
| `DatabasePath` | The target path for the capture files. If `DatabasePath` is different from the  **Capture Folder**  (specified in the **Capture Info** section as described in [Capture live data](https://vicon-help.atlassian.net/wiki/spaces/Tracker43/pages/344557323)), Tracker automatically changes the active directory to match `DatabasePath.`<br>:warning: You must include a Database path for the broadcast to work. |
| `Delay` | The number of milliseconds that the broadcast is made before the capture starts. This delay enables clients to do any preparation required to respond. |
| `PacketID` | A unique number that individually identifies the packet. It is incremented for each packet generated. Use it to discard duplicate packets that are delivered by UDP. (This can happen if there are multiple paths between the broadcasting and listening machines.) |

> Macro (scroll-pagebreak)

### Stop notification

The following example shows a Stop notification. It is a notification that capturing has stopped.

Note that writing the file to disk may not be complete. Wait for the corresponding Complete notification before trying to open the file.

Possible values for the result are:

- SUCCESS - Everything was ok.
- FAIL - Everything was not ok. Perhaps the disk ran out of room, or the system was unplugged. You may get a truncated file.
- CANCEL - The user stopped the capture process. There will not be a Complete notification. For more information, see [Cancel notification](#CancelNotification).

```xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<CaptureStop RESULT="SUCCESS">
	<Name VALUE="dance"/>
	<DatabasePath VALUE="D:/Jeremy/Susan/Captures/Take"/>
	<Delay VALUE="33"/>
	<PacketID VALUE="33361"/>
</CaptureStop>
```

> Macro (scroll-pagebreak)

### Complete notification

The following example shows a Complete notification. It indicates that the captured file is ready at the path specified. Note that:

- When capture is complete, buffers have yet to be flushed to disk.
- If the file is on a remote drive, it may be captured locally and then copied to the final location. This may take some time.

```xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<CaptureComplete>
	<Name VALUE="dance"/>
	<DatabasePath VALUE="D:/Jeremy/Susan/Captures/Take"/>
	<PacketID VALUE="33362"/>
</CaptureComplete>
```

> Macro (scroll-pagebreak)


    > Macro (anchor)




### Timecode Start notification

The following example shows a Timecode Start notification. It is generated when the system is armed. Note that:

- Capture starts when the system receives the timecode specified.
- Additional notifications may be generated if the start timecode is updated after the system is armed.
- You cannot update a Timecode Start notification once a system has started. If you send multiple Timecode Start notifications, only the first notification is acknowledged.

The following is an example of a Timecode Start notification.

```xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<CaptureStart>
	<TimeCode VALUE="0 38 10 17 0 0 0 4"/>
	<Name VALUE="slip"/>
	<Notes VALUE="The last ants great blade jump."/>
	<Description VALUE="The truthful pencil pets ants crime deer. With geese trail representative complete crowd? Or jolly toothbrush slip thread. However worried insect nest! "/>
	<DatabasePath VALUE="D:/Captures/Take/DayOne/Final"/>
	<PacketID VALUE="33364"/>
</CaptureStart>
```

Where:

`TimeCode` is represented as a sequence of integers delimited with spaces.

- Hours
- Minutes
- Seconds
- Frames
- Sub-Frame (Always zero)
- Field
  - 0 - Even Field
  - 1 - Odd Field
- Standard
  - 0 - PAL
  - 1 - NTSC
  - 2 - NTSC Drop
  - 3 - Film at 24fps
  - 4 - NTSC Film
  - 5 - 30Hz exactly
- Sub-Frames Per Frame (the multiple of the timecode rate that the system is running at)

### Timecode Stop notification

The following example shows a Timecode Stop notification. Note that additional notifications may be generated if the Timecode Stop is updated after the system is armed or possibly even capturing.

```xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<CaptureStop>
	<TimeCode VALUE="0 46 27 15 0 0 0 4"/>
	<Name VALUE="slip"/>
	<DatabasePath VALUE="D:/Captures/Take/DayOne/Final"/>
	<PacketID VALUE="33365"/>
</CaptureStop>
```

The values for `TimeCode` are as listed in [Timecode start notification](#TimecodeStart).

> Macro (scroll-pagebreak)

### Duration Stop notification

The packet is generated when the system is armed, or immediately prior to the capture being started.

```xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<CaptureStop>
	<Duration FRAMES="12867" PERIOD="32865" TICKS="5553087"/>
	<Name VALUE="memorise"/>
	<DatabasePath VALUE="D:/Take/DayOne/Final/Susan"/>
	<PacketID VALUE="33367"/>
</CaptureStop>
```

Where:

` Duration` is the number of frames that will be captured.

The packet may contain extra information describing the frame rate:

- `PERIOD`is the number of clock ticks between each frame
- `TICKS`is the number of ticks in each second

The frames per second of the system can be calculated as `TICKS/PERIOD`. This representation of the frame rate avoids rounding errors for rates such as NTSC, which cannot be stored in a double without a loss of precision.

```plaintext
<Duration FRAMES="12867" PERIOD="653254" TICKS="135000000" /> 
```

> Macro (scroll-pagebreak)


    > Macro (anchor)




## Cancel notification

Send a cancel notification to cancel a take and discard the capture.  Note that the `RESULT` parameter in `CaptureStop` is set to `CANCEL`.

If you send a cancel notification, the recording is stopped and the corresponding Complete notification is not sent.

```xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<CaptureStop RESULT="CANCEL">
	<Name VALUE="dance"/>
	<DatabasePath VALUE="D:/Jeremy/Susan/Captures/Take"/>
	<Delay VALUE="33"/>
	<PacketID VALUE="33361"/>
</CaptureStop>
```