---
title: 'NextEngine Setup (Eng)'
disqus: hackmd
---
NextEngine Dev Setup
===
[TOC]
## Download NextEngine
NextEngine can be downloaded from NextServer/Engine tab

## Folder structure
NextServer Path :
```!
C:\Users\[username]\AppData\Roaming\next-server
```
NextEngine Path :
```!
C:\Users\[username]\AppData\Roaming\next-server\engines\emgdigital-unity
```

:::info
It is recommended to copy the NextEngine folder downloaded from NetServer to a more accessible local folder to easily create new templates.
:::
For exemple we can copy the 1.8.36 version

To C:\NextEngine

:::info
To launch NextEngine, just double click on NextEngine.exe
There is no application installation in Windows.
:::
## FFmpeg
In order to convert TGA image sequences to WEBM video NextEngine uses FFmpeg.
It can be downloaded at this address:
https://s3.eu-central-1.amazonaws.com/files.emg-digital.com/ffmpeg.zip
If FFmpeg is directly accessible in C:\ffmpeg then NextEngine will find it automatically.

If FFmpeg is installed in another folder then it will be necessary to edit in NextEngine folder the file ==unitycg.settings== line ```<ffmpeg>C:/ffmpeg/</ffmpeg>``` with the correct path.
## Output config
The configuration of the video outputs is done in the ==unitycg.config== file
Here is an example of a configuration with 3 outputs.
```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<paths>
<media-path>Medias/</media-path>
<log-path>Log/</log-path>
<template-path>Templates/</template-path>
<batch-path>Batch/</batch-path>
</paths>
<channels>
<channel>
<video-mode>1080i5000</video-mode>
<consumers />
</channel>
<channel>
<video-mode>1080i5000</video-mode>
<consumers />
</channel>
<channel>
<video-mode>1080i5000</video-mode>
<consumers />
</channel>
</channels>
<controllers>
<web-sockets>
<port>5250</port>
<protocol>JAMCP</protocol>
</web-sockets>
</controllers>
<format>8-bit 4:2:2 YUV</format>
<!--8-bit 4:2:2 YUV-->
<!--8-bit 4:4:4:4 ARGB-->
<!--8-bit 4:4:4:4 BGRA-->
<!--10-bit 4:2:2 YUV-->
<!--10-bit 4:4:4 RGB-->
<!--10-bit 4:4:4 RGBX LE-->
<!--10-bit 4:4:4 RGBX-->
</configuration>
```
A more complete description is available on this [page](https://hackmd.io/@186_RLB_TJyxswhmNIsMVg/Sy4LP0GWd).
## Template structure
Into NextServer, Templates are downloded here :
```!
C:\Users\[username]\AppData\Roaming\next-server\templates
```
Each version of a Template is downloaded as a zip and decompress in a folder

In the Template directory, there is a JSON file for each graphic and the directory for the resources (images, videos) of this graphic.
The _COMMON folder contains graphic resources (images, videos) shared by all graphics (like team logos)

:::info
It is recommended to edit graphics in the local version of NextEngine copied earlier.
:::
For example we can copy the \templates\next-template-italy-dev\2023-03-08T16,00,03.000Z_1 content

To C:\NextEngine\Templates\italy-dev

It is also possible to create a new Template from the NextEngine Editor with the "CREATE TEMPLATE" button.

Then create a new graphic with the "NEW" button

NextEngine generates this content in the Templates directory:

:::warning
Do not use subdirectories in the Templates, all JSON files and associated assets directories must be in the Template directory. :fire:
:::
:::warning
To create a new graphic, use the Editor "NEW" or "SAVE AS" button.
If you copy a JSON file from Windows Explorer, you must edit the duplicated JSON file to change the "name" property. :fire:
:::
```json
{
"name": "test-graphic",
"memory": 0,
"uhd": 0,
"resetPos": false,
"group": [
...
```
## Publish a Template
The Template must be compressed in an archive in ZIP format before being uploaded.
Select all files and folders in the Template and add them to a ZIP archive named ==master.zip==
This can be done with 7zip or Winrar for example.

To publish a new version of a Template :
1 - go to the site https://next-console.emg-digital.com/templates
2 - Select the Template
3 - Click on the "+New version" button

4 - click on the "Details/Edit" button

5 - click on the "Upload Version" button

6 - click on the "Select a file to upload" button

7 - Select the ==master.zip== file and upload it

8 - After the upload choose if the version is:
- ==Alpha== visible only by NextServer in development mode
- ==Beta== visible only by NextServer in support mode
- ==Latest== visible by NextServer in all modes