ROUTE output

Register name used to load filter: __routeout__  
This filter may be automatically loaded during graph resolution.  
  
The ROUTE output filter is used to distribute a live file-based session using ROUTE or DVB-MABR.  
The filter supports DASH and HLS inputs, ATSC3.0 signaling and generic ROUTE or DVB-MABR signaling.  
  
The filter is identified using the following URL schemes:  

- `atsc://`: session is a full ATSC 3.0 session  
- `route://IP:port`: session is a ROUTE session running on given multicast IP and port  
- `mabr://IP:port`: session is a DVB-MABR session using FLUTE running on given multicast IP and port  

  
The filter only accepts input PIDs of type `FILE`.  

- HAS Manifests files are detected by file extension and/or MIME types, and sent as part of the signaling bundle or as LCT object files for HLS child playlists.  
- HAS Media segments are detected using the `OrigStreamType` property, and send as LCT object files using the DASH template string.  
- A PID without `OrigStreamType` property set is delivered as a regular LCT object file (called `raw` hereafter).  

    
For `raw` file PIDs, the filter will look for the following properties:  

- `MCASTName`: set resource name. If not found, uses basename of URL  
- `MCASTCarousel`: set repeat period. If not found, uses [carousel](#carousel). If 0, the file is only sent once  
- `MCASTUpload`: set resource upload time. If not found, uses [carousel](#carousel). If 0, the file will be sent as fast as possible.  

  
When DASHing for ROUTE, DVB-MABR or single service ATSC, a file extension, either in [dst](#dst) or in [ext](#ext), may be used to identify the HAS session type (DASH or HLS).  
Example
```
"route://IP:PORT/manifest.mpd", "route://IP:PORT/:ext=mpd"
```
  
  
When DASHing for multi-service ATSC, forcing an extension will force all service to use the same formats.  
Example
```
"atsc://:ext=mpd", "route://IP:PORT/manifest.mpd"
```
  
If multiple services with different formats are needed, you will need to explicit your filters:  
Example
```
gpac -i DASH_URL:#ServiceID=1 dashin:forward=file:FID=1 -i HLS_URL:#ServiceID=2 dashin:forward=file:FID=2 -o atsc://:SID=1,2  
gpac -i MOVIE1:#ServiceID=1 dasher:FID=1:mname=manifest.mpd -i MOVIE2:#ServiceID=2 dasher:FID=2:mname=manifest.m3u8 -o atsc://:SID=1,2
```
  
  
__Warning: When forwarding an existing DASH/HLS session, do NOT set any extension or manifest name.__  
  
The filter will look for `MCASTIP` and `MCASTPort` properties on the incoming PID to setup multicast of each service. If not found, the default [ip](#ip) and port will be used, with port incremented by one for each new multicast stream.  
  
By default, all streams in a service are assigned to a single multicast session, and differentiated by TSI (see [splitlct](#splitlct)).  
TSI are assigned as follows:  

- signaling TSI is always 0 for ROUTE, 1 for DVB+Flute  
- raw files are assigned TSI 1 and increasing number of TOI  
- otherwise, the first PID found is assigned TSI 10, the second TSI 20 etc ...  

  
When [splitlct](#splitlct) is set to `mcast`, the IP multicast adress is computed as follows:  

    - if `MCASTIP` is set on the PID and is different from the service multicast IP, it is used  
    - otherwise the service multicast IP plus one is used  

The multicast port used is set as follows:  

- if `MCASTPort` is set on the PID, it is used  
- otherwise the same port as the service one is used.  

Init segments and HLS child playlists are sent before each new segment, independently of [carousel](#carousel).