We use cookies to enhance your browsing experience, serve personalized ads or content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies. Click here for more information on our Privacy Policy.
Customize Consent Preferences
We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.
The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ...
Always Active
Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.
No cookies to display.
Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.
No cookies to display.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.
No cookies to display.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
No cookies to display.
Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.
The HLS Plugin included in the Red5 Pro Server distribution reads the configuration file at red5pro/conf/hlsconfig.xml.
HLS Playlist Values
The following properties are defined to configure the HLS playlist:
itemCount – The number of segments in the sliding window
itemLength – The segment duration
itemThreshold – The HLS segmentation variance. It should be higher than 0.5 and less than 1
useDiskWrites – If you have a large duration and segment count, you may prefer to serve the HLS files from disk
HLS Recording Options
The following settings can be modified for different recording options.
NOTE: additional settings not documented may be for future functionality, and should be left to their default values.
postProcessMode
Default value is <propertyname="postProcessMode"value="0"/>. Set this to <propertyname="postProcessMode"value="1"/> to enable OrientationPostProcessing for HLS, that will
forceVODRecord
Default value is <propertyname="forceVODRecord"value="false"/>. Set this to <propertyname="forceVODRecord"value="true"/> to only record HLS without generating an .flv. Additionally, if recording on a transcoder node, this will allow you to record all transcoded streams along with a master.m3u8 record that will allow for ABR VOD playback.
uploadOnTheFly
Default value is <propertyname="uploadOnTheFly"value="false"/>. Set this to <propertyname="uploadOnTheFly"value="true"/> if you want to start offloading the HLS segments to cloudstorage as soon as the stream starts. This can help reduce server diskspace usage when you have a long recording, or many streams recording simultaneously.
writeJsonMetadata
Default value is <propertyname="writeJsonMetadata"value="false"/>. Set this to <propertyname="writeJsonMetadata"value="true"/> if you want to record the stream metadata along with the HLS recording.
hlsconfig.xml
Property defaults from conf/hlsconfig.xml as of server version 10.9.2
<?xml version="1.0" encoding="UTF-8"?><beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"><beanname="hlsConfig"class="com.red5pro.stream.transform.mpegts.HLSConfig"><!-- Number of items in the HLS playlist --><propertyname="itemCount"value="5"/><!-- The segment duration in seconds for each item. --><propertyname="itemLength"value="6"/><!-- The segment duration variance. The range should be higher than 0.5 and lower than 1.0.
That is to configure segments generated more than half of the desired duration.
The effectiveness of segmentation is dependant on the keyframe interval --><propertyname="itemThreshold"value="0.7"/><!-- Maximum hls segment length in bytes. Forces segmentation when segment grows to this size. --><propertyname="maxSegmentSize"value="8000000"/><!-- --><propertyname="useDiskWrites"value="true"/><!-- Post processing mode:
0 = Legacy, no append, no ffmpeg requirement (default)
1 = Uses the Orientation Post Processor requiring ffmpeg and also enables "append" handling
--><!-- Live format; options are: TS for transport stream, FMP4 for fragmented mp4 and SMP4 for single mp4. FMP4 Recordings saved to SMP4 --><propertyname="outputFormat"value="TS"/><!-- truncating audio while wait for video:
true = the first output segment shoud contain video stream
false = output everything that comes as input
--><propertyname="waitForVideo"value="true"/><propertyname="postProcessMode"value="0"/><!-- Enable a live stream m3u8 playlist to show all segments instead of a moving window.
Set true to support DVR rewind to the beginning with live streams --><propertyname="dvrPlaylist"value="false"/><!-- Provide post-processing for recorded HLS files --><propertyname="writerPostProcessors"><set><!-- Creates a VOD playlist with associated segments and moves it to vod app or cloud storage upload
To use non-append mode, set `legacy` to `true`
--><value>com.red5pro.stream.transform.mpegts.processor.VODFilePostProcessor</value><!-- Cleans up the .ts and .m3u8 files if they were written --><value>com.red5pro.stream.transform.mpegts.processor.SegmentCleanupPostProcessor</value></set></property><!-- Debug mode --><propertyname="debug"value="false"/><!-- Force VOD recording --><propertyname="forceVODRecord"value="false"/><!-- When recording, force saving file as a single mp4--><propertyname="saveAsMP4"value="false"/><!-- Cloud uploaders are queried in the post processor, no special configuration entry required here --><!-- Automatically upload if the Cloudstorage plugin is configured --><propertyname="doCloudstorageUpload"value="true"/><!-- When true and cloudstorage is configured, HLS recordings are uploaded on the fly --><propertyname="uploadOnTheFly"value="false"/><!-- To write json metadata or not to write it to a file --><propertyname="writeJsonMetadata"value="false"/><!-- Time in seconds to sleep before invoking post processors, to allow HLS clients to watch a stream to the end --><propertyname="sleepOnPlaylistClose"value="30"/></bean></beans>