Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note that config flashphoner.properties will be overwritten after the command.

Low Latency HLS support

Since WCS build 5.2.1181, Low Latency HLS (LL HLS) is supported. The feature may be enabled with the following parameters

Code Block
themeRDark
hls_ll_enabled=true
hls_new_http_stack=true

In this case, players supporting LL HLS (HLS.JS for example) will play additional HLS segments reducing playback latency comparing with players which do not play those segments (VideoJS for example).

It is necessary to provide a stable FPS and keyframe interval for a published stream to play it as LL HLS correctly. Therefore, it is recommended to publish the source strem as RTMP with the following example parameters

Image Added

Image Added

For WebRTC streams, it is recommended to enable transcoding to play them as HLS

Code Block
themeRDark
hls_player_width=848
hls_player_height=480
video_filter_enable_fps=true

LL HLS segments folder

By default, LL HLS segments are written to streams subdolder to the folder

Code Block
themeRDark
ll_hls_dir=/usr/local/FlashphonerWebCallServer/ll-hls

If folder has changed

Code Block
themeRDark
ll_hls_dir=/opt/ll-hls

it is necessary to set file access permissions using the command

Code Block
languagebash
themeRDark
/usr/local/FlashphonerWebCallServer/bin/webcallserver set-permissions

and restart WCS to apply the changes.

LL HLS preloader

A special preloader can be used for LL HLS s like as for usual HLS. LL HLS preloader segments are placed by default to the folder

Code Block
themeRDark
ll_hls_preloader_dir=/usr/local/FlashphonerWebCallServer/ll-hls/.preloader

The folder can be changed, for example

Code Block
themeRDark
ll_hls_preloader_dir=/opt/preloader

Custom LL HLS preloader setup

A custom LL HLS preloader can be set up if necessary. To do this, it is recommended to use a staging WCS server instance, not a production one. Custom preloader x=can be created as follows

1. Set the following server parameters

Code Block
themeRDark
hls_preloader_enabled=false
ll_hls_create_preloader=true
hls_auto_start=true

and restart WCS

2. Publish an RTMP stream from OBS to the server using video source with aspect ratio 16:9 and stream key index 

Code Block
themeRDark
rtmp://wcs:1935/live/index

Image Added

Set Resize output (source size) option for the source

Image Added

3. By default, preloader segments will be written to the folder

Code Block
themeRDark
ll_hls_custom_preloader_dir=/usr/local/FlashphonerWebCallServer/custom-preloader/created-segments

It is enough to write up to 20 main segments index0.ts - index20.ts 

4. When publishing is stopped, move preloader segments to corresponding preloader subfolder

Code Block
languagebash
themeRDark
cd /usr/local/FlashphonerWebCallServer/custom-preloader/created-segments
cp index*.ts /opt/preloader/16x9
rm -rf index*.ts

5. Repeat steps 2-4 using sources with aspect ratios 4:3 and 2:1

6. Restore server settings and set preloader foder as needed

Code Block
themeRDark
ll_hls_preloader_dir=/opt/preloader

then restart WCS

Known issues

1. Non-recoverable freeze of HLS stream played in iOS Safari through a CDN

...

Solution: update WCS to build 5.2.863, where the problem is solved

7. Audio may be missed on the first connection to the stream when playing native LL HLS in Safari browser

Symptoms: stream is playing as LL HLS but there is no sound

Solution: click Pause then Play in player window